Tuesday, November 27, 2018
3 changes · master
Enhancements to existing features
This update simplifies how product attribute information is included on eCommerce product pages. It makes the page structure easier to maintain and reduces the risk of future website display issues, especially in multi-website setups.
Original PR description
Historically, the `website_sale.product_attributes` was a customize option. That template became a normal view (removed customize_show attribute) with bbd2d0e42 As it is now a normal view, there is…
Historically, the `website_sale.product_attributes` was a customize option. That template became a normal view (removed customize_show attribute) with bbd2d0e42 As it is now a normal view, there is no reason left to be an xpath view and we can move itw code directly into the inherited template. That way, we can simplify the `website_sale_comparison.product_attributes_body` template that was doing a cross xpath (inheriting `website_sale.product` but xpathing a DOM element from `website_sale.product_attributes` which was also inheriting `website_sale.product`). Note that cross xpath was not working well with multi website but was fixed with 410c07283b Still, we should avoid doing cross xpath when possible (originally it was not possible since the view was a customize_show) as it is hard to grep DOM element to find possible breaking xpath when doing changes on DOM. This is the reason of this commit. 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
Resolved issues and error corrections
Translation synchronization now consistently chooses the most recent matching translation instead of relying on an unpredictable order. This reduces intermittent translation issues and makes related tests and user-facing translated content more reliable.
Original PR description
When synchronizing translations, the algorithm search for the translated terms without specifying an order. As a result, the translation terms are in an non deterministic order and the first one is chosen which might not be the latest. During the tests, this bug appeared from times to times during the rte_translation tour. One way to force it, is to order the translations by value descending. With this commit, the translations are ordered by id descending, as a consequence, the chosen translation will always be the latest.
The product form now only shows the Sales tab when a related sales or point of sale module is installed. This avoids showing an empty, irrelevant tab for businesses using products mainly for manufacturing, making the interface cleaner and less confusing.
Original PR description
Sales tab in product form will be visible only when sale module is installed. Task ID - 1893455 Description of the issue/feature this PR addresses: Task ID - https://www.odoo.com/web#id=1893455&action=327&model=project.task&view_type=form&menu_id=4720 Pad - https://pad.odoo.com/p/r.b9db5a93b7a2d0276533f9647c96d60f 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