You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

55 lines
2.7 KiB

<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="view_product_tree_inherit" model="ir.ui.view">
<field name="name">product.product.tree.inherit</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_product_tree_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='default_code']" position="before">
<button class="o_field_cell" name="action_add_to_invoice" type="object" icon="fa-plus" attrs="{'invisible': [('add_to_invoice', '=', False)]}"/>
<button name="action_change_qty" type="object" icon="fa-list" attrs="{'invisible': [('add_to_invoice', '=', False)]}"/>
<field name="add_to_invoice" invisible="1"/>
</xpath>
</field>
</record>
<record id="view_product_kanban_inherit" model="ir.ui.view">
<field name="name">product.product.kanban.inherit</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_kanban_view"/>
<field name="arch" type="xml">
<xpath expr="//div[hasclass('oe_kanban_details')]" position="after">
<t t-if="context.add_to_invoice">
<div class="o_kanban_record_bottom" style="width: 100%;">
<div class="oe_kanban_bottom_left">
<a name="action_add_to_invoice" type="object">
<i class="fa fa-plus"/>Add to Invoice/Bill
</a>
</div>
<div class="oe_kanban_bottom_right">
<a name="action_change_qty" type="object">
<i class="fa fa-list"/>Change Quantity
</a>
</div>
</div>
</t>
</xpath>
</field>
</record>
<record id="view_product_form_inherit" model="ir.ui.view">
<field name="name">product.product.view.form.inherit</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<xpath expr="//header" position="inside">
<button name="action_add_to_invoice" type="object" string="Add to Invoice/Bill" class="oe_highlight"
icon="fa-plus" invisible="not context.get('add_to_invoice')"/>
<button name="action_change_qty" type="object" icon="fa-list" help="Update Quantity" invisible="not context.get('add_to_invoice')"/>
</xpath>
</field>
</record>
</odoo>