Hello all,
I'm adding a button on the sale invoices lines, in the form view of invoice.
See the button :
I want this new button invisible when the product on the sale invoice line has his field tracking = none.
But the debugger say to me that 'product_id.product_tmpl_id.tracking' is an unknown field...
I'm on a sale invoice line... to get the tracking value, I was sure that I was right.
Don't understand, once again!
Please help!
Here is my view code :
<record id="invoice_form" model="ir.ui.view">
<field name="name">account.invoice.form.inherit.vtm2</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_form" />
<field name="arch" type="xml">
<xpath expr="//field[@name='invoice_line_ids']//field[@name='discount']" position="after">
<button name="split_lot" string="Lot Split" type="object" icon="fa-list" groups="stock.group_production_lot"
attrs="{'invisible': [('product_id.product_tmpl_id.tracking', '=', 'none')]}"/>
</xpath>
</field>
</record>
Odoo Customization Tips: https://old.reddit.com/r/learnopenerp/
Hope this will helps