Daily updates from Odoo
Wednesday, June 12, 2024
21 changes · saas-17.2
New functionality added to Odoo
New US databases will automatically include key accounting and compliance tools such as US reports, 1099 reporting, check layouts, NACHA payments, and Avatax. This helps new users start with the expected US localization setup without manually finding and installing each related app.
Original PR description
[ADD] l10n_us_account: Auto load the localization pack and related reports automatically Problem: Users, especially newer ones, don't have the experience; or don't know how to install modules…
[ADD] l10n_us_account: Auto load the localization pack and related reports automatically Problem: Users, especially newer ones, don't have the experience; or don't know how to install modules manually to their database. This will create the incorrect idea that Odoo doesn't fulfill the minimum requirements to operate in the US. - Examples of those uninstalled requirements are ABA routing for payments, correct layout for checks, 1099 reports, and Avatax for tax calculation. Desired behavior:- Auto load the following when creating odoo US database - US Accounting: l10n_us_account - United States Localization: l10n_us - US Accounting Reports: l10n_us_reports - 1099 Reporting: l10n_us_1099 - US Checks Layout: l10n_us_check_printing - NACHA Payments: l10n_us_payment_nacha - Avatax: account_avatax Solution: Create new module l10n_us_account to separate the accounting dependent stuff and auto load it and l10n_us which is going to load the mentioned packages above for US-db. Task-3865230 Enterprise PR: https://github.com/odoo/enterprise/pull/60644 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Resolved issues and error corrections
Duplicating website pages now gives each copy a unique internal identifier, preventing errors when users open or edit the original or duplicated pages. This improves reliability for website managers who create pages by copying existing ones.
Original PR description
When a user duplicates a view of a website page and then attempts to open either the original or duplicated view and click on ``edit``, a traceback will appear. Steps to reproduce: - Install the…
When a user duplicates a view of a website page and then attempts to open either the original or duplicated view and click on ``edit``, a traceback will appear. Steps to reproduce: - Install the ``website`` module - Website > Site > Pages - Create one new page > Actions > Duplicate - Repeat 2-3 times - Click on the newly created page or a duplicated one > ``Edit`` Traceback : - ``Expected singleton: ir.ui.view(2224, 2225)`` When duplicating a website page view, we encounter an issue where the ``key`` value remains unchanged, leading to an error. This occurs because, after calling the super in the ``copy_data`` method, the ``key`` is already set on the fields that are being copied to the new record, and ``website.page`` delegates some of its fields to the ``ir.ui.view`` that it holds. This commit will fix the above error by calling the ``copy`` method instead of ``copy_data``. sentry - 4991676595 opw-3936237 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Manufacturing orders now keep component quantities that users manually enter instead of recalculating them from the bill of materials when using Produce All. This prevents unexpected changes to recorded material consumption and helps keep production records accurate.
Original PR description
### Steps to reproduce: - Create a product FP with a BOM consuming 1 unit of a product COMP - Create and confirm a MO for 1 unit of FP using the BOM - Set the consumed quantity of COMP to 2 and tick…
### Steps to reproduce: - Create a product FP with a BOM consuming 1 unit of a product COMP - Create and confirm a MO for 1 unit of FP using the BOM - Set the consumed quantity of COMP to 2 and tick consumed - Save and "Produce All" #### > the consumed quantity of COMP was updated to 1 according to the BOM ### Cause of the issue: Clicking on "Produce All" will trigger the `pre_button_mark_done` that will update the qty_producing according to the bom proportions because of these lines: https://github.com/odoo/odoo/blob/86f977f8f4b9859790ad77af3a40234c8eb374e9/addons/mrp/models/mrp_production.py#L1217-L1227 However, this update should be bypassed if the quantity was set on the move. This is the role of these lines: https://github.com/odoo/odoo/blob/86f977f8f4b9859790ad77af3a40234c8eb374e9/addons/mrp/models/mrp_production.py#L1218-L1220 The issue does not appear in 17.0 because, thanks to commit https://github.com/odoo/odoo/commit/5bb0f96f1973fa7e19b6701944b4a29577f3314f the `manual_consumption` field of the stock moves related to a manufacturing order is set to be True as soon as the quantity is changed because of these lines: https://github.com/odoo/odoo/blob/9a11717c17b860ec2f1b2e228517c0d3945c474a/addons/mrp/static/src/widgets/mrp_consumed.js#L25-L27 However, this js file was removed in saas-17.2 by commit https://github.com/odoo/odoo/commit/e143345193577442ffd1f46272a09d7a5801d567. opw-3934942 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Signatures now keep their intended size on high-resolution displays, including 4K screens with scaling enabled. Automatically generated signatures are also better centered, making signed documents look more consistent and professional.
Original PR description
Before this commit, when a 4K screen was used with devicePixelRatio > 1, the signature svg size was divided by the devicePixelRatio value. We would have small automatic signature shrinked. taskid: 3971056 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an issue where website live chat replies could fail for visitors whose browser language was not installed in the database. Notifications are now sent without depending on the visitor's session language, so operators' responses reach guests reliably.
Original PR description
Use case: On a database that has only the "English (US)" (`en_US`) language installed, 1. A visitor having set his browser prefered language to `fr_FR` browse the website, open the livechat and ask a question. 2. A livechat operator pick-up and respond 3. The visitor never see the reponse On the server we see an error: ```odoo.addons.bus.websocket: Invalid language code: fr_FR``` That crash prevent sending the operator response back to the guest (website visitor). As we don't need the language at all to dispatch bus notification, set it to `None`. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
Modules related to multiple countries are historically named without `l10n_` prefix. Also, it is not always linked to the country but just used for the `auto_install` feature like in `account_reports_cash_basis` for instance, where we don't want to make it sound like a localization feature. Forward-Port-Of: odoo/odoo#163730
Original PR description
Modules related to multiple countries are historically named without `l10n_` prefix. Also, it is not always linked to the country but just used for the `auto_install` feature like in `account_reports_cash_basis` for instance, where we don't want to make it sound like a localization feature. Forward-Port-Of: odoo/odoo#163730
This traceback arises when the user tries to remove the Batch Limit value and test the imported file. To reproduce this issue: 1) Import a file with large data in any module 2) You see the Batch limit at the left side pannel 3) Remove the default "Batch Limit" value 4) Test the file 5) A traceback will encountered Error:- ``` TypeError: '<' not supported between instances of 'int' and 'str' ``` when the user removes the default batch limit its value will be an empty string.
Original PR description
This traceback arises when the user tries to remove the Batch Limit value and test the imported file. To reproduce this issue: 1) Import a file with large data in any module 2) You see the Batch…
This traceback arises when the user tries to remove the Batch Limit value and test the imported file.
To reproduce this issue:
1) Import a file with large data in any module
2) You see the Batch limit at the left side pannel
3) Remove the default "Batch Limit" value
4) Test the file
5) A traceback will encountered
Error:-
```
TypeError: '<' not supported between instances of 'int' and 'str'
```
when the user removes the default batch limit its value will be an empty string.
You can see in [1] that parseFloat('') is "NaN" so it directly assigns the limit as the value which is an empty string.
[1]
https://github.com/odoo/odoo/blob/2c40a55232fb501dd70b64f7ddbdc4244f365139/addons/base_import/static/src/import_data_sidepanel/import_data_sidepanel.js#L34-L36
which leads to a traceback when a comparison is done between int and str.
https://github.com/odoo/odoo/blob/106c343027e3bab1c94c414f30e914cf673cceec/odoo/models.py#L1318-L1319
After applying this commit will resolve the issue of getting an int value instead of a str.
sentry-5298904064
Forward-Port-Of: odoo/odoo#167323This only adds an id to the div containing the date in the order receipt so that it can be xpath easily in the enterprise PR. Enterprise PR: odoo/enterprise#63966 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168270
Original PR description
This only adds an id to the div containing the date in the order receipt so that it can be xpath easily in the enterprise PR. Enterprise PR: odoo/enterprise#63966 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168270
This commit implements two changes to prevent search engines from crawling and indexing content on websites marked as neutralized: - Robots.txt update: The robots.txt field in the website database is updated with a rule disallowing all crawling (User-agent: * \n Disallow: /). - Robots meta tag injection: An XPath expression is used to inject a robots meta tag with content="noindex, nofollow" within the web.neutralize_banner view's <head> section. These combined changes ensure a strong sig
Original PR description
This commit implements two changes to prevent search engines from crawling and indexing content on websites marked as neutralized: - Robots.txt update: The robots.txt field in the website database is updated with a rule disallowing all crawling (User-agent: * \n Disallow: /). - Robots meta tag injection: An XPath expression is used to inject a robots meta tag with content="noindex, nofollow" within the web.neutralize_banner view's <head> section. These combined changes ensure a strong signal to search engines to not index neutralized databases. task-3895772 Forward-Port-Of: odoo/odoo#167963
Before, we could not send any simplified invoice for Bizkaia, because it would give error B4_2000026: "Las Claves indicadas no son compatibles". En las validaciones dice que "Las claves 51 y 52 sólo son compatibles entre sí" But normally we send 01 and 52 in case of a simplified invoice. By removing the 52 however, we see that we can send the simplified invoice. Also, elsewhere in the XML, it is already clearly indicated that the invoice is simplified anyways. So, the simple fix for n
Original PR description
Before, we could not send any simplified invoice for Bizkaia, because it would give error B4_2000026: "Las Claves indicadas no son compatibles". En las validaciones dice que "Las claves 51 y 52 sólo son compatibles entre sí" But normally we send 01 and 52 in case of a simplified invoice. By removing the 52 however, we see that we can send the simplified invoice. Also, elsewhere in the XML, it is already clearly indicated that the invoice is simplified anyways. So, the simple fix for now is to remove the 52 key if the agency is Bizkaia opw-3938800 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#167566
Steps to reproduce ================== - Install mrp - Enable debug mode - Go to products - Open the "Acoustics Bloc Screens" form - Click on the "Forecasted" smart button - Click on the debug icon > "View access rights" A traceback occurs when evaluating the domain Cause of the issue ================== ir.actions.client is supposed to be a string but is an id in this case. `ir.model.search([["model", "=", action.res_model]])` returns nothing. [0] --- [0]: https://gith
Original PR description
Steps to reproduce ================== - Install mrp - Enable debug mode - Go to products - Open the "Acoustics Bloc Screens" form - Click on the "Forecasted" smart button - Click on the debug icon > "View access rights" A traceback occurs when evaluating the domain Cause of the issue ================== ir.actions.client is supposed to be a string but is an id in this case. `ir.model.search([["model", "=", action.res_model]])` returns nothing. [0] --- [0]: https://github.com/odoo/odoo/blob/c07181b20bf4f06b783136ffdb3b7a304be6b136/addons/web/static/src/webclient/actions/debug_items.js#L147 opw-3955762 Forward-Port-Of: odoo/odoo#168498
Since early June 2024, on new individual accounts, Stripe validates Indian mandate parameters even if they are irrelevant (e.g. mandates are not needed and won't be created). This prevents payments not compatible with Indian mandates from being made, like those made with MXN currency. With this fix, mandate parameters will be sent only if the payment's currency is supported by Indian mandates. Note: Accounts created before June 2024 or accounts linked to a platform created before June 2024
Original PR description
Since early June 2024, on new individual accounts, Stripe validates Indian mandate parameters even if they are irrelevant (e.g. mandates are not needed and won't be created). This prevents payments not compatible with Indian mandates from being made, like those made with MXN currency. With this fix, mandate parameters will be sent only if the payment's currency is supported by Indian mandates. Note: Accounts created before June 2024 or accounts linked to a platform created before June 2024 that have already used mandates are not affected by this bug. opw-3946505 Forward-Port-Of: odoo/odoo#168760 Forward-Port-Of: odoo/odoo#168465
Due to Stripe sending multiple confirmations regarding authorized payment, multiple mails were send to customer that their payment was succesful, now only transactions that were not processed yet result in mail sending. opw-3967807 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168298
Original PR description
Due to Stripe sending multiple confirmations regarding authorized payment, multiple mails were send to customer that their payment was succesful, now only transactions that were not processed yet result in mail sending. opw-3967807 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168298
This commit just add a new tour method used in another commit opw-3902869 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168335 Forward-Port-Of: odoo/odoo#168150
Original PR description
This commit just add a new tour method used in another commit opw-3902869 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168335 Forward-Port-Of: odoo/odoo#168150
Steps to reproduce: - Install "Time Off" and `l10n_be` - "Time Off" -> "Reporting" -> "by Type" - Unselect the company with the time off Issues: All the time off will be shown, company selection will not be taken into account. This is due to a missing security rules. opw-3954393 Forward-Port-Of: odoo/odoo#168516
Original PR description
Steps to reproduce: - Install "Time Off" and `l10n_be` - "Time Off" -> "Reporting" -> "by Type" - Unselect the company with the time off Issues: All the time off will be shown, company selection will not be taken into account. This is due to a missing security rules. opw-3954393 Forward-Port-Of: odoo/odoo#168516
opw-3863382 Forward-Port-Of: odoo/odoo#168755
Original PR description
opw-3863382 Forward-Port-Of: odoo/odoo#168755
KBC has been added to Mollie. Cards support refund. Refund is now checked based on payment method refund support, not brand. "Cleared" mapping has been added to done state in PayPal in order to properly support echeck. opw-3880431 Forward-Port-Of: odoo/odoo#162837
Original PR description
KBC has been added to Mollie. Cards support refund. Refund is now checked based on payment method refund support, not brand. "Cleared" mapping has been added to done state in PayPal in order to properly support echeck. opw-3880431 Forward-Port-Of: odoo/odoo#162837
With an IT Company setup but without the withholding module: - Set fiscal position to split payment - Set tax on product to SP type tax - Click send and print to generate XML Error: XML generation is blocked with message "Invoices must have exactly one VAT tax set per line" This occurs because the system find 2 VAT taxes, but only the positive one should count for the validation Ticket [link](https://www.odoo.com/web#model=project.task&id=3945046) opw-3945046 Forward-Port-Of: odoo
Original PR description
With an IT Company setup but without the withholding module: - Set fiscal position to split payment - Set tax on product to SP type tax - Click send and print to generate XML Error: XML generation is blocked with message "Invoices must have exactly one VAT tax set per line" This occurs because the system find 2 VAT taxes, but only the positive one should count for the validation Ticket [link](https://www.odoo.com/web#model=project.task&id=3945046) opw-3945046 Forward-Port-Of: odoo/odoo#166893
The project sharing search view is inheriting the wrong base search view (instead of inheriting `view_task_search_form_project_base`, it should be inheriting `view_task_search_form_base`), which causes some fields and filters to be visible in project sharing when they shouldn't. This commit makes those fields and filters invisible for portal users. Task-3978479 Forward-Port-Of: odoo/odoo#168761 Forward-Port-Of: odoo/odoo#168523
Original PR description
The project sharing search view is inheriting the wrong base search view (instead of inheriting `view_task_search_form_project_base`, it should be inheriting `view_task_search_form_base`), which causes some fields and filters to be visible in project sharing when they shouldn't. This commit makes those fields and filters invisible for portal users. Task-3978479 Forward-Port-Of: odoo/odoo#168761 Forward-Port-Of: odoo/odoo#168523
Since Commit 4c58d82c7e582c11eb967b6ed7c918a6da3ebd23 refactored `test_delivery_ui`, the check for the `payment_custom` module was moved to individual tests, however, the new `setUpClass` function now uses code that requires `payment_custom` and fails when the server tries to run tests. Solution: Move the initialization of `transfer_provider` to the individual tests instead of within the setup function. opw-3957075 Forward-Port-Of: odoo/odoo#168792
Original PR description
Since Commit 4c58d82c7e582c11eb967b6ed7c918a6da3ebd23 refactored `test_delivery_ui`, the check for the `payment_custom` module was moved to individual tests, however, the new `setUpClass` function now uses code that requires `payment_custom` and fails when the server tries to run tests. Solution: Move the initialization of `transfer_provider` to the individual tests instead of within the setup function. opw-3957075 Forward-Port-Of: odoo/odoo#168792
This traceback arises when the user tries to create a new journal from the payment. To reproduce this issue: 1) Install `accounting` 2) Create a new payment from `Accounting/vendors/payments` 3) save the record and now remove the `journal` or make the `journal` field empty 5) A traceback arises. Error:- ``` KeyError: ('res.company', <function Company.__accessible_branches at 0x7fabdfc69c60>, (1,), False, 2) File "odoo/tools/cache.py", line 99, in lookup r = d[key] File
Original PR description
This traceback arises when the user tries to create a new journal from the payment. To reproduce this issue: 1) Install `accounting` 2) Create a new payment from `Accounting/vendors/payments` 3) save…
This traceback arises when the user tries to create a new journal from the payment.
To reproduce this issue:
1) Install `accounting`
2) Create a new payment from `Accounting/vendors/payments`
3) save the record and now remove the `journal` or make the `journal` field empty
5) A traceback arises.
Error:-
```
KeyError: ('res.company', <function Company.__accessible_branches at 0x7fabdfc69c60>, (1,), False, 2)
File "odoo/tools/cache.py", line 99, in lookup
r = d[key]
File "<decorator-gen-8>", line 2, in __getitem__
File "odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "odoo/tools/lru.py", line 34, in __getitem__
a = self.d[obj]
ValueError: not enough values to unpack (expected 1, got 0)
File "odoo/models.py", line 5941, in ensure_one
_id, = self._ids
ValueError: Expected singleton: res.company()
File "odoo/http.py", line 2251, in __call__
response = request._serve_db()
File "odoo/http.py", line 1826, in _serve_db
return self._transactioning(_serve_ir_http, readonly=ro)
File "odoo/http.py", line 1847, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1824, in _serve_ir_http
return self._serve_ir_http(rule, args)
File "odoo/http.py", line 1832, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2057, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 222, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 740, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 34, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 30, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 458, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "addons/web/models/models.py", line 1074, in onchange
todo = [
File "addons/web/models/models.py", line 1077, in <listcomp>
if field_name not in done and snapshot0.has_changed(field_name)
File "addons/web/models/models.py", line 1190, in has_changed
return self[field_name] != self.record[field_name]
File "odoo/models.py", line 6664, in __getitem__
return self._fields[key].__get__(self, self.env.registry[self._name])
File "odoo/fields.py", line 1138, in __get__
self.recompute(record)
File "odoo/fields.py", line 1353, in recompute
apply_except_missing(self.compute_value, recs)
File "odoo/fields.py", line 1326, in apply_except_missing
func(records)
File "odoo/fields.py", line 1375, in compute_value
records._compute_field_value(self)
File "addons/mail/models/mail_thread.py", line 416, in _compute_field_value
return super()._compute_field_value(field)
File "odoo/models.py", line 4982, in _compute_field_value
fields.determine(field.compute, self)
File "odoo/fields.py", line 102, in determine
return needle(*args)
File "addons/account/models/account_payment.py", line 369, in _compute_reconciliation_status
liquidity_lines, counterpart_lines, writeoff_lines = pay._seek_for_lines()
File "addons/account/models/account_payment.py", line 192, in _seek_for_lines
if line.account_id in self._get_valid_liquidity_accounts():
File "addons/account/models/account_payment.py", line 211, in _get_valid_liquidity_accounts
accessible_branches = journal_comp.with_company(journal_comp)._accessible_branches()
File "odoo/addons/base/models/res_company.py", line 420, in _accessible_branches
return self.browse(self.__accessible_branches())
File "<decorator-gen-107>", line 2, in __accessible_branches
File "odoo/tools/cache.py", line 104, in lookup
value = d[key] = self.method(*args, **kwargs)
File "odoo/addons/base/models/res_company.py", line 402, in __accessible_branches
self.ensure_one()
File "odoo/models.py", line 5944, in ensure_one
raise ValueError("Expected singleton: %s" % self)
```
When the user removes the journal, the company ID is taken from the journal, which leads to a traceback from the line below.
https://github.com/odoo/odoo/blob/53d6d795ddf6cc9e470bfeb48bb31bc728acedbe/addons/account/models/account_payment.py#L207-L208
After applying this commit, resolve this issue by taking the default company,
when there is no journal.
sentry-5054332731
Forward-Port-Of: odoo/odoo#169048
Forward-Port-Of: odoo/odoo#157337