Wednesday, December 4, 2024
4 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