forked from OCA/rma
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproduct_warranty.xml
90 lines (84 loc) · 4.21 KB
/
product_warranty.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?xml version="1.0"?>
<openerp>
<data>
<!-- return instructions tree view -->
<record model="ir.ui.view" id="product_return_instructions_tree_view">
<field name="name">product.return.instructions.tree</field>
<field name="model">return.instruction</field>
<field name="arch" type="xml">
<tree string="Return instructions">
<field name="name"/>
<field name="instructions"/>
<field name="is_default"/>
</tree>
</field>
</record>
<!-- return instructions form view -->
<record model="ir.ui.view" id="product_return_instructions_form_view">
<field name="name">product.return.instructions.form</field>
<field name="model">return.instruction</field>
<field name="arch" type="xml">
<form string="Return instructions">
<group col='4'>
<field name="name"/>
<field name="is_default"/>
</group>
<separator string="Instructions" colspan="4"/>
<field name="instructions" nolabel="1" colspan="4"/>
</form>
</field>
</record>
<record id="product_return_instructions_action" model="ir.actions.act_window">
<field name="name">Products Return Instructions</field>
<field name="res_model">return.instruction</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="product_return_instructions_tree_view"/>
</record>
<menuitem action="product_return_instructions_action"
groups="base.group_no_one"
id="menu_product_return_instructions_action"
parent="product.prod_config_main" sequence="3"/>
<!-- supplier info tree view -->
<record model="ir.ui.view" id="product_supplierinfo_warranty_tree_view">
<field name="name">product.supplierinfo.warranty.tree</field>
<field name="model">product.supplierinfo</field>
<field name="inherit_id" ref="product.product_supplierinfo_tree_view" />
<field name="arch" type="xml">
<field name="min_qty" position="before">
<field name="warranty_duration"/>
<field name="warranty_return_partner"/>
<field name="warranty_return_address"/>
<field name="active_supplier"/>
<field name="return_instructions"/>
</field>
</field>
</record>
<!-- supplier info form view -->
<record model="ir.ui.view" id="product_supplierinfo_warranty_form_view">
<field name="name">product.supplierinfo.warranty.form</field>
<field name="model">product.supplierinfo</field>
<field name="inherit_id" ref="product.product_supplierinfo_form_view" />
<field name="arch" type="xml">
<xpath expr="//group[last()]" position="after">
<group string="Warranty informations" colspan="4">
<field name="active_supplier"/>
<field name="warranty_duration"/>
<field name="return_instructions"/>
<group colspan="4" col="6">
<group>
<field name="warranty_return_partner"/>
</group>
<group>
<field name="warranty_return_other_address"
attrs="{'invisible':[('warranty_return_partner', '!=', 'other')], 'required':[('warranty_return_partner', '=', 'other')]}"
class="oe_inline"/>
<field name="warranty_return_address" attrs="{'invisible':[('warranty_return_partner', '=', 'other')]}" class="oe_inline" />
</group>
</group>
</group>
</xpath>
</field>
</record>
</data>
</openerp>