Daily updates from Odoo
Friday, November 29, 2024
21 changes · 17.0
Resolved issues and error corrections
This update resolves an issue where users' LinkedIn accounts were unnecessarily disconnecting during comment loading. The fix ensures disconnections only occur when there's a genuine problem with fetching comments, improving the user experience and preventing frustrating interruptions.
Original PR description
This commit fixes an issue with the social_linkedin module's comments fetch methods introduced in https://github.com/odoo/enterprise/pull/67079. This method disconnects the user from its account every time they open a post's comments, even if all API calls are successful. This shouldn't happen as nothing wrong happened to warrant a disconnection on our end. Now the user's account is disconnected if and only if there was an actual issue when fetching comments. task-4363737 Forward-Port-Of: odoo/enterprise#74672
This update fixes a printing issue where long account names in PDF reports caused text to overflow. The change adds a styling override to properly wrap long account names, ensuring reports are formatted correctly and readable. This improves the user experience when generating and printing financial reports.
Original PR description
Issue: When printing PDF reports, long account names cause the report to overflow out of the page. Steps to reproduce: - Install the accounting app - Enable "Analytic Accounting" in the settings -…
Issue: When printing PDF reports, long account names cause the report to overflow out of the page. Steps to reproduce: - Install the accounting app - Enable "Analytic Accounting" in the settings - Create one (or more) analytic account(s) with very long names - Open either "Balance Sheet" or "Profit and Loss" reporting - Do an "Analytic Group By" with the created account(s) - Print the PDF Cause: The default style in the associated scss file does not use wrapping. https://github.com/odoo/enterprise/blob/bf6c64b8fd5591f271e9b0f18f40d205a64cd5bd/account_reports/static/src/scss/account_pdf_export_template.scss#L41 Solution: Override the default style by using the "o_overflow_name" class. This is the class already used for handling overflow in the tables' content lines. This gives a more readable result than just editing the "white-space" field (see below for comparison). The proposed solution gives the following result:  As opposed to just editing to "white-space: wrap;"  Ticket: opw-4277596
This update resolves an issue where users without the 'account.group_account_invoice' group couldn't access the purchase order view after installing the l10n_ke_edi_oscu_stock module. The change restricts access to a key model, ensuring all users can properly manage purchase orders.
Original PR description
At the moment, when `l10n_ke_edi_oscu_stock` is installed, the purchase order view is broken for users that don't belong to the `account.group_account_invoice` group, because they don't have access to the `l10n_ke_edi.customs.import` model. This commit restricts the `l10n_ke_customs_import_ids` field on the `purchase.order` view to the `account.group_account_invoice` so that this error no longer occurs. runbot-70725
This update resolves an issue where component moves weren't being created when adding components from the shop floor in multi-step manufacturing workflows. The fix ensures that necessary transfer rules are triggered, regardless of the procurement method, allowing for accurate tracking of component movements within the production process. This improves the reliability of multi-step manufacturing operations.
Original PR description
### Steps to reproduce: - Enable "Multi-Steps Routes" in the settings - Inventory > Configuration > Warehouse Management > Warehouses - Put your warehouse in manufacturing in 2 steps - Create an MO…
### Steps to reproduce: - Enable "Multi-Steps Routes" in the settings - Inventory > Configuration > Warehouse Management > Warehouses - Put your warehouse in manufacturing in 2 steps - Create an MO for a product and add an operation (no need of component) - Confirm the MO and go to your operation in the shopfloor - Click on the 3 dots > Add component > add any component #### > Back to the MO: No transfer was created from stock to pre-prod ### Cause of the issue: When you add component from the shopfloor, you will trigger a call of the `add_product` method to create and confirm the raw move associated to the MO: https://github.com/odoo/enterprise/blob/2e2efe8421b2f85950e50ff102cdabf98d2d91ab/mrp_workorder/wizard/additional_product.py#L36-L37 However, if the `procure_method`` of this move is not set to mto/mtso it will not trigger other rules in order to generate the other transfers ### Note: A priori, the issue should not be reproducible in 18.0+ as this part of the code was refactored and the issue was fixed by 235047b68e6a24a14e32b94b1d4a15a580dc5ad2 opw-4236272
This update fixes an issue where the cost analysis report incorrectly displayed the 'to produce' quantity for byproducts instead of the actual quantity produced. The change ensures that the report accurately reflects the byproduct quantities used in manufacturing orders, leading to more precise cost calculations.
Original PR description
**Steps to reproduce the bug:**
- Create a storable product:
- "Finished Product" with the following BoM:
- Component: 1 unit of "C1"
- Byproducts:
- 1 unit of "By-product 1"
- 1 unit of "By-product 2"
- Create a manufacturing order to produce 5 units of the finished product.
- Confirm the MO.
- Set the quantity produced to 5 units.
- Set the quantity of byproducts to:
- By-product 1: 4 units
- By-product 2: 3 units
- Validate the MO.
- Print the cost analysis.
**Problem:**
The reported quantity does not show the actual quantity produced but
instead shows the "to produce" quantity.
opw-4312292This update resolves an issue where spreadsheet thumbnails weren't displaying correctly in Safari and other Webkit browsers. The fix ensures that thumbnails are converted to a compatible format (PNG) when WebP conversion fails, improving the user experience across different browsers.
Original PR description
In safari (and all webkit navigators) `HTMLCanvasElement.toDataUrl` does not support `image/webp` as `type` parameter. https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL#browser_compatibility Before this commit, spreadsheet_edition/hooks.js:useSpreadsheetThumbnail draws an image to a canvas and convert it to base64. But the code assumes that the conversion to webp will work. `toDataUrl` uses `png` type if it doesn't work https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL#type With this commit, the regexp that removes the encoding data will supports `webp` **and** `png`
This update ensures that attachments linked to documents remain attached during version changes, addressing a requirement for strict audit trails (GoBD) in Germany. This prevents document deletion and maintains a complete record of all document versions, crucial for regulatory compliance.
Original PR description
Normally, when using document versioning, the attachments linked to a record are re-attached to the document when changing the version. This is not compatible with the requirement for audit trail in Germany (GoBD) as we want to be sure that the document won't be deleted. This is ensure by making sure all the attachments stay attached, and can't be deleted. To reproduce: * Install Accounting and Documents, as well as l10n_de * Select/configure a German company * Create new document folder settings for Customer Invoices * Create a new invoice * Send & Print * Delete it from the attachments (it should "detach it") * On the document, change the main history version, or on the invoice, navigate through the attachments [opw-4095549](https://www.odoo.com/odoo/project.task/4095549)
This update fixes a potential issue where errors during API calls to the Ecuadorian tax system (l10n_ec_edi) would display confusing tracebacks to users. By catching a broader range of exceptions, including timeouts, the system is now more stable and reliable when communicating with external services.
Original PR description
At the moment, the SOAP call in `_l10n_ec_get_client_service_response` catches `ConnectionError`, but some exceptions raised by zeep (such as `Timeout`) are not caught and will cause a traceback for the user. We catch `RequestException` to make sure that these are caught. task-none Forward-Port-Of: odoo/enterprise#74266
This update corrects a bug where a raw move in a manufacturing order would unexpectedly become marked as 'available' after exiting the barcode module. The fix prevents a split operation from incorrectly reserving the move, ensuring accurate stock tracking. This improves the reliability of the MRP process.
Original PR description
### Steps to reproduce: - Create two storable product: Final Product (FP) and Component (COMP) - Create and confirm an MO for FP with a raw move: 1 x COMP > The move should be: "not available" since…
### Steps to reproduce: - Create two storable product: Final Product (FP) and Component (COMP) - Create and confirm an MO for FP with a raw move: 1 x COMP > The move should be: "not available" since 0 unit of COMP are in Stock - Go to the barcode module > Operations > Manufacturing - Remove the MO Ready filter > Click on your MO and then exit barcode - Go back to the MO in the back end (mrp module) #### > The raw move has been reserved and is hence marked as available. ### Cause of the issue: Exiting the barcode will launch an rpc call of the `split_uncompleted_moves` in order to split uncomplete moves in 2 if necessary (for the records to be appropriately set the next time you enter the barcode): https://github.com/odoo/enterprise/blob/71f979d5bdf88207cb94c83bd6a69633da649d1e/stock_barcode/static/src/models/barcode_picking_model.js#L1327-L1329 https://github.com/odoo/enterprise/blob/71f979d5bdf88207cb94c83bd6a69633da649d1e/stock_barcode/models/stock_move.py#L9-L11 Furthermore, since c29f61fdded2e80d0bb3c06199c6a196feac8076 in case of a production the component move are rather splitted on the move lines to avoid odd split of the component moves on the MO. However, in that case if a unassigned move is splitted, a move line will be generated and associated to that move, which makes it reserved and hence available. opw-4338827 ---
This update corrects a technical error impacting the generation of CFDI invoices in Mexico. Specifically, the 'Pagos' namespace was incorrectly removed from the schemaLocation attribute, causing compatibility issues with Quarum pac. This fix ensures invoices are correctly formatted and processed.
Original PR description
after this commit [1] the **Pagos** namespace was always removed from the schemaLocation attribute, this was causing error for Quarum pac. this commit fix the issue by filtering the schemaLocation attribute based what is present in namespace map. [1] https://github.com/odoo/enterprise/commit/dd18e0829810df7594730e14e09ac2174eedcc32 opw-4168509
This update fixes a synchronization issue when using multiple preparation displays for point-of-sale orders. Previously, order statuses weren't consistently updated across displays, leading to discrepancies. This fix ensures order statuses are accurately reflected across all linked preparation displays, providing a more reliable view of order progress.
Original PR description
There is currently a problem of synchronization when using multiple tracking displays per pos config. Steps to reproduce: ------------------- * Configure 2 Preparation displays, 1 for the category…
There is currently a problem of synchronization when using multiple tracking displays per pos config.
Steps to reproduce:
-------------------
* Configure 2 Preparation displays, 1 for the category food, the other for
drinks. Link them both to the restaurant
* Open the two preparation displays and their preparation status
* In the restaurant, place an order for 1 food and 1 drink product
* On one of the preparation display mark the food as ready
> Observation: Both status screen will show 'ready'
* Again on the preparation display mark the food as completed
> Observation: The order disappears from both screen.
Refreshing both status screen will not show the same state
Why the fix:
------------
The status screen should be seen as an ORDER status screen.
When placing an order 1 in the restaurant, the status screen should only show it as ready when all the pos preparation display orders linked to that order are ready.
This idea behind this fix is to get the status of the order as they are in the related preparation display and to modify it with regards of other status screen that are linked to the same pos config.
Let's discuss this part:
```python
for display in other_displays:
other_display_orders = display._get_pos_orders()
for order in other_display_orders['notDone']:
if order in current_display_orders['done']:
current_display_orders['done'].remove(order)
current_display_orders['notDone'].append(order)
```
`other_display_orders` represent the preparation display orders from other preparation displays.
`current_display_orders` represents the preparation display orders related to the preparation display we just used.
Here we basically ensure that we don't show a preparation order on the status screen as done if there is another preparation order linked to the same order which is not ready.
Scenario:
* `current_display_orders = {'done': ['101', '102'], 'notDone': ['103']} `
* `other_display_orders = {'done': ['101'], 'notDone': ['102', '103']}`
* result -> `current_display_orders = {'done': ['101'], 'notDone': ['103', '102']} `
The fix does not stop here as we also need to consider 2 scenarios:
* 1, we mark a preparation display order as complete in one preparation display.
* 2, we have preparation display orders that are not on the preparation display
but still linked to the same pos config as the status screen opened
In both scenarios, we will have some tracking numbers in `orders` which will not be found in `current_display_orders`.
```python
for order in other_display_orders['done'] + other_display_orders['notDone']:
if (
order not in current_display_orders['done'] + current_display_orders['notDone']
and self.env["pos_preparation_display.order"].search(
[('pos_order_id.tracking_number', 'ilike', order)]
).pos_config_id.id in self.pos_config_ids.ids
):
stage = 'done' if order in orders['done'] else 'notDone'
current_display_orders[stage].append(order)
```
This part of the fix will look at all the orders that are not present in `current_display_orders` and if the preparation order belong to a pos order made in the pos config of the current preparation display status then it will be added in the respective stage.
Scenario:
* `current_display_orders = {'done': ['101', '102'], 'notDone': ['103']} `
* `other_display_orders = {'done': ['101'], 'notDone': ['102', '103', '104']}`
* result -> `current_display_orders = {'done': ['101'], 'notDone': ['103', '102', '104']} `
We also apply this logic when loading the status screen for the first time/or refreshing it. We want to see the status of all orders from the set of pos configs.
opw-[4265987](https://www.odoo.com/web#id=4265987&view_type=form&model=project.task)This update reverts a previous change to the payroll expense testing process. It corrects a requirement that an employee’s bank account must be set up before approving the payroll expense sheet. This ensures the testing process accurately reflects how the system functions in a real-world scenario, preventing potential errors.
Original PR description
This reverts commit 8bc7dfb8f994c2f1147bdba9a5a2cc6c965595bb related: https://github.com/odoo/odoo/pull/188956 task-4206895 Forward-Port-Of: odoo/enterprise#74769
This update resolves an issue where users were not receiving reminders to sign up for Odoo Enterprise. The fix ensures that the system correctly triggers a reminder email by simulating a user click within the sign-up tour, improving the user experience and sign-up conversion rates.
Original PR description
In this commit, we fix sign_resend_expired_link_tour tour by doing click in step action instead of doing nothing.
This update corrects an issue where a confirmation email was incorrectly sent when changing payment methods for subscriptions. The fix filters out validation transactions, ensuring emails are only triggered for actual payment confirmations, improving email efficiency and reducing potential noise for users.
Original PR description
Versions -------- - 17.0+ Community: https://github.com/odoo/odoo/pull/188440 >[!important] >All functional changes are made in `sale`, this PR simply adds a test. Steps ----- 1. Have a confirmed…
Versions -------- - 17.0+ Community: https://github.com/odoo/odoo/pull/188440 >[!important] >All functional changes are made in `sale`, this PR simply adds a test. Steps ----- 1. Have a confirmed subscription; 2. go to subscription management in portal; 3. set or change payment method. Issue ----- The following email is sent: > A payment [...] amounting $ 0.00 for [...] has been confirmed. Cause ----- The `_reconcile_after_done` override in `sale` sends a payment succeeded mail for any sale order linked to a transaction that wasn't confirmed by that transaction. It currently assumes all the transactions in `self` are actual payment operations, as any `validation` gets filtered out in `_finalize_post_processing`, before `_reconcile_after_done` is called[^1]. This assumption no longer holds with `sale_subscription` installed, which also calls `_reconcile_after_done` on validation transactions to manage payment tokens linked to subscriptions[^2]. Solution -------- Filter out `validation` transactions before calling `_send_payment_succeeded_for_order_mail` on linked orders. opw-4169491 [^1]: https://github.com/odoo/odoo/blob/12de68d342b/addons/payment/models/payment_transaction.py#L998-L1003 [^2]: https://github.com/odoo/enterprise/blob/bbd1be56538/sale_subscription/models/payment_transaction.py#L135-L144
This update corrects a potential error in the UPS integration that could occur when adding a ReferenceNumber to delivery requests. By validating the origin and destination pairs beforehand, the system now ensures accurate request creation and avoids disruptions to the shipping process. This improves the reliability of our UPS delivery functionality.
Original PR description
…ing ReferenceNumber to the request opw-4358458 Forward-Port-Of: odoo/enterprise#74751
This update resolves an issue where newly created Gantt appointment events incorrectly defaulted to a duration of -23:00 hours. The fix ensures a standard 1-hour default duration is applied, and the correct appointment type is selected, improving event scheduling accuracy.
Original PR description
Steps to reproduce =================== - Open the resource schedule, and go into day mode. - Switch to tomorrow, and click new. - The start date has been changed but not the end date, which is still…
Steps to reproduce =================== - Open the resource schedule, and go into day mode. - Switch to tomorrow, and click new. - The start date has been changed but not the end date, which is still now +duration. - Which creates a default duration of `-23:00 hours`. Second issue: - Open the resource type appointment and then create the booking from the Gantt view using the new button. - We get the wrong appointment type there. Technical =========== - Earlier, the stop was calculated based on the current time instead of `start` in the default_stop. we set stop datetime inside `onAddClicked` by default to start + 1 hour to override the calendar.event's default_stop. - Earlier, we fell into the condition of fetching only the user appointment when we were not providing any resources inside the default_get method, which led to having the user-based appointment instead of the resource-based one. Here, we added a separate condition to fetch the resource-based when going through the action of resource gantt. After this PR =================== - This PR addresses the issue and fixes it by adding the default stop for 1 hour after the start time and assigning the correct appointment type. Task-4330924
This update resolves an issue where products weren't correctly displayed in deferred journal entries generated from invoices. The fix ensures that the product associated with the invoice is accurately reflected in the deferred entry, improving reporting accuracy. This prevents discrepancies in financial reporting.
Original PR description
*= account_reports,account_accountant,account_disallowed_expenses_fleet **Steps to Reproduce:** - Create 1 invoice with start date, and end date on invoice line. - Confirm the invoice. - Click on the Deferred Entries smart button. - Observe that the product is missing in the journal entry(linked to the selected journal for deferred entries). **Cause:** - The product_id is not being passed while generating deferred entries. **Technical:** IMP was done in this commit 017600af4de58482e2ff4ed1e176be88e3cd8041 but this was done from saas-17.2, so in this PR, the fix is done for v17.0 I didn't add the 'product_id' key directly to the dictionary because if any existing custom module calls this function, it breaks the flow. **task**-4345458
This update ensures that the GSTR1 reporting cron job only processes invoices that haven't been flagged as blocked. By ignoring blocked entries, we improve the accuracy of the reports generated for Indian businesses, reducing potential reporting errors and ensuring compliance.
Original PR description
In this PR: - Updated `_cron_send_gstr1_data` to ignore entries with `gstr1_blocking_level` set. - Ensures only unblocked GSTR1 entries are processed by the cron job. Forward-Port-Of: odoo/enterprise#74564
This update resolves an issue where account line labels could display as either empty strings or False, leading to inconsistent search results. The fix standardizes label handling to False when a value is empty, aligning with expected database behavior and improving search accuracy. This ensures consistent reporting and data retrieval.
Original PR description
**[FIX] account_asset: fix empty string and False/None inconsistencies** (adapting tests)
When empty, the name field of account.move.line could inconsistently hold either an empty string or False. This inconsistency led to different results when searching for lines with an empty label, as label->not set and label == "" yielded different outcomes. The latter behavior aligns with expected ORM operations.
This fix ensures the name field is set to False whenever the computed result is an empty string, standardizing search behavior. We also adapt some tests to the new behavior in enterprise.
opw-4167139
[community PR](https://github.com/odoo/odoo/pull/186079)
Forward-Port-Of: odoo/enterprise#73256This update corrects a minor error in how payroll calculations are processed when multiple input values are involved. This ensures more accurate and reliable payroll processing for employees, particularly those with complex compensation structures. The change improves the overall stability and accuracy of the HR payroll module.
This update fixes a technical issue in the payroll module that caused a traceback error when an employee was removed from a payslip. The fix ensures that the system correctly handles changes to employee records, preventing errors and maintaining data integrity. This improves the reliability of payroll processing.
Original PR description
…ayslip form Steps: • Install the payroll app. • Install l10n_au_hr_payroll module. • Open payslip and remove the employee from the form and click outside to apply changes. • It will cause the traceback error. Cause of the issue: • After removing the employee name corresponding contract will become empty. • The issue is due to empty record set of contract. Fix: • Added a check to ensure contract is present. task-4341523