1 <?xml version="1.0" encoding="utf-8"?>
9 <record id="procurement_tree_view" model="ir.ui.view">
10 <field name="name">procurement.order.tree</field>
11 <field name="model">procurement.order</field>
12 <field name="type">tree</field>
13 <field name="arch" type="xml">
14 <tree string="Procurement Lines" colors="red:date_planned<current_date and state in ('exception');black:state=='running';darkgreen:state=='confirmed';gray:state in ['done','cancel'];blue:state in ('ready')">
15 <field name="date_planned" widget="date"/>
16 <field name="origin"/>
17 <field name="product_id"/>
18 <field name="product_qty"/>
19 <field name="product_uom" string="UOM"/>
20 <field name="procure_method"/>
22 <field name="message"/>
23 <field name="name" invisible="1"/>
27 <record id="procurement_tree_view_board" model="ir.ui.view">
28 <field name="name">procurement.order.tree.board</field>
29 <field name="model">procurement.order</field>
30 <field name="type">tree</field>
31 <field name="arch" type="xml">
32 <tree string="Procurement Lines" colors="red:date_planned<current_date and state in ('exception');black:state=='running';darkgreen:state=='confirmed';gray:state in ['done','cancel'];blue:state in ('ready')">
33 <field name="date_planned" widget="date"/>
34 <field name="origin"/>
35 <field name="product_id"/>
36 <field name="product_qty"/>
37 <field name="product_uom" string="UOM"/>
38 <field name="message"/>
42 <record id="procurement_form_view" model="ir.ui.view">
43 <field name="name">procurement.order.form</field>
44 <field name="model">procurement.order</field>
45 <field name="type">form</field>
46 <field name="arch" type="xml">
47 <form string="Procurement">
48 <group col="2" colspan="2">
49 <separator colspan="2" string="References"/>
50 <field name="name" string="Procurement Reason"/>
51 <field name="origin"/>
52 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
54 <group col="2" colspan="2">
55 <separator colspan="2" string="Planification"/>
56 <field name="date_planned"/>
57 <field name="procure_method"/>
58 <field name="priority" groups="base.group_extended"/>
60 <notebook colspan="4">
61 <page string="Procurement Details">
62 <separator colspan="4" string="Product & Location"/>
63 <field name="product_id" on_change="onchange_product_id(product_id)"/>
64 <field name="location_id" domain="[('usage','=','internal')]"/>
65 <field name="product_qty"/>
66 <field name="product_uom" widget="selection"/>
68 <field name="product_uos_qty" groups="product.group_uos,base.group_extended"/>
69 <field name="product_uos" widget="selection" groups="product.group_uos,base.group_extended"/>
71 <separator colspan="4" string="Status"/>
72 <field colspan="4" name="message" readonly="1"/>
73 <field name="state" readonly="1"/>
74 <group col="7" colspan="2">
75 <button name="button_cancel" states="draft,exception,waiting" string="Cancel" icon="gtk-cancel"/>
76 <button name="button_confirm" states="draft" string="Confirm" icon="gtk-apply"/>
77 <button name="button_restart" states="exception" string="Retry" icon="gtk-convert"/>
78 <button name="button_check" states="confirmed" string="Run Procurement" icon="gtk-media-play"/>
81 <page string="Extra Information">
82 <separator colspan="4" string="Details"/>
83 <field name="move_id" groups="base.group_extended"/>
84 <field name="date_close"/>
85 <field name="close_move" groups="base.group_extended"/>
88 <separator colspan="4" string="Note" />
89 <field name="note" colspan="4" nolabel="1"/>
95 <record id="view_procurement_filter" model="ir.ui.view">
96 <field name="name">procurement.order.select</field>
97 <field name="model">procurement.order</field>
98 <field name="type">search</field>
99 <field name="arch" type="xml">
100 <search string="Search Procurement">
101 <group col='10' colspan='4'>
102 <filter icon="terp-check" string="Current" domain="[('state','in',('draft','confirmed'))]" name="current" help="Procurement Orders in draft or open state."/>
103 <filter icon="terp-gnome-cpu-frequency-applet+" string="Late"
104 domain="['&', ('date_planned::date','<', current_date), ('state', 'in', ('draft', 'confirmed'))]"
105 help="Procurement started late" />
106 <separator orientation="vertical"/>
107 <filter icon="terp-emblem-important" string="Exceptions" name="exceptions" domain="[('state','=','exception')]" help="Procurement Exceptions"/>
108 <filter icon="terp-emblem-important" string="To Fix" name="perm_exceptions" domain="[('state','=','exception'),('message', '!=', '')]" help="Permanent Procurement Exceptions"/>
109 <filter icon="terp-emblem-important" string="Temporary" name="temp_exceptions" domain="[('state','=','exception'),('message', '=', '')]" help="Temporary Procurement Exceptions"/>
110 <separator orientation="vertical"/>
111 <field name="origin"/>
112 <field name="product_id" />
113 <field name="date_planned" widget="date"/>
114 <field name="state" />
117 <group expand="0" string="Group By" colspan="4" col="8" groups="base.group_extended">
118 <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
119 <filter string="Reason" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'name'}"/>
120 <filter string="Scheduled Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_planned'}"/>
121 <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
127 <record id="procurement_action" model="ir.actions.act_window">
128 <field name="name">Procurement Orders</field>
129 <field name="type">ir.actions.act_window</field>
130 <field name="res_model">procurement.order</field>
131 <field name="view_type">form</field>
132 <field name="view_id" eval="False"/>
133 <field name="search_view_id" ref="view_procurement_filter"/>
134 <field name="context">{'search_default_current':1}</field>
135 <field name="help">Procurement Orders represent the need for a certain quantity of products, at a given time, in a given location. Sale Orders are one typical source of Procurement Orders (but these are distinct documents). Depending on the procurement parameters and the products configuration, the procurement engine will attempt to satisfy the need by reserving products from stock, or ordering products from a supplier, or passing a manufacturing order, etc.</field>
138 <record id="procurement_exceptions" model="ir.actions.act_window">
139 <field name="name">Procurement Exceptions</field>
140 <field name="type">ir.actions.act_window</field>
141 <field name="res_model">procurement.order</field>
142 <field name="view_type">form</field>
143 <field name="view_mode">tree,form</field>
144 <field name="context">{'search_default_perm_exceptions':1}</field>
145 <field name="search_view_id" ref="view_procurement_filter"/>
146 <field name="help">Procurement Orders represent the need for a certain quantity of products, at a given time, in a given location. Sale Orders are one typical source of Procurement Orders (but these are distinct documents). Depending on the procurement parameters and the products configuration, the procurement engine will attempt to satisfy the need by reserving products from stock, or ordering products from a supplier, or passing a manufacturing order, etc. A Procurement Exception occurs when the system cannot find a way to fulfill a procurement. Some exceptions will resolve themselves automatically, but others require manual intervention (those are identified by a specific error message)</field>
149 <record id="procurement_action5" model="ir.actions.act_window">
150 <field name="name">Procurement Exceptions</field>
151 <field name="type">ir.actions.act_window</field>
152 <field name="res_model">procurement.order</field>
153 <field name="view_type">form</field>
154 <field name="view_mode">tree,form</field>
155 <field name="domain">[('state','=','exception')]</field>
159 <record id="view_warehouse_orderpoint_tree" model="ir.ui.view">
160 <field name="name">stock.warehouse.orderpoint.tree</field>
161 <field name="model">stock.warehouse.orderpoint</field>
162 <field name="type">tree</field>
163 <field name="arch" type="xml">
164 <tree string="Minimum Stock Rules">
166 <field name="warehouse_id"/>
167 <field name="location_id"/>
168 <field name="product_id"/>
169 <field name="product_uom"/>
170 <field name="product_min_qty"/>
171 <field name="product_max_qty"/>
176 <record model="ir.ui.view" id="warehouse_orderpoint_search">
177 <field name="name">stock.warehouse.orderpoint.search</field>
178 <field name="model">stock.warehouse.orderpoint</field>
179 <field name="type">search</field>
180 <field name="arch" type="xml">
181 <search string="Minimum Stock Rules Search">
182 <group col="10" colspan="4">
184 <field name="warehouse_id" widget="selection"/>
185 <field name="location_id"/>
186 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
187 <field name="product_id"/>
190 <group expand="0" string="Group By..." colspan="4" col="10">
191 <filter string="Warehouse" icon="terp-go-home" domain="[]" context="{'group_by':'warehouse_id'}"/>
192 <filter string="Location" icon="terp-go-home" domain="[]" context="{'group_by':'location_id'}"/>
198 <record id="view_warehouse_orderpoint_form" model="ir.ui.view">
199 <field name="name">stock.warehouse.orderpoint.form</field>
200 <field name="model">stock.warehouse.orderpoint</field>
201 <field name="type">form</field>
202 <field name="arch" type="xml">
203 <form string="Minimum Stock Rules">
204 <group col="2" colspan="2">
205 <separator string="General Information" colspan="2" />
206 <field name="name" />
207 <field name="product_id" on_change="onchange_product_id(product_id)"/>
208 <field name="product_uom"/>
210 <group col="2" colspan="2">
211 <separator string="Locations" colspan="2" />
212 <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection"/>
213 <field name="location_id"/>
214 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
216 <group col="2" colspan="2">
217 <separator string="Quantity Rules" colspan="2" />
218 <field name="product_min_qty"/>
219 <field name="product_max_qty"/>
220 <field name="qty_multiple"/>
222 <group col="2" colspan="2" groups="base.group_extended">
223 <separator string="Misc" colspan="2" />
224 <field name="procurement_id" readonly="1"/>
225 <field name="active" />
231 <record id="action_orderpoint_form" model="ir.actions.act_window">
232 <field name="name">Minimum Stock Rules</field>
233 <field name="res_model">stock.warehouse.orderpoint</field>
234 <field name="type">ir.actions.act_window</field>
235 <field name="view_type">form</field>
236 <field name="view_id" ref="view_warehouse_orderpoint_tree"/>
237 <field name="search_view_id" ref="warehouse_orderpoint_search" />
241 context="{'search_default_warehouse_id': active_id}"
242 id="act_stock_warehouse_2_stock_warehouse_orderpoint"
243 name="Minimum Stock Rules"
244 res_model="stock.warehouse.orderpoint"
245 src_model="stock.warehouse"/>
247 <!-- add product_uom to context to be the default value when adding new orderpoints -->
249 context="{'product_uom': locals().has_key('uom_id') and uom_id,'search_default_product_id': [active_id]}"
250 id="act_product_product_2_stock_warehouse_orderpoint"
251 name="Minimum Stock Rules"
252 res_model="stock.warehouse.orderpoint"
253 src_model="product.product"/>
256 context="{'product_uom': locals().has_key('uom_id') and uom_id}"
257 domain="[('procurement_id', '=', active_id)]"
258 id="act_procurement_2_stock_warehouse_orderpoint"
259 name="Minimum Stock Rules"
260 res_model="stock.warehouse.orderpoint"
261 src_model="procurement.order"/>
263 <!-- Procurements are located in Warehouse menu hierarchy, MRP users should come to Stock application to use it. -->
264 <menuitem id="menu_stock_sched" name="Schedulers" parent="stock.menu_stock_root" sequence="4" groups="base.group_extended"/>
265 <menuitem action="action_compute_schedulers" id="menu_stock_proc_schedulers" parent="menu_stock_sched" sequence="20" groups="stock.group_stock_manager"/>
266 <menuitem action="procurement_exceptions" id="menu_stock_procurement_action" parent="menu_stock_sched" sequence="50" groups="stock.group_stock_manager"/>
267 <menuitem id="menu_stock_procurement" name="Automatic Procurements" parent="stock.menu_stock_root" sequence="5" groups="base.group_extended"/>
268 <menuitem action="action_orderpoint_form" id="menu_stock_order_points" parent="menu_stock_procurement" sequence="10"/>