Conversation
…duct page The product page already shows the brand logo (added in OCA#1267), linking to the brand landing page. This adds the option to show the brand's website description there as well, right below the product description. It is opt-in per brand through a new ``show_description_on_product_page`` boolean on ``product.brand`` (default False), so existing databases that have filled in ``website_description`` for the landing pages do not start showing it on every product page after the update. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
dhongu
force-pushed
the
19.0-imp-website_sale_product_brand-description-on-product-page
branch
from
September 8, 2026 08:40
86b7786 to
51163d0
Compare
dhongu
added a commit
to dhongu/others_addons
that referenced
this pull request
Sep 8, 2026
…rodusului Recuperează singura parte din patch-ul local de pe 18.0 (1c32d0a) care nu era acoperită de portul upstream: descrierea mărcii pe pagina de detalii a produsului. Logo-ul era deja acoperit de product_title_brand_logo. Implementat pe convenția upstream, nu ca patch local: câmp nou show_description_on_product_page pe product.brand (default False, opt-in per marcă) plus template product_brand_description care moștenește website_sale.product_title și inserează descrierea după descrierea produsului. Folosește website_description (câmpul de website al mărcii), nu description, ca restul codului de website din modul. Opt-in deliberat: bazele care au completat deja website_description pentru paginile de landing nu trebuie să înceapă brusc să o afișeze pe fiecare pagină de produs după update. Trimis upstream ca OCA/e-commerce#1314, cod identic cu ce e aici, ca să nu divergem la următorul refresh din upstream. Teste: tests/test_website_sale_brand_product_page.py, trei cazuri (ascuns implicit, afișat când flag-ul e activ, nerandat când descrierea e goală). Pe bază curată: 0 failed, 0 error(s) of 26 tests. Verificat și în browser pe agroamat_mig_test: cu flag-ul activ apar atât logo-ul cât și descrierea. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
dhongu
added a commit
to dhongu/others_addons
that referenced
this pull request
Sep 8, 2026
Aduce website_sale_product_brand pe 19.0, prin adoptarea portului upstream OCA/e-commerce@19.0 (19.0.2.4.0) în loc de replay mecanic 18.0->19.0. Modulul era instalat în producția Agroamat pe 18.0 și lipsea complet pe 19.0. Descrierea mărcii pe pagina produsului, singura parte a patch-ului local de pe 18.0 neacoperită upstream, e trimisă ca OCA/e-commerce#1314 (CI verde), cod identic cu ce e aici. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The product page already shows the brand logo (added in #1267), linking to the brand landing page. This adds the option to show the brand's
website_descriptionthere as well, right below the product description.Why
Downstream we carried a local patch on 18.0 that showed both the brand logo and its description on the product detail page. When adopting the 19.0 port, the logo part turned out to be covered by #1267, but the description was not — hence this PR instead of keeping the patch out of tree.
How
show_description_on_product_pageboolean onproduct.brand, defaultFalse, exposed on the Website tab of the brand form.product_brand_descriptiontemplate inheritingwebsite_sale.product_title, inserting the description afterproduct.description_ecommerce.It is opt-in on purpose: databases that already filled in
website_descriptionfor the landing pages should not suddenly start showing it on every product page after the update.Tests
tests/test_website_sale_brand_product_page.pycovers the three cases: hidden by default, shown when the flag is on, and not rendered when the description is empty.Ran against a clean 19.0 database:
Also verified in the browser: with the flag enabled, both the brand logo and its description render on the product page; with it disabled, neither the description nor the
o_product_brand_descriptionwrapper is emitted.Note on linting:
ruff,ruff formatandprettier(with@prettier/plugin-xml, using the repo'sprettier.config.cjs) are clean on the changed files. The fullpre-commitrun could not be executed locally — several hooks pinpython3.12, which is not available on this machine — so I am relying on CI for the rest.