Skip to content

[19.0][IMP] website_sale_product_brand: show brand description on product page - #1314

Open
dhongu wants to merge 1 commit into
OCA:19.0from
dhongu:19.0-imp-website_sale_product_brand-description-on-product-page
Open

dhongu wants to merge 1 commit into
OCA:19.0from
dhongu:19.0-imp-website_sale_product_brand-description-on-product-page

Conversation

@dhongu

@dhongu dhongu commented Sep 8, 2026

Copy link
Copy Markdown

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_description there 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

  • New show_description_on_product_page boolean on product.brand, default False, exposed on the Website tab of the brand form.
  • New product_brand_description template inheriting website_sale.product_title, inserting the description after product.description_ecommerce.

It is opt-in on purpose: databases that already filled in website_description for the landing pages should not suddenly start showing it on every product page after the update.

Tests

tests/test_website_sale_brand_product_page.py covers 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:

odoo.tests.stats: website_sale_product_brand: 34 tests 8.32s 2966 queries
odoo.tests.result: 0 failed, 0 error(s) of 26 tests

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_description wrapper is emitted.

Note on linting: ruff, ruff format and prettier (with @prettier/plugin-xml, using the repo's prettier.config.cjs) are clean on the changed files. The full pre-commit run could not be executed locally — several hooks pin python3.12, which is not available on this machine — so I am relying on CI for the rest.

@OCA-git-bot OCA-git-bot added series:19.0 mod:website_sale_product_brand Module website_sale_product_brand labels Sep 8, 2026
…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
dhongu force-pushed the 19.0-imp-website_sale_product_brand-description-on-product-page branch from 86b7786 to 51163d0 Compare September 8, 2026 08:40
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:website_sale_product_brand Module website_sale_product_brand series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants