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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
<?xml version="1.0" encoding="utf-8" ?>
<openerp>
<data>
<record id="threshold_value_form_view" model="ir.ui.view">
<field name="name">threshold.value.form.view</field>
<field name="model">threshold.value</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Threshold value">
<separator colspan="4" string="General Information" />
<field name="name" />
<field name="warehouse_id" widget="selection" on_change="onchange_warehouse_id(warehouse_id)" />
<field name="compute_method" />
<field name="location_id" />
<field name="active" />
<newline />
<group colspan="4" col="4" attrs="{'invisible': [('compute_method', '!=', 'computed')]}">
<separator colspan="4" string="Calculation parameters" />
<field name="consumption_method" on_change="on_change_method(consumption_method)"
attrs="{'required': [('compute_method', '=', 'computed')]}"/>
<group colspan="2" col="5">
<field name="consumption_period_from"
on_change="on_change_period(consumption_period_from, consumption_period_to)"
attrs="{'required': [('compute_method', '=', 'computed'), ('consumption_method', '=', 'amc')],
'readonly': [('consumption_method', '=', 'fmc')]}" />
<label string="-" />
<field name="consumption_period_to" nolabel="1" colspan="2"
on_change="on_change_period(consumption_period_from, consumption_period_to)"
attrs="{'required': [('compute_method', '=', 'computed'), ('consumption_method', '=', 'amc')],
'readonly': [('consumption_method', '=', 'fmc')]}" />
</group>
<field name="frequency" attrs="{'required': [('compute_method', '=', 'computed')]}" />
<field name="safety_month" attrs="{'required': [('compute_method', '=', 'computed')]}" />
<field name="lead_time" attrs="{'required': [('compute_method', '=', 'computed')], 'readonly': [('supplier_lt', '=', True)]}" />
<field name="supplier_lt" />
</group>
<group colspan="4" col="4" attrs="{'invisible': [('compute_method', '=', False)]}">
<separator colspan="4" string="Product filters" />
<field name="sublist_id" attrs="{'readonly': [('nomen_manda_0', '!=', False)], 'invisible': [('compute_method', '=', False)]}" />
<group colspan="2" col="4" attrs="{'readonly': [('sublist_id', '!=', False)], 'invisible': [('compute_method', '=', False)]}">
<field name="nomen_manda_0"
domain="[('level', '=', '0'), ('type', '=', 'mandatory')]"
widget="selection"
on_change="onChangeSearchNomenclature(0, 'mandatory', nomen_manda_0, nomen_manda_1, nomen_manda_2, nomen_manda_3, False)"
/>
<field name="nomen_manda_1"
domain="[('id','=', 0)]"
widget="selection"
get_selection="get_nomen"
on_change="onChangeSearchNomenclature(1, 'mandatory', nomen_manda_0, nomen_manda_1, nomen_manda_2, nomen_manda_3, False)"
/>
<field name="nomen_manda_2"
domain="[('id','=', 0)]"
widget="selection"
get_selection="get_nomen"
on_change="onChangeSearchNomenclature(2, 'mandatory', nomen_manda_0, nomen_manda_1, nomen_manda_2, nomen_manda_3, False)"
/>
<field name="nomen_manda_3"
domain="[('id','=', 0)]"
widget="selection"
get_selection="get_nomen"
on_change="onChangeSearchNomenclature(3, 'mandatory', nomen_manda_0, nomen_manda_1, nomen_manda_2, nomen_manda_3, False)"
/>
</group>
</group>
<button colspan="4" icon="gtk-go-down" string="Fill lines" type="object" name="fill_lines" attrs="{'invisible': [('compute_method', '=', False)]}"/>
<group colspan="4" col="4" attrs="{'invisible': [('compute_method', '=', False)]}">
<button colspan="4" icon="gtk-reload" string="Refresh values" type="object" name="dummy" />
<field name="line_ids" nolabel="1" colspan="4" attrs="{'invisible': [('compute_method', '!=', 'computed')]}">
<tree string="Products" editable="top">
<field name="product_id" domain="[('list_ids', '=', parent.sublist_id)]"
on_change="onchange_product_id(product_id)"/>
<field name="product_uom_id" />
<field name="threshold_value" readonly="1" />
<field name="product_qty" readonly="1" />
</tree>
</field>
<field name="fixed_line_ids" nolabel="1" colspan="4" attrs="{'invisible': [('compute_method', '!=', 'fixed')]}">
<tree string="Products" editable="top">
<field name="product_id" domain="[('list_ids', '=', parent.sublist_id)]"
on_change="onchange_product_id(product_id)" />
<field name="product_uom_id" />
<field name="fixed_threshold_value" required="1" />
<field name="fixed_product_qty" required="1" />
</tree>
</field>
</group>
</form>
</field>
</record>
<record id="threshold_value_tree_view" model="ir.ui.view">
<field name="name">threshold.value.tree.view</field>
<field name="model">threshold.value</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Threshold value">
<field name="name" />
<field name="location_id" />
<field name="sublist_id" invisible="1" />
<field name="nomen_manda_0" invisible="1" />
<field name="nomen_manda_1" invisible="1" />
<field name="nomen_manda_2" invisible="1" />
<field name="nomen_manda_3" invisible="1" />
</tree>
</field>
</record>
<record id="threshold_value_search_view" model="ir.ui.view">
<field name="name">threshold.value.search.view</field>
<field name="model">threshold.value</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Threshold values">
<group expand="1" string="Filters...">
<field name="name" default_focus="1" />
<field name="location_id" eval="context.get('location_id', False)" />
<field name="compute_method" />
</group>
<newline/>
<group expand="1" string="Group By...">
<filter name="group_product" string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
<separator orientation="vertical"/>
<filter name="group_location" string="Location" icon="terp-go-home" context="{'group_by':'location_id'}"/>
<separator orientation="vertical"/>
<filter string="Sublist" icon="terp-go-week" domain="" context="{'group_by':'sublist_id'}"/>
<filter string="Main type" icon="terp-tools" domain="" context="{'group_by':'nomen_manda_0'}"/>
<filter string="Group" icon="terp-tools" domain="" context="{'group_by':'nomen_manda_1'}"/>
<filter string="Family" icon="terp-tools" domain="" context="{'group_by':'nomen_manda_2'}"/>
<filter string="Root" icon="terp-tools" domain="" context="{'group_by':'nomen_manda_3'}"/>
</group>
</search>
</field>
</record>
<record id="action_threshold_value" model="ir.actions.act_window">
<field name="name">Threshold value</field>
<field name="res_model">threshold.value</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="context">{'withnum': 1}</field>
</record>
<menuitem id="menu_threshold_value"
action="action_threshold_value"
parent="stock_schedule.stock_automatic_procurements_menu" />
</data>
</openerp>
|