Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <data>
- <!--
- Done by RHT on the 15/04/2025
- Need : remove the best before date from the lot and change the product name to the variant name
- Task : https://www.odoo.com/odoo/project/5686/tasks/4721270
- Pastebin : https://pastebin.com/zbUaNKUv
- -->
- <!-- Remove the Best Before (B.b.) date -->
- <xpath expr="//div[@t-if='o.use_date']" position="replace"/>
- <!-- Replace product name with product variant name -->
- <xpath expr="//div[@t-field='o.product_id.name']" position="replace">
- <t t-set="product_name" t-value="o.product_id.display_name.replace(o.product_id.default_code, '').replace('[','').replace(']','').strip()"/>
- <div class="o_label_4x12" t-out="product_name" t-att-style="'width:22mm' if final_barcode else ''"/>
- </xpath>
- </data>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement