Thursday, December 5, 2024
2 changes · saas-17.4
Resolved issues and error corrections
This update brings Odoo’s spreadsheet component up to the latest maintenance version and fixes several issues affecting spreadsheet interactions. It improves reliability for action buttons, sheet naming, and pivot-related calculations, helping users avoid errors in day-to-day spreadsheet work.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/9b13f22de [REL] 17.4.15 Task: 0 https://github.com/odoo/o-spreadsheet/commit/992622618 [FIX] action button: use nextProps instead of this.props Task: 0 https://github.com/odoo/o-spreadsheet/commit/06b13c9fd [FIX] helpers: Add generic helper to sanitize sheet names Task: 4347719 https://github.com/odoo/o-spreadsheet/commit/094335658 [FIX] pivot: handle boolean-like function arguments in `getPivotCellFromPosition` Task: 4207502 Co-authored-by: Anthony Hendrickx (anhe) <anhe@odoo.com> Co-authored-by: Alexis Lacroix (laa) <laa@odoo.com> Co-authored-by: Lucas Lefèvre (lul) <lul@odoo.com> Co-authored-by: Dhrutik Patel (dhrp) <dhrp@odoo.com> Co-authored-by: Adrien Minne (adrm) <adrm@odoo.com> Co-authored-by: Mehdi Rachico (mera) <mera@odoo.com> Co-authored-by: Rémi Rahir (rar) <rar@odoo.com> Co-authored-by: Pierre Rousseau (pro) <pro@odoo.com> Co-authored-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
Fixes an issue where imported pricelists could ignore percentage markups on cost-based pricing rules. This ensures sales quotations use the intended marked-up prices after pricelists are exported and re-imported.
Original PR description
Versions -------- - saas-17.4+ Steps ----- 1. Create a pricelist; 2. add a rule using a cost-based formula; 3. add a 50% markup; 4. export pricelist, then delete or archive it; 5. import pricelist;…
Versions -------- - saas-17.4+ Steps ----- 1. Create a pricelist; 2. add a rule using a cost-based formula; 3. add a 50% markup; 4. export pricelist, then delete or archive it; 5. import pricelist; 6. use pricelist on a quotation. Issue ----- The markup isn't applied. Cause ----- Commit 06d0053763cd added the `price_markup` field to `product.pricelist.item`. Whenever the markup is set/changed, the `price_discount` field is supposed to get set to its negative value. Currently this only happens in an `onchange` method, which does not get called during import: https://github.com/odoo/odoo/blob/9905de54a55b6d77f67772dde7b2d0ea21adaff1/addons/product/models/product_pricelist_item.py#L322-L325 The value of `price_discount` is what eventual price calculations are based on, so if this isn't updated along with `price_markup`, any price mark-up gets ignored. Solution -------- Ensure `price_markup` & `price_discount` are consistent with each other on using `_compute_price_markup` and `_inverse_price_markup`. opw-4282087