[19.0] [ADD] account_invoice_report_product_hs_code #434
Approved these changes.
On a section with Hide Prices, the description prints but the HS code does not: those lines render through the account_invoice_line_name_grouped cells.
Steps to reproduce (19.0):
1. Set an HS Code on a product (Inventory tab).
2. Create a customer invoice and click Add a section.
3. On the section row, open the ⋮ menu and choose Hide Prices*.
4. Add that product under the section, confirm and print.
Without Hide Prices:
<img width="1135" height="939" alt="invoice-without-hide-prices" src="https://github.com/user-attachments/assets/c7109b93-ae3d-4c77-b67d-3084f3643fac" />
With Hide Prices:
<img width="1135" height="939" alt="invoice-with-hide-prices" src="https://github.com/user-attachments/assets/6f24d8cf-a168-4c73-a751-e13b69811b05" />
This covers both grouped cells; with it applied, the code prints on that same invoice:
</xpath>
<!-- Same for the lines of a section with "Hide Prices" -->
<xpath
expr="//td[@name='account_invoice_line_name_grouped_desktop']"
position="inside"
>
<div
t-if="grouped_line.get('product') and grouped_line['product'].hs_code"
name="hs_code"
class="text-muted small"
>
HS Code: <span t-field="grouped_line['product'].hs_code" />
</div>
</xpath>
<xpath expr="//td[@name='account_invoice_line_name_grouped']" position="inside">
<div
t-if="grouped_line.get('product') and grouped_line['product'].hs_code"
name="hs_code"
class="text-muted small"
>
HS Code: <span t-field="grouped_line['product'].hs_code" />
</div>
</xpath>
Installed and rendered the invoice report on 19.0 in a throwaway database. The commit header reads [ADD] module, where the convention asks [ADD] module: summary. Consider my findings.
Assisted-by: opencode:deepseek-v4.1-flash
Assisted-by: opencode:claude-sonnet-5-5
Hi @ivantodorovich, thanks for this module! If you can spare a moment, we would really appreciate your review of #455 (18.0, account_invoice_report_grouped_by_picking): it fixes the quantity printed on a partial refund without return. Thank you very much!
yankinmax
ivantodorovich
This module prints the product's HS Code (Harmonized System code) under the line description of the invoice report, for the products where it is set.
This information is typically required on commercial documents for customs purposes.