| 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <odoo> |
| 3 | <record id="account_view_move_form_inherited" model="ir.ui.view"> |
| 4 | <field name="name">account.view.move.form.inherited</field> |
| 5 | <field name="model">account.move</field> |
| 6 | <field name="inherit_id" ref="account.view_move_form"/> |
| 7 | <field name="arch" type="xml"> |
| 8 | <xpath expr="//div[@name='button_box']" position="inside"> |
| 9 | <t groups="stock.group_stock_manager"> |
| 10 | <field name="landed_costs_ids" invisible="1"/> |
| 11 | <button string="Landed Costs" type="object" |
| 12 | name="action_view_landed_costs" |
| 13 | class="oe_stat_button" icon="fa-plus-square" |
| 14 | invisible="not landed_costs_ids"/> |
| 15 | </t> |
| 16 | </xpath> |
| 17 | |
| 18 | <field name="state" position="before"> |
| 19 | <t groups="stock.group_stock_manager"> |
| 20 | <field name="landed_costs_visible" invisible="1" /> |
| 21 | <button name="button_create_landed_costs" class="oe_highlight" string="Create Landed Costs" data-hotkey="l" type="object" groups="account.group_account_invoice" invisible="not landed_costs_visible"/> |
| 22 | </t> |
| 23 | </field> |
| 24 | |
| 25 | <xpath expr="//field[@name='invoice_line_ids']/list/field[@name='quantity']" position="before"> |
| 26 | <field name="product_type" column_invisible="True" groups="stock.group_stock_manager"/> |
| 27 | <field name="is_landed_costs_line" string="Landed Costs" column_invisible="parent.move_type not in ('in_invoice', 'in_receipt')" readonly="product_type != 'service'" optional="hide" groups="stock.group_stock_manager"/> |
| 28 | </xpath> |
| 29 | |
| 30 | <xpath expr="//field[@name='journal_line_ids' or @name='line_ids']/list/field[@name='name']" position="after"> |
| 31 | <field name="product_type" column_invisible="True" groups="stock.group_stock_manager"/> |
| 32 | <field name="is_landed_costs_line" column_invisible="True" groups="stock.group_stock_manager"/> |
| 33 | </xpath> |
| 34 | </field> |
| 35 | </record> |
| 36 | |
| 37 | </odoo> |