Skip to content

[MIG] product_catalog_report: migración a 20.0 y rename desde product_catalog_aeroo_report - #1000

Closed
lef-adhoc wants to merge 3 commits into
ingadhoc:20.0from
adhoc-dev:20.0-t-76451-lef
Closed

lef-adhoc wants to merge 3 commits into
ingadhoc:20.0from
adhoc-dev:20.0-t-76451-lef

Conversation

@lef-adhoc

@lef-adhoc lef-adhoc commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Migración a 20.0 de product_catalog_aeroo_report, que pasa a llamarse product_catalog_report.

Aeroo se dejó de usar en 19.0, donde los reportes pasaron a QWeb, así que el módulo conservaba el nombre de una dependencia que ya no tiene. El rename para 20.0 se acordó en la tarea 63784.

Cambios de 20.0 que hubo que contemplar

  • ir.actions.report pierde report_file: las tres acciones de reporte quedan solo con report_name.
  • check_access_rights se reemplaza por check_access.
  • content_disposition se mueve de odoo.http a odoo.http.stream.
  • product.pricelist.item pierde el cálculo formula, partido en discount y markup: la lista de precios del test usa una regla de descuento del 0 %, que da el mismo precio.
  • Los campos binarios reciben un BinaryValue en vez de bytes, y bytes crudos en vez de base64: el test de imagen arma el png con BinaryBytes.
  • QWeb deja de renderizar t-esc: las plantillas pasan a t-out. Con t-esc las filas del reporte salían con el código y la unidad, pero sin descripción ni precios.
  • sale.prod_config_main desaparece y sus ítems suben al menú de primer nivel sale.product_menu_catalog, así que el menú del catálogo los sigue.

Se conserva la carpeta migrations/ que el migrator borra por defecto: las bases de Adhoc se actualizan desde versiones intermedias arbitrarias y todavía necesitan esos scripts.

product_catalog_aeroo_report_public_categ solo recibe la actualización de la referencia; su propio rename va con su tarea de migración.

Qué cambia para quien lo usa

El menú de configuración del catálogo deja de estar en Ventas > Configuración > Productos y pasa a Ventas > Productos, que es a donde Odoo 20 movió esa rama entera.

El rename del módulo en bases existentes lo hace un script de pre_upgrade en odoo-upgrade.

Verificación

Instalado en una base 20.0 limpia con demo data: el módulo carga y los 8 tests del módulo pasan. Los dos reportes QWeb y la exportación a XLSX se probaron contra esa base, con dos listas de precios, y devuelven el contenido completo.

Tarea: https://www.adhoc.inc/odoo/project.task/76451

@roboadhoc

Copy link
Copy Markdown
Contributor

Pull request status dashboard

…t and adapt to 20.0

Aeroo was dropped in 19.0, where the reports moved to QWeb, so the module kept
the name of a dependency it no longer has. Renaming it in 20.0 was agreed in
task 63784.

Adapted to 20.0:
- ir.actions.report drops report_file, so the three report actions keep only
  report_name.
- check_access_rights is gone, replaced by check_access.
- content_disposition moved from odoo.http to odoo.http.stream, which is
  where the core imports it from.
- product.pricelist.item drops the formula computation, split into discount
  and markup, so the test pricelist uses a discount rule of 0 per cent, which
  is the same price the formula rule gave.
- Binary fields take a BinaryValue instead of bytes, and raw bytes instead of
  base64, so the image test builds the png with BinaryBytes.
- QWeb drops t-esc, so the report templates use t-out. With t-esc the rows
  printed the code and the unit but left the description and the prices
  empty, because the directive no longer renders.
- sale.prod_config_main is gone and its items moved to the top level
  sale.product_menu_catalog, so the catalog menu follows them.
- Restore the migrations folder the migrator removes by default: Adhoc bases
  upgrade from arbitrary intermediate versions and still need those scripts.

product_catalog_aeroo_report_public_categ only gets its reference updated. Its
own rename belongs to its migration task.

Task: https://www.adhoc.inc/odoo/project.task/76451
The catalog read image_sale_order from sale_ux, a stored field that
converted webp to jpeg, and fell back to image_128 when that field was
not there. sale_ux drops the field on 20.0 (ingadhoc/sale#1914), so the
catalog always falls back.

wkhtmltopdf does not render webp, and _get_converted_image_data_uri only
swaps it for a jpeg when the image widget stored that variant, so an
image loaded by the api or an import printed an empty box. The catalog
converts it itself now and no longer reads image_sale_order.

The webp plugin is imported explicitly because odoo/tools/image.py sets
Image._initialized = 2 after preinit(), which leaves webp out of the PIL
registry of the process.
@gal-adhoc

Copy link
Copy Markdown
Contributor

@roboadhoc r+ nobump rebase-ff

@roboadhoc

Copy link
Copy Markdown
Contributor

Merge method set to rebase and fast-forward.

roboadhoc pushed a commit that referenced this pull request Oct 28, 2026
Part-of: #1000
Signed-off-by: Guido Galetto <gal@adhoc.inc>
roboadhoc pushed a commit that referenced this pull request Oct 28, 2026
…t and adapt to 20.0

Aeroo was dropped in 19.0, where the reports moved to QWeb, so the module kept
the name of a dependency it no longer has. Renaming it in 20.0 was agreed in
task 63784.

Adapted to 20.0:
- ir.actions.report drops report_file, so the three report actions keep only
  report_name.
- check_access_rights is gone, replaced by check_access.
- content_disposition moved from odoo.http to odoo.http.stream, which is
  where the core imports it from.
- product.pricelist.item drops the formula computation, split into discount
  and markup, so the test pricelist uses a discount rule of 0 per cent, which
  is the same price the formula rule gave.
- Binary fields take a BinaryValue instead of bytes, and raw bytes instead of
  base64, so the image test builds the png with BinaryBytes.
- QWeb drops t-esc, so the report templates use t-out. With t-esc the rows
  printed the code and the unit but left the description and the prices
  empty, because the directive no longer renders.
- sale.prod_config_main is gone and its items moved to the top level
  sale.product_menu_catalog, so the catalog menu follows them.
- Restore the migrations folder the migrator removes by default: Adhoc bases
  upgrade from arbitrary intermediate versions and still need those scripts.

product_catalog_aeroo_report_public_categ only gets its reference updated. Its
own rename belongs to its migration task.

Task: https://www.adhoc.inc/odoo/project.task/76451
Part-of: #1000
Signed-off-by: Guido Galetto <gal@adhoc.inc>
@roboadhoc roboadhoc closed this in b79086d Oct 28, 2026
@roboadhoc roboadhoc added the 19.1 label Oct 28, 2026
@roboadhoc
roboadhoc deleted the 20.0-t-76451-lef branch October 28, 2026 14:38

This branch was previously deployed

1 inactive deployment
merge — b6eb7296 Deployed Oct 28, 2026 by roboadhoc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants