[FIX] delivery: delivery slip hs code

The variable that was setting the has_hs_code is set in the array
'stock_move_table' which has a t-if on the state to check it's not done,
so if the state is done, the variable is no set and hs_code never shown.

So we've put the variable in the begining of the report.

closes odoo/odoo#36902

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
This commit is contained in:
Pierre Masereel
2019-09-16 07:49:14 +00:00
parent aa9db571e3
commit d76f49b3ac
@@ -15,10 +15,10 @@
<strong>Tracking Number:</strong>
<p t-field="o.carrier_tracking_ref"/>
</div>
<t t-set="has_hs_code" t-value="o.move_lines.filtered(lambda l: l.product_id.hs_code)"/>
</xpath>
<xpath expr="//table[@name='stock_move_table']/thead/tr" position="inside">
<t t-set="has_hs_code" t-value="o.move_lines.filtered(lambda l: l.product_id.hs_code)"/>
<th t-if="has_hs_code"><strong>HS Code</strong></th>
</xpath>