forked from OCA/account-financial-tools
-
Notifications
You must be signed in to change notification settings - Fork 3
/
account_asset_invoice_view.xml
40 lines (36 loc) · 1.58 KB
/
account_asset_invoice_view.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?xml version="1.0"?>
<openerp>
<data>
<record model="ir.ui.view" id="view_account_invoice_asset_form">
<field name="name">account.invoice.form.add.asset_category</field>
<field name="model">account.invoice.line</field>
<field name="inherit_id" ref="account.view_invoice_line_form"/>
<field name="arch" type="xml">
<field name="account_id" position="before">
<field name="asset_id" groups="account.group_account_manager"/>
<field name="asset_category_id" invisible="context.get('type') not in ['in_invoice','in_refund']"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_invoice_asset_category">
<field name="name">account.invoice.supplier.form</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_supplier_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='invoice_line']/tree/field[@name='quantity']" position="before">
<field name="asset_category_id"/>
</xpath>
</field>
</record>
<record model="ir.ui.view" id="view_customer_invoice_asset">
<field name="name">account.invoice.customer.form</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='invoice_line']/tree/field[@name='quantity']" position="before">
<field name="asset_id" groups="account.group_account_manager"/>
</xpath>
</field>
</record>
</data>
</openerp>