Daily updates from Odoo
Friday, October 18, 2024
27 changes · 18.0
Resolved issues and error corrections
Sales orders now show the warehouse field by default when needed, so users can select the newly created warehouse before confirming an order. This prevents a blocking error after creating a warehouse for a new company and helps sales confirmations proceed smoothly.
Original PR description
### Steps to reproduce: - Create a new company and select it - Create a SO for an Good and try to confirm > you raise a redirect warning to create a warehouse - Proceed and create a warehouse - Try to confirm the SO once more #### > Since the newly created warehouse was not set on the SO you raise a #### > user Error: 'You must set a warehouse on your sale order to proceed.' ### Issue: The 'warehouse_id' should be visible on the SO for it to be set but it is not. ### Cause of the issue: The field is actually present in the view as soon as your have 2 WH in your company: https://github.com/odoo/odoo/blob/73a62537c4010831cfab4be40f91dba9c56c2175/addons/sale_stock/views/sale_order_views.xml#L24 https://github.com/odoo/odoo/blob/73a62537c4010831cfab4be40f91dba9c56c2175/addons/stock/models/stock_warehouse.py#L321-L336 opw-4250791 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update restores and corrects several payment flows for Argentine localization, especially around checks, withholdings, and payment transfers. It prevents configuration-related payment errors, fixes receipt printing and unnamed check crashes, and ensures check transfers and withholding amounts behave correctly again.
Original PR description
In this commit: https://github.com/odoo/odoo/commit/2609fc2e38b8a82c773f27f910f2030b5d704633 We made the journal entry optional for payments. But this pr broke some flows for l10n_ar. This commit…
In this commit: https://github.com/odoo/odoo/commit/2609fc2e38b8a82c773f27f910f2030b5d704633 We made the journal entry optional for payments. But this pr broke some flows for l10n_ar. This commit will correct the following issues: - Domain where we check the posted state, the posted state don't exist anymore, we will adapt this by checking for in_progress and paid status. - Adding outstanding accounts on argentinian bank and cash journals. - Adding back the synchronisation of payment -> move for withholdings - Adding a check that we can't have a payment with a checks payment method that has no outstanding accounts - Fixing a traceback when the check has no name - When being in the payment wizard with check and withholding, a commit (https://github.com/odoo/odoo/commit/774d76682a72a786986bbcb70099c2a3be7a09d6) removed a dependency on the compute net amount which made the warning to never be displayed. - Check transfer wizard was not working anymore cause internal_transfer logic was removed. This commit reintroduce it, when being on a third party check and making a transfer it will create a first payment to reverse the check and a new one on the destination journal. - Correct the payment receipt traceback when trying to print it. task: 4204366 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Invoice reports now display the tax section correctly when an invoice uses a different currency and includes taxes. This prevents totals such as the untaxed amount from appearing in the wrong place, making printed or shared invoices clearer for customers and accounting teams.
Original PR description
If you have an invoice with a different currency, and with taxes, the layout of the Taxes box in company currency has a weird placement with the Untaxed Amount task-4269524 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes a crash that happened when users pressed Escape while transforming an image in the editor. Image editing now exits cleanly, improving reliability when adding or adjusting images in apps such as To-do.
Original PR description
### Steps to Reproduce: - Open the to-do app - Add an image (/image, upload an image) - Select the image - Click the Transform button - Press the Escape key, and a traceback occurs ### Desired behavior after PR is merged: - Clicking the image transform button in `toolbar` clears the image selection and enables the image transformation. - Removes the `active` class from the image transformation button. task-4184571
This fix ensures tax rounding differences are handled after negative or refund lines are matched, preventing small rounding adjustments from being lost or assigned incorrectly. It helps keep invoices, refunds, and related electronic reporting totals accurate in accounting workflows.
Original PR description
The method '_round_base_lines_tax_details' must be called after the dispatching of negative lines. Suppose a line has a delta due to round globally with price included taxes. Then this line is refunded completely by a line without a delta. The current delta is lost and probably should go to another line. task-id: 4261885 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Fixes an issue where documents added from a bill of materials line briefly appeared and then disappeared. The document visibility is now correctly set for bills of materials, so users can reliably attach and view related files in manufacturing workflows.
Original PR description
Since https://github.com/odoo/odoo/pull/176483, the product_document_kanban_controller methods have been modified but not in MRP. The same logic will be applied to mps. Before ------ When clicking on the document icon of a bom line, and then adding a document, the document whill shortly appear and then disappear because the visibility is not set on bom https://drive.google.com/file/d/1gXiqtU3zEoFP76ue2pk-0FHnf5MyRT-P/view After ----- The document visibility is set on 'bom' and the document is visible when added --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Fixed an issue where filtering payments could fail because the payment reference field name had changed. This keeps payment lists usable and prevents users from seeing an error when applying the affected filter.
Original PR description
`ref` field has been replaced by `memo` field in `account.payment` model. task-id: 4261127 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Customers can now add combo products from website shopping snippets without running into the wrong flow. The site opens the combo configurator as expected, helping shoppers complete purchases smoothly.
Original PR description
The "add to cart" and "products" snippets didn't handle combo products correctly. This fix opens the combo configurator when a combo product is added to the cart via one of those snippets. opw-4250695
The customer portal no longer offers sorting by stage or reference for quotations and sales orders, because those fields are not shown in the list. This avoids confusing choices and defaults the list to order date for a clearer customer experience.
Original PR description
Issue: - Customers could sort quotations and sale orders by stage and reference, which are not displayed in the list. Fix: - Remove sorting options for stage and reference, and default to sorting by order date. opw-4165724 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an error that could occur when opening vendor payments for Swiss companies and contacts. The Swiss localization now uses the updated payment note field, so users can access these payments without interruption.
Original PR description
**Steps to reproduce:** - Install l10n_ch - Switch to a Swiss company (e.g. CH Company) - Go to "Invoicing / Vendors / Payments" - Select a Swiss contact as vendor **Issue:** A traceback is raised while trying to access "ref" field of "account.payment" model. **Cause:** "ref" field has been replaced by "memo" field in "account.payment" model. opw-4244999 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Cancelling an unsent restaurant POS order no longer causes an error. This makes the checkout workflow smoother by ensuring draft orders can be cancelled reliably the first time.
Original PR description
Steps to reproduce : -------------------------- - Install the pos_restaurant module. - Add some products to order don't order them. - Try to cancel order from action button. Issue : -------- - There will be a traceback as it was trying to fetch & delete order from preparation display as well. - If you have never visited floor screen the order won't be synced and have string id so at the time of cancellation at first try it can't get order's int id and we have to again click on cancel order to delete it. Cause : -------- - The condition applied was now not relevant as structure of data changed. - The order was still not synced at backend so have temparary string id at time of action click. Fix : ----- - Changed condition as per the new structure. - Fetched data from backend at time of getting id to remove it.
Restaurant floor screens now clear paid floating orders after checkout. This prevents staff from seeing already completed orders as still active, reducing confusion during service.
Original PR description
Steps: - Open the restaurant. - Create a floating order and validate it. - Navigate to the floor screen. - Floating order is still displayed. Issue: - Floating orders remain visible on the floor screen after payment. Cause: - The selected order does not reset when order has no assigned table. Fix: - Reset the selected order for all restaurant orders. Task-4251902
Sales orders now show the warehouse field by default when a warehouse needs to be selected. This prevents users from getting blocked after creating a warehouse because the order could not be confirmed without one.
Original PR description
### Steps to reproduce: - Create a new company and select it - Create a SO for an Good and try to confirm > you raise a redirect warning to create a warehouse - Proceed and create a warehouse - Try to confirm the SO once more #### > Since the newly created warehouse was not set on the SO you raise a user Error: #### > 'You must set a warehouse on your sale order to proceed.' ### Issue: The 'warehouse_id' should be visible on the SO for it to be set but it is not. ### Cause of the issue: The field is actually present in the view as soon as your have 2 WH in your company: https://github.com/odoo/odoo/blob/73a62537c4010831cfab4be40f91dba9c56c2175/addons/sale_stock/views/sale_order_views.xml#L24 https://github.com/odoo/odoo/blob/73a62537c4010831cfab4be40f91dba9c56c2175/addons/stock/models/stock_warehouse.py#L321-L336 opw-4250791 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Removing a country from a company record no longer triggers an unexpected error. This improves reliability for users maintaining company information in accounting settings.
Original PR description
When the user removes the country from the company, a traceback will appear. Steps to reproduce the error: - Create a new company > Select any country > Save - Now, remove the country Traceback: ```…
When the user removes the country from the company,
a traceback will appear.
Steps to reproduce the error:
- Create a new company > Select any country > Save
- Now, remove the country
Traceback:
```
AttributeError: 'bool' object has no attribute 'lower'
File "odoo/http.py", line 2364, in __call__
response = request._serve_db()
File "odoo/http.py", line 1891, in _serve_db
return self._transactioning(
File "odoo/http.py", line 1954, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 137, in retrying
result = func()
File "odoo/http.py", line 1921, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2168, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 330, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 728, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 35, in call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 517, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "addons/web/models/models.py", line 1010, in onchange
if field_name not in done and snapshot0.has_changed(field_name)
File "addons/web/models/models.py", line 1123, in has_changed
return self[field_name] != self.record[field_name]
File "odoo/models.py", line 7000, in __getitem__
return self._fields[key].__get__(self)
File "odoo/fields.py", line 1287, in __get__
self.compute_value(recs)
File "odoo/fields.py", line 1469, in compute_value
records._compute_field_value(self)
File "addons/mail/models/mail_thread.py", line 427, in _compute_field_value
return super()._compute_field_value(field)
File "odoo/models.py", line 5243, in _compute_field_value
fields.determine(field.compute, self)
File "odoo/fields.py", line 109, in determine
return needle(*args)
File "addons/account/models/company.py", line 1014, in _compute_company_vat_placeholder
company.country_id.code.lower() or company.account_fiscal_country_id.code.lower()
```
https://github.com/odoo/odoo/blob/bc2106bfb401d98678fd9c727281bf20c1a0231e/addons/account/models/company.py#L1014
When the user removes the country, ``company.country_id.code`` will be False,
So, it will lead to the above traceback.
sentry-5996003549
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prChanging visible rows in the Master Production Schedule no longer resets the page filter. This keeps users in the expected schedule view, such as the products linked to a specific bill of materials, avoiding confusion and extra navigation.
Original PR description
Steps:
- create 2 boms:
-- bom_A: product_A with component_A
-- bom_B: product_B with component_B
- add all 4 products to the MPS
- go to bom_A and click on the 'Schedules' smart button, there should
only be 2 records (product_A & component_A)
- open the search dropdown menu and select a 'Rows' option
Issue:
When changing the rows to be shown in the MPS (e.g. Actual Demand),
OWL calls `write` directly via the orm on res.company because those
fields are set on res.company. This is due to 'company_service.js':
```js
if (!error && model === "res.company" && UPDATE_METHODS.includes(method)) {
if (!browser.localStorage.getItem("running_tour")) {
action.doAction("reload_context");
}
}
```
This cause the page to do a full refresh, which loses the domain.
Fix:
This fix makes it so that when changing the rows in the search menu,
OWL calls a specific function that will do the same job but without
the full reload, thus keeping the domain.Administrators can now access all quote calculator spreadsheet templates from the technical settings. This makes it easier to clean up unused templates or import templates from JSON files without cluttering the Sales app menus.
Original PR description
Currently, there's no menu to get a list of all quote calculator spreadsheet templates. This commits adds a menu in the technical settings. It allows to: - delete/clean unused spreadsheet templates - import a template from its json file (BA do that quite often for dashboards, I expect they'll want to do it for spreadsheet quotation templates) Feedback from OXP Note: we don't add the menu in the Sales app menus because we don't want to add noise in there. It must be kept clean. Task: 4236559
The product form no longer shows an empty Accounting page to users who do not have the relevant accounting read-only access. This removes confusion for sales users by only displaying the page when meaningful accounting information can be shown.
Original PR description
Steps: - Install sale app. - Go to sale module. - Open product form. - Go to accounting page. Issue: - Empty accounting page. Cause: - In account_accountant module added invoice group to display accounting page even though there is no content added in that module to display which should be visible without have account readonly access. Fix: - Remove invoice group for stable to display that page only for readonly group. To-do master: Remove that view. opw-4209850
This fixes Mexican electronic invoicing calculations so local taxes, withholdings, refunds, and rounding are handled more accurately. Global invoices are now calculated as a single invoice and block unsupported mixed-currency cases, reducing the risk of incorrect tax reporting or rejected documents.
Original PR description
- We used the wrong variable to compute the total of withholding taxes. - The subtotal must not include the local amounts. - According to the SAT, the local vat amounts/rate must be rounded to 2…
- We used the wrong variable to compute the total of withholding taxes. - The subtotal must not include the local amounts. - According to the SAT, the local vat amounts/rate must be rounded to 2 decimals. - Make the GI be computed as a big invoice instead of being an aggregator of CFDI This is more accurate regarding the purpose of the global invoice. Also, it allows to manage the local taxes on it without copy pasting the whole code in both the invoice itself and the aggregator for the global invoice. That way, we also fix a rounding issue when '_round_base_line_tax_details' is called on each invoice separately and not on the whole global invoice. By design, this case is fixed by this commit. - No multi-currency allowed in the global invoice Currently, the GI allows mixing multiple invoice having foreign currencies but we take the first encountered currency as reference. In this case, the whole GI is wrong. Also, it's not well defined how the global invoice is supposed to work in the global invoice and how the rate should be handled in that case. For those reasons, we prevent the user from creating a global invoice if any of the aggregated invoice has a foreign currency. - Improve the dispatching of negative lines. The scope of each aggregated document in the global invoice is well defined now. Each document tries to dispatch its negative lines on the current document first. Then, each refund tries to dispatch its remaining negative lines with the target document refunded by the refund. This way, we no longer needs to define prior documents when dispatching the negative lines. Before this commit, if you fail to dispatch the negative lines on the "prior document" being the refunded document, it should fail. - Fix the dispatching of negative lines when using round globally. The method '_round_base_lines_tax_details' must be called after the dispatching of negative lines. Suppose a line has a delta due to round globally with price included taxes. Then this line is refunded completely by a line without a delta. The current delta is lost and probably should go to another line. task-id: 4261885
Users can now confirm multiple assets at once even when those assets use different journals. This prevents an error during depreciation confirmation and helps accounting teams process assets in bulk reliably.
Original PR description
Reproduce: * create an asset * duplicate it, and change the journal * in list view, compute the depreciation * in list view, confirm Traceback because we try to get the lock date related to multiple journals.
Documents added from a bill of materials line now remain visible instead of briefly appearing and disappearing. This ensures teams using manufacturing and PLM can reliably attach and view documents where they expect them.
Original PR description
Since [odoo/pull/176483](https://github.com/odoo/odoo/pull/176483), the product_document_kanban_controller methods have been modified but in MRP. This commit fixes it. Before ------ When clicking on the document icon of a bom line, and then adding a document, the document whill shortly appear and then disappear because the visibility is not set on bom https://drive.google.com/file/d/1gXiqtU3zEoFP76ue2pk-0FHnf5MyRT-P/view The same logic applies to PLM After ----- The document visibility is set on 'bom' and the document is visible when added
Opening a point-of-sale session no longer fails when UrbanPiper API credentials have not been entered. This prevents unnecessary blocking for users who do not need or have not yet configured the UrbanPiper integration.
Original PR description
Before this commit: === - When attempting to open a session, when there is no API key and username in pos_config, a validation error occurred. After this commit: === - No validation error occurs when the API key and username are missing in pos_config. task-4266405
Signature request emails now use one selected language consistently across both the email layout and message content. This prevents recipients from seeing mixed-language emails and improves the professionalism of translated communications.
Original PR description
Before this commit, the language of the logged in user and the language given in kwargs would be used to translate the content. The email layout would translate to the user language and the body content would use the kwarg's language. This lead to translation discrepancies. After this commit, only the language given in the kwargs is used and therefore fixing the translations issues.
Signature request emails now use the selected recipient language consistently across both the email layout and message content. This prevents mixed-language emails and improves the experience for customers receiving documents to sign.
Original PR description
Before this commit, the language of the logged in user and the language given in kwargs would be used to translate the content. The email layout would translate to the user language and the body content would use the kwarg's language. This lead to translation discrepancies. After this commit, only the language given in the kwargs is used and therefore fixing the translations issues.
This fix prevents an error when generating Indian payroll payment reports by correctly processing multiple report entries. It improves reliability for payroll teams without changing the report’s intended behavior.
Original PR description
The issue occurred because `vals_list` is a list of dictionaries, and calling `get()` on it caused an AttributeError. Updated the logic to iterate over the list and properly handle each dictionary entry.
Signing-related emails now use the requested recipient language consistently across both the email layout and message content. This prevents mixed-language emails and provides a clearer experience for customers receiving documents to sign.
Original PR description
Before this commit, the language of the logged in user and the language given in kwargs would be used to translate the content. The email layout would translate to the user language and the body content would use the kwarg's language. This lead to translation discrepancies. After this commit, only the language given in the kwargs is used and therefore fixing the translation issues.
This fixes an issue where saving a document folder without a name could display an incorrect placeholder value. Users will now be prompted to enter a valid folder name before saving, improving clarity and data quality.
Original PR description
When we save the folder without a name, it shows 'False' because the field isn't set as 'required.' Making it mandatory will trigger a red alert on save, ensuring a valid name is entered. Task-4247496
Opening the backend appointment calendar from Point of Sale could fail because the system tried to read information that was not available. This fix adds a safeguard so users can open the view without encountering an error.
Original PR description
Issue: ========== - Modify the point of sale module manifest file as per the reference PR. Then, you get an error on runbot for accessing the tag value from null (check referenced PR runbot). Cause: ========== - When trying to open the backend appointment view in the point of sale, the current controller was not found. Consequently, the `_getCurrentAction()` method returns a null value, leading to an error when trying to access the tag value from null. FIX: ========== - We need to add a condition to avoid accessing a value from null. Related PR: Community: https://github.com/odoo/odoo/pull/181828 Enterprise: https://github.com/odoo/enterprise/pull/70891