I would like to hide a the "Create Invoice" button on the sale order form using the invisible attribute.
However, I want to hide the button, when a specific "Char" field is not empty.
I tried the XML below but it did not work!
<button name="302" position="replace">
<button name="302" string="Create Invoice" type="action" states="manual" class="oe_highlight" groups="base.group_user" attrs="{'invisible': [('x_original_order_name', '!=', '')]}"/>
</button>
How can I hide the Create Invoice button when my custom field is not empty?
Thanks