40
40
<label string="In months (will be converted into quantity regarding monthly consumption)" colspan="4" align="0.0"/>
42
42
<group name="consumption calculation" colspan="6" col="6">
43
<field name="past_consumption" on_change="consumption_method_change(past_consumption, reviewed_consumption, manual_consumption, order_coverage, 'past')" />
44
<field name="reviewed_consumption" on_change="consumption_method_change(past_consumption, reviewed_consumption, manual_consumption, order_coverage, 'review')" />
45
<field name="manual_consumption" on_change="consumption_method_change(past_consumption, reviewed_consumption, manual_consumption, order_coverage, 'manual')" />
43
<field name="past_consumption" on_change="consumption_method_change(past_consumption, reviewed_consumption, manual_consumption, order_coverage, 'past')" />
44
<field name="reviewed_consumption" on_change="consumption_method_change(past_consumption, reviewed_consumption, manual_consumption, order_coverage, 'review')" />
45
<field name="manual_consumption" on_change="consumption_method_change(past_consumption, reviewed_consumption, manual_consumption, order_coverage, 'manual')" />
47
47
<group colspan="2" col="5">
48
<field name="consumption_period_from"
49
on_change="on_change_period(consumption_period_from, consumption_period_to)"
50
attrs="{'required': [('past_consumption', '=', True)],
51
'readonly': [('past_consumption', '=', False)]}" />
53
<field name="consumption_period_to" nolabel="1" colspan="2"
54
on_change="on_change_period(consumption_period_from, consumption_period_to)"
55
attrs="{'required': [('past_consumption', '=', True)],
56
'readonly': [('past_consumption', '=', False)]}" />
48
<field name="consumption_period_from"
49
on_change="on_change_period(consumption_period_from, consumption_period_to)"
50
attrs="{'required': [('past_consumption', '=', True)],
51
'readonly': [('past_consumption', '=', False)]}" />
53
<field name="consumption_period_to" nolabel="1" colspan="2"
54
on_change="on_change_period(consumption_period_from, consumption_period_to)"
55
attrs="{'required': [('past_consumption', '=', True)],
56
'readonly': [('past_consumption', '=', False)]}" />
59
<separator colspan="4" string="Product filters" />
60
<field name="sublist_id" attrs="{'readonly': [('nomen_manda_0', '!=', False)]}"/>
61
<group colspan="2" col="4" attrs="{'readonly': [('sublist_id', '!=', False)]}">
62
<field name="nomen_manda_0"
63
domain="[('level', '=', '0'), ('type', '=', 'mandatory')]"
65
on_change="onChangeSearchNomenclature(0, 'mandatory', nomen_manda_0, nomen_manda_1, nomen_manda_2, nomen_manda_3, False)"
67
<field name="nomen_manda_1"
68
domain="[('id','=', 0)]"
70
get_selection="get_nomen"
71
on_change="onChangeSearchNomenclature(1, 'mandatory', nomen_manda_0, nomen_manda_1, nomen_manda_2, nomen_manda_3, False)"
73
<field name="nomen_manda_2"
74
domain="[('id','=', 0)]"
76
get_selection="get_nomen"
77
on_change="onChangeSearchNomenclature(2, 'mandatory', nomen_manda_0, nomen_manda_1, nomen_manda_2, nomen_manda_3, False)"
79
<field name="nomen_manda_3"
80
domain="[('id','=', 0)]"
82
get_selection="get_nomen"
83
on_change="onChangeSearchNomenclature(3, 'mandatory', nomen_manda_0, nomen_manda_1, nomen_manda_2, nomen_manda_3, False)"
86
<button colspan="4" icon="gtk-go-down" string="Fill lines" type="object" name="fill_lines" />
59
88
<group colspan="4" col="4" >
60
89
<separator colspan="4" string="Products that will be included in the current policy" />
61
90
<field name="product_ids" nolabel="1" colspan="4" mode="tree">
62
<tree string="Products" editable="top">
63
<field name="product_id" on_change="product_change(product_id)" domain="[('list_ids', '=', parent.sublist_id), ('type', 'not in', ['service', 'service_recep', 'consu'])]" />
64
<field name="uom_id" domain="[('uom_by_product', '=', product_id)]" on_change="onchange_uom_qty(uom_id, safety_stock)" />
65
<field name="safety_stock" on_change="onchange_uom_qty(uom_id, safety_stock)" />
66
<field name="consumption" />
67
<field name="real_stock" />
68
<field name="available_stock" />
69
<field name="expiry_before" />
70
<field name="qty_to_order" />
71
<field name="required_date" />
72
<field name="supplier_id" />
91
<tree string="Products" editable="top">
92
<field name="product_id" on_change="product_change(product_id)" domain="[('list_ids', '=', parent.sublist_id)]" />
93
<field name="uom_id" domain="[('uom_by_product', '=', product_id)]" />
94
<field name="safety_stock" />
80
<record id="order_cycle_line_tree_view" model="ir.ui.view">
81
<field name="name">order.cycle.line.tree.view</field>
82
<field name="model">stock.warehouse.order.cycle.line</field>
83
<field name="type">tree</field>
84
<field name="arch" type="xml">
85
<tree string="Products" editable="top">
86
<field name="product_id" on_change="product_change(product_id)" domain="[('list_ids', '=', parent.sublist_id), ('type', 'not in', ['service', 'service_recep', 'consu'])]" />
87
<field name="uom_id" domain="[('uom_by_product', '=', product_id)]" on_change="onchange_uom_qty(uom_id, safety_stock)" />
88
<field name="safety_stock" on_change="onchange_uom_qty(uom_id, safety_stock)" />
93
102
<record id="order_cycle_tree_view" model="ir.ui.view">
94
103
<field name="name">order.cycle.tree.view</field>
95
104
<field name="model">stock.warehouse.order.cycle</field>
112
121
<record id="order_cycle_search_view" model="ir.ui.view">
113
<field name="name">order.cycle.search.view</field>
114
<field name="model">stock.warehouse.order.cycle</field>
115
<field name="type">search</field>
116
<field name="arch" type="xml">
117
<search string="Order Cycle">
118
<group expand="1" string="Filters...">
119
<field name="name" default_focus="1" colspan="4" />
120
<field name="location_id" eval="context.get('location_id', False)" colspan="4" />
121
<field name="product_line_ids" widget="many2one" />
124
<group expand="1" string="Group By...">
125
<filter name="group_location" string="Location" icon="terp-go-home" context="{'group_by':'location_id'}"/>
122
<field name="name">order.cycle.search.view</field>
123
<field name="model">stock.warehouse.order.cycle</field>
124
<field name="type">search</field>
125
<field name="arch" type="xml">
126
<search string="Order Cycle">
127
<group expand="1" string="Filters...">
128
<field name="name" default_focus="1" colspan="4" />
129
<field name="location_id" eval="context.get('location_id', False)" colspan="4" />
130
<field name="product_line_ids" widget="many2one" />
133
<group expand="1" string="Group By...">
134
<filter name="group_location" string="Location" icon="terp-go-home" context="{'group_by':'location_id'}"/>
126
135
<separator orientation="vertical"/>
127
136
<filter string="Sublist" icon="terp-go-week" domain="" context="{'group_by':'sublist_id'}"/>
128
137
<filter string="Main type" icon="terp-tools" domain="" context="{'group_by':'nomen_manda_0'}"/>
129
138
<filter string="Group" icon="terp-tools" domain="" context="{'group_by':'nomen_manda_1'}"/>
130
139
<filter string="Family" icon="terp-tools" domain="" context="{'group_by':'nomen_manda_2'}"/>
131
140
<filter string="Root" icon="terp-tools" domain="" context="{'group_by':'nomen_manda_3'}"/>
137
146
<record id="action_order_cycle_tree" model="ir.actions.act_window">
138
147
<field name="name">Order Cycle</field>
139
148
<field name="res_model">stock.warehouse.order.cycle</field>