Thursday, December 23, 2021
5 changes · master
Enhancements to existing features
Sales-related apps were aligned with updated pricelist behavior, helping prices stay consistent across rentals, subscriptions, and field service sales. Rental order lines were also corrected so discounts are not applied when they should not be, reducing billing surprises.
Original PR description
Community PR: https://github.com/odoo/odoo/pull/79605
Resolved issues and error corrections
Creating a new resource from the Planning schedule no longer triggers a recursion error that could interrupt the workflow. This helps users schedule work by resource without encountering an unexpected crash.
Original PR description
Maximum recursion depth traceback occurs when the resource is created from planning.
This has been fixed.
Reproducing steps:
- Planning
- Schedule by Resource
- Create new Resource
The issue occurs from this commit -https://github.com/odoo/odoo/commit/18952cdc76070f2a70789f2fa25e4fa0d546d470Code cleanup and technical improvements
This update streamlines how Odoo calculates product and sales prices, reducing hidden assumptions that could lead to inconsistent results. It improves maintainability across sales, products, point of sale, events, expenses, and repairs, making future pricing changes safer and easier to customize.
This update corrects visual problems in the online shop product grid that affected Firefox, Safari, and ribbon labels across browsers. Customers should now see properly aligned product cards, correctly placed ribbons, and consistent product image proportions, improving the shopping experience.
Original PR description
Description of the issue/feature this PR addresses: Bugfix Current behavior before PR: * /shop is broken on Firefox * Ribbon are broken (on all browsers). Desired behavior after PR is merged: No more bugs -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The Sign green savings report now keeps its layout intact when printed as a PDF, even when large values are shown. The report design was also refreshed with updated icons, making it clearer and more polished for users.
Original PR description
In the green savings report from sign, the current css breaks the layout when showing large values in the printed form. Since printing the css uses wkhtmltopdf, most modern css can't be used. This PR fixes the layout by decreasing the static width of the cards and aligning them vertically. task-2661095
Original PR description
Refactor the whole sale price computation logic in `product` & `sale` to improve code quality, maintainability, ... ### Drop/reduce as much as possible context-based logic * Drop magic `price` and…
Refactor the whole sale price computation logic in `product` & `sale` to improve code quality, maintainability, ... ### Drop/reduce as much as possible context-based logic * Drop magic `price` and `pricelist_id` fields on `product.product`/`product.template` * Keep one unique `_get_contextual_price()` to provide the old logic where it's still needed/difficult to remove atm. * Do not rely on context fallbacks on the lower level of price computation (aka `price_compute` method) It is way too dangerous to have such magic fallbacks so deeply in the logic, inducing potentially unexpected/wrong results ### Clean `product.pricelist` API * Clear parameters and fallbacks * Do not provide unused parameter(s) anymore (`partner`) * Stop providing products & quantities as a list of tuples, it was never used with different quantities in the existing code anyway * Removed unused methods * Split methods logic to ease and allow clean overrides and customizations * Convert the old hardcoded SQL query to a clear domain, using ORM querying and formatting logic instead * Improved documentation (docstrings, ...) ### Side cleanups in related/impacted modules * Update to use the new clean pricelist API * Code cleanup in sale prices computation (`sale_*`, `website_sale`, ...) * Some onchanges -> computes conversion in `sale_*` scope * Cache applied pricelist rule on SOL (avoid recomputing the pricelist rule in the price AND in the discount computation) Task ID - 2688106 Community PR: https://github.com/odoo/odoo/pull/79605 Enterprise PR: https://github.com/odoo/enterprise/pull/22211 <!-- Keep both authorship for the merge commit (author=robodoo) --> Co-authored-by: Victor Feyens <vfe@odoo.com> Co-authored-by: Yannick Tivisse <yti@odoo.com> -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr