I would like to create a conditional field in the Inventory app where if certain documents aren't present the validate button would be invisible until those documents are uploaded.
So far, the code we've written only executes the delivery order section. I would like to find out how to write a conditional statement that would be specific to the relevant operation type.
Here's a look at the code written:
<data>
<xpath expr="//button[@name='do_new_transfer'][1]" position="attributes">
<attribute name="attrs">{'invisible': ['|', ('x_GRN', '=',False), '|',('x_supporting_waybill', '=',False), '|',('x_supplier_invoice', '=',False), '|',('x_LPO', '=',False), '|',('picking_type_code','!=','incoming'), '|',('state', 'not in', ('assigned', 'partially_available'))]}</attribute>
<attribute name="attrs">{'invisible': ['|', ('x_ATS', '=',False), '|',('picking_type_code','!=','internal'), '|',('state', 'not in', ('assigned', 'partially_available'))]}</attribute>
<attribute name="attrs">{'invisible': ['|', ('x_delivery_note', '=',False), '|',('picking_type_code','!=','outgoing'), '|',('state', 'not in', ('assigned', 'partially_available'))]}</attribute>
</xpath>
</data>
is this correct what do I need to do to fix it