forked from OCA/edi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaccount_invoice_import_config_view.xml
67 lines (61 loc) · 3.17 KB
/
account_invoice_import_config_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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 Akretion (http://www.akretion.com/)
@author: Alexis de Lattre <[email protected]>
The licence is in the file __openerp__.py
-->
<openerp>
<data>
<record id="account_invoice_import_config_form" model="ir.ui.view">
<field name="name">account.invoice.import.config.form</field>
<field name="model">account.invoice.import.config</field>
<field name="arch" type="xml">
<form string="Account Invoice Import Configuration">
<group name="main">
<field name="name"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="active"/>
</group>
<group string="Accounting Parameters" name="accounting">
<field name="invoice_line_method"/>
<field name="account_id"
attrs="{'invisible': [('invoice_line_method', 'not in', ('1line_no_product', 'nline_no_product'))], 'required': [('invoice_line_method', 'in', ('1line_no_product', 'nline_no_product'))]}"/>
<field name="tax_ids"
widget="many2many_tags"
attrs="{'invisible': [('invoice_line_method', '!=', '1line_no_product')]}"/>
<field name="static_product_id"
attrs="{'invisible': [('invoice_line_method', 'not in', ('1line_static_product', 'nline_static_product'))], 'required': [('invoice_line_method', 'in', ('1line_static_product', 'nline_static_product'))]}"/>
<field name="account_analytic_id"
groups="analytic.group_analytic_accounting"/>
<field name="label"
attrs="{'invisible': [('invoice_line_method', 'not in', ('1line_no_product', '1line_static_product'))]}"/>
</group>
<group name="partner" string="Partners"
invisible="not context.get('invoice_import_config_main_view')">
<field name="partner_ids" nolabel="1" readonly="1"/> <!-- set this field readonly to avoid the frustration of being unable to select an existing partner from this view -->
</group>
</form>
</field>
</record>
<record id="account_invoice_import_config_tree" model="ir.ui.view">
<field name="name">account.invoice.import.config.tree</field>
<field name="model">account.invoice.import.config</field>
<field name="arch" type="xml">
<tree string="Account Invoice Import Configurations">
<field name="name"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="invoice_line_method"/>
</tree>
</field>
</record>
<record id="account_invoice_import_config_action" model="ir.actions.act_window">
<field name="name">Import Supplier Invoices</field>
<field name="res_model">account.invoice.import.config</field>
<field name="view_mode">tree,form</field>
<field name="context">{'invoice_import_config_main_view': True}</field>
</record>
<menuitem id="account_invoice_import_config_menu"
parent="account.menu_configuration_misc"
action="account_invoice_import_config_action" sequence="100"/>
</data>
</openerp>