Hey
I have a problem that I cant resolve
I want to remove the button "Imprimir" (Print) on the sale orders I just did all like
<xpath expr="//button[@name='invoice_print']" position="replace">
<!--add sometihng-->
</xpath>
or
<button name="invoice_print" string="Print" type="object" attrs="{'invisible':['|',('sent','=',True), ('state', '!=', 'open')]}" class="oe_highlight" groups="base.group_user" position="replace">
<!--add something-->
</button>
or
<xpath expr="//button[@name='invoice_print']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
And none of those remove the button....
What I did wrong?
Best Regards
my code is this
<record model="ir.ui.view" id="account_invoice_rule_saft_inherit">
<field name="name">account.invoice.rule.saft.inherit</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<header>
<!--<button name="invoice_print" string="Print" type="object" attrs="{'invisible':['|',('sent','=',True), ('state', '!=', 'open')]}" class="oe_highlight" groups="base.group_user" position="replace">
</button>-->
<!--<xpath expr="//button[@name='invoice_print']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>-->
<xpath expr="//button[@name='invoice_print'][0]" position="attributes">
<attribute name="invisible">True</attribute>
</xpath>
<xpath expr="//button[@name='invoice_print'][1]" position="attributes">
<attribute name="invisible">True</attribute>
</xpath><button name="print_original" type="object" string="Original" attrs="{'invisible':['|','|',('impressoori', '=', True),('impressoall', '=', True),('state','=','draft')]}"/>
<button name="print_duplicado" type="object" string="Duplicado" attrs="{'invisible':['|','|',('impressodupl', '=', True),('impressoall', '=', True),('state','=','draft')]}"/>
<button name="print_triplicado" type="object" string="Triplicado" attrs="{'invisible':['|','|',('impressoall','=',True),('impressotri','=',True),('state','=','draft')]}"/>
<button name="print_all" type="object" string="Todas as Vias" attrs="{'invisible':['|','|','|','|',('impressoall', '=', True),('impressoori', '=', True),('impressodupl', '=', True),('impressotri', '=', True),('state','=','draft')]}" />
<button name="print_segunda_via" type="object" string="Segunda Via" attrs="{'invisible':['|',('impressoseg', '=', True),('state','=','draft')]}" />
</header>
<notebook colspan="4" position="after">
<group col="1">
<field name="impressodupl" nolabel="0" invisible="1" />
<field name="impressoori" nolabel="0" invisible="1" />
<field name="impressotri" nolabel="0" invisible="1" />
<field name="impressoall" nolabel="0" invisible="1" />
<field name="impressoseg" nolabel="0" invisible="1" />
</group>
</notebook>
</field>
</record>
hum... didnt work my xml code is: account.invoice.rule.saft.inherit account.invoice account.invoice.rule.saft.inherit account.invoice
<xpath expr="//button[@name='invoice_print']" position="replace"/>
<xpath expr="//button[@name='invoice_print']" position="replace"/>