Wednesday, December 4, 2024
12 changes · 17.0
Resolved issues and error corrections
Proforma invoice titles are now treated as complete phrases, so wording can appear in the correct order for each language. This improves invoice clarity for customers using translated documents, with only a minor risk for uncommon proforma title translations if modules are not updated together.
Original PR description
Currently the word "PROFORMA" was put before any invoice type title without considering the order of the total title, e.g. "PROFORMA Draft Invoice" instead of "Draft Proforma Invoice". Also this is a problem for translations, since other languages cannot change the order of the full title either. This commit makes the titles with "Proforma" as full terms that can be translated as a whole and reordered accordingly. It might break the translation of the title in case of proforma invoices when people would update the translations without updating the `account` module. Since it's an edge case and the "Proforma" titles shouldn't be used often, it's an acceptable limitation.
This fix prevents an unexpected error when stock rule logic is run without a selected location. Instead of crashing, the system now safely returns no matching stock rules, helping inventory workflows continue more reliably.
Original PR description
When `location_id` is None in `_get_rule` the line `while locations[-1].location_id` raises an IndexError. This commit fixes that by returning early with an empty recordset of stock.rule in case location_id is None. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Fixes an issue where opening replenishment information could show an error when a warehouse route was missing supplier warehouse details. Users can now view replenishment information reliably in this setup, avoiding disruption during inventory planning.
Original PR description
When the user clicks on replenishment information button, A traceback will appear. Steps to reproduce the error: - Install ``stock`` module - Create two warehouses: Warehouse A and Warehouse B - Go…
When the user clicks on replenishment information button,
A traceback will appear.
Steps to reproduce the error:
- Install ``stock`` module
- Create two warehouses: Warehouse A and Warehouse B
- Go to Warehouse B > Routes > Open any Route > Select Applicable On ``Products`` >
Supplied Warehouse: Warehouse A
- Go to Inventory > Operations > Replenishment > Create new >
Select Warehouse A > Select that Route > Save
- Click on ``i``(Replenishment Information) button
Traceback:
```
File "addons/stock/wizard/stock_replenishment_info.py", line 125, in _compute_lead_time
rule = self.env['procurement.group']._get_rule(record.product_id, record.location_id, {
File "addons/stock/models/stock_rule.py", line 567, in _get_rule
while locations[-1].location_id:
File "odoo/models.py", line 6985, in __getitem__
return self.browse((self._ids[key],))
IndexError: tuple index out of range
```
https://github.com/odoo/odoo/blob/dcf0880f836423ee82f3d283ffbf940a804bc13b/addons/stock/wizard/stock_replenishment_info.py#L121
Here, ``location_id`` is Empty because ``warehouse_id`` is empty.
``warehouse_id`` depends on ``supplier_wh_id`` which is not a required field.
so eventually ``location_id`` is empty.
so, it will lead to the above traceback at
https://github.com/odoo/odoo/blob/dcf0880f836423ee82f3d283ffbf940a804bc13b/addons/stock/models/stock_rule.py#L558
sentry-6107032569
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update fixes an issue where the Accounting module wasn't usable for companies without a chart of accounts template. Now, certain fields are hidden by default, simplifying partner creation and ensuring a smoother experience for users. This change improves usability and avoids unnecessary requirements.
Original PR description
When having Accounting installed with a company without chart template, we can not create a partner as bot `property_account_payable_id` and `property_account_receivable_id` are required. With ff54822738925d5b5b952520bbfbd4a76c876809 we add a non stored computed field to handle the `required` attribute on partner view. We use this field to make the `Accounting Entries` group invisble when it is not needed. opw-4323694 Forward-Port-Of: odoo/enterprise#74994
Features or functions removed from Odoo
This change removes a button that allowed users to reboot the IoT Box. This was required by LNE Certification to ensure consistent and scalable certification processes. The button has been removed from the IoT Box form view.
Original PR description
LNE Certification (scales certification) requires not to be able to reboot the IoT Box with a simple button. We removed it from the IoT Box form view. Community PR: [https://github.com/odoo/odoo/pull/189467](https://github.com/odoo/odoo/pull/189467) Task: 4345731
Miscellaneous changes
In some business case when the invoice is done before the receipt, the `stock.valuation.layer` currency rate will be taken on the bill rather than the current date. To reproduce the issue: (Need account_accountant) 1. Create a product category PC - Costing method: FIFO - Inventory valuation: Automated 2. Create a product P - Type: Storable - Category: PC 3. On 10/11/2024, confirm a PO with 1 x P at Є10 4. On 11/11/2024, bill it with currency rate of 1.06 at $10.6 4. On 1
Original PR description
In some business case when the invoice is done before the receipt, the `stock.valuation.layer` currency rate will be taken on the bill rather than the current date. To reproduce the issue: (Need account_accountant) 1. Create a product category PC - Costing method: FIFO - Inventory valuation: Automated 2. Create a product P - Type: Storable - Category: PC 3. On 10/11/2024, confirm a PO with 1 x P at Є10 4. On 11/11/2024, bill it with currency rate of 1.06 at $10.6 4. On 12/11/2024, receive P with currency rate of 1.07 at $10.7 Errors: The price SVL is different from the bill Solution: Use currency rate at bill date rather than the current date when invoice before receipt --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#187015
When having Accounting installed with a company without chart template, we can not create a partner as bot `property_account_payable_id` and `property_account_receivable_id` are required. With this commit we add a non stored computed field to handle the `required` attribute on the partner view. Note: a computed field with an `api.depends_context('company')` could no be used, because it wasn't not triggered at partner creation. It's a known ORM limitation. opw-4323694 Forward-Port-Of
Original PR description
When having Accounting installed with a company without chart template,
we can not create a partner as bot `property_account_payable_id` and
`property_account_receivable_id` are required.
With this commit we add a non stored computed field to handle the
`required` attribute on the partner view.
Note: a computed field with an `api.depends_context('company')` could no be used, because it wasn't not triggered at partner creation. It's a known ORM limitation.
opw-4323694
Forward-Port-Of: odoo/odoo#189341Steps to reproduce: - Open the Notes App. - Type some content in the document. - On a new line, insert a table. - Resize the table so there is blank space on its right side. - Select some content and the entire table, ensuring the mouse pointer ends up in the blank space on the right side of the table. - Press `Ctrl + C` - A traceback error occurs. Description of the issue/feature this PR addresses: When selecting content with mouse and ending pointer in empty space to right of a
Original PR description
Steps to reproduce: - Open the Notes App. - Type some content in the document. - On a new line, insert a table. - Resize the table so there is blank space on its right side. - Select some content and the entire table, ensuring the mouse pointer ends up in the blank space on the right side of the table. - Press `Ctrl + C` - A traceback error occurs. Description of the issue/feature this PR addresses: When selecting content with mouse and ending pointer in empty space to right of a table, pressing Ctrl+C triggers `_onClipboardCopy`. It tries to clone the closest element of endContainer as a table, but if `closestElement` is not a table, it causes a traceback. Desired behavior after PR is merged: The traceback no longer occurs when copying a selection near a table. task-4357182 Forward-Port-Of: odoo/odoo#188758
**Description of the issue/feature this PR addresses:** To quote [the Odoo documentation](https://www.odoo.com/documentation/16.0/applications/websites/website/configuration/recaptcha.html?highlight=recaptcha): > All pages using the Form, Newsletter Block, Newsletter Popup snippets, and the eCommerce Extra Step During Checkout form are now protected by reCAPTCHA. However, it's still possible for a bot to register itself to free events, as it doesn't have to go through the checkout p
Original PR description
**Description of the issue/feature this PR addresses:**
To quote [the Odoo documentation](https://www.odoo.com/documentation/16.0/applications/websites/website/configuration/recaptcha.html?highlight=recaptcha):
> All pages using the Form, Newsletter Block, Newsletter Popup snippets, and the eCommerce Extra Step During Checkout form are now protected by reCAPTCHA.
However, it's still possible for a bot to register itself to free events, as it doesn't have to go through the checkout process.. and cause quite a mess.
This commits adds a recaptcha to the new registrations form.
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#186991Steps to reproduce ================== - Click on an invoice - Register a payment where the amount exceeds the invoice amount - Switch to another invoice with the same customer - Switch the active notebook to "Journal Items" - Click on "Outstanding credits" => You are redirected to the homepage Cause of the issue ================== Before 16.0, it used to be possible to click on a link where the target is inside another notebook. In that case, the notebook was switched before s
Original PR description
Steps to reproduce ================== - Click on an invoice - Register a payment where the amount exceeds the invoice amount - Switch to another invoice with the same customer - Switch the active notebook to "Journal Items" - Click on "Outstanding credits" => You are redirected to the homepage Cause of the issue ================== Before 16.0, it used to be possible to click on a link where the target is inside another notebook. In that case, the notebook was switched before scrolling to the anchor. With owl, it is no longer possible to query where the target is as the DOM inside other notebooks is not yet rendered before switching to them. Solution ======== If the anchor is visible, the link will work as intended, otherwise, the redirection to the homepage will be prevented opw-4344125 Forward-Port-Of: odoo/odoo#188479
Release notes: https://github.com/odoo/owl/releases/tag/v2.5.2 Forward-Port-Of: odoo/odoo#189410
Original PR description
Release notes: https://github.com/odoo/owl/releases/tag/v2.5.2 Forward-Port-Of: odoo/odoo#189410
Use the Safari browser (MacOS or iOS): - Open a record (e.g. a SO); - Go to an external website (e.g. [www.google.com](http://www.google.com/)); - Return to the record using the browser's back button; Before this commit, the editable fields were not rendered correctly (in the SO example, the delivery address, the invoicing address were empty). This is because Safari used the `bfcache` to restore the page, but Odoo wasn't designed to be compatible with this cache. Now, when the `bfcac
Original PR description
Use the Safari browser (MacOS or iOS): - Open a record (e.g. a SO); - Go to an external website (e.g. [www.google.com](http://www.google.com/)); - Return to the record using the browser's back button; Before this commit, the editable fields were not rendered correctly (in the SO example, the delivery address, the invoicing address were empty). This is because Safari used the `bfcache` to restore the page, but Odoo wasn't designed to be compatible with this cache. Now, when the `bfcache` is used to restore a page, we reload the current page, to be sure that all the elements have been rendered correctly. Note that, a similar issue has been solved similarly in [1]. [1]: https://github.com/odoo/odoo/commit/fd0c2a18ac469239fe5d9c837f2fee8aa33f846b task-4281443 Forward-Port-Of: odoo/odoo#187854