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 == 'exception';black:state=='running';darkgreen:state=='confirmed';gray:state in ['done','cancel'];blue:state == '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 eval="20" name="priority"/>
32 <field name="arch" type="xml">
33 <tree string="Procurement Lines" colors="red:date_planned<current_date and state == 'exception';black:state=='running';darkgreen:state=='confirmed';gray:state in ['done','cancel'];blue:state == 'ready'">
34 <field name="date_planned" widget="date"/>
35 <field name="origin"/>
36 <field name="product_id"/>
37 <field name="product_qty"/>
38 <field name="product_uom" string="UOM"/>
39 <field name="state" invisible = "1"/>
40 <field name="message"/>
44 <record id="procurement_form_view" model="ir.ui.view">
45 <field name="name">procurement.order.form</field>
46 <field name="model">procurement.order</field>
47 <field name="type">form</field>
48 <field name="arch" type="xml">
49 <form string="Procurement">
50 <group col="2" colspan="2">
51 <separator colspan="2" string="References"/>
52 <field name="name" string="Procurement Reason"/>
53 <field name="origin"/>
54 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
56 <group col="2" colspan="2">
57 <separator colspan="2" string="Planification"/>
58 <field name="date_planned"/>
59 <field name="procure_method"/>
60 <field name="priority"/>
62 <notebook colspan="4">
63 <page string="Procurement Details">
64 <separator colspan="4" string="Product & Location"/>
65 <field name="product_id" on_change="onchange_product_id(product_id)"/>
66 <field name="location_id" domain="[('usage','=','internal')]"/>
67 <field name="product_qty"/>
68 <field name="product_uom"/>
70 <field name="product_uos_qty" groups="product.group_uos"/>
71 <field name="product_uos" groups="product.group_uos"/>
73 <separator colspan="4" string="Status"/>
74 <field colspan="4" name="message" readonly="1"/>
75 <field name="state" readonly="1"/>
76 <group col="7" colspan="2">
77 <button name="button_cancel" states="draft,exception,waiting" string="Cancel" icon="gtk-cancel"/>
78 <button name="button_confirm" states="draft" string="Confirm" icon="gtk-apply"/>
79 <button name="button_restart" states="exception" string="Retry" icon="gtk-convert"/>
80 <button name="button_check" states="confirmed" string="Run Procurement" icon="gtk-media-play"/>
83 <page string="Extra Information">
84 <separator colspan="4" string="Details"/>
85 <field name="move_id"/>
86 <field name="date_close"/>
87 <field name="close_move"/>
90 <separator colspan="4" string="Note" />
91 <field name="note" colspan="4" nolabel="1"/>
97 <record id="view_procurement_filter" model="ir.ui.view">
98 <field name="name">procurement.order.select</field>
99 <field name="model">procurement.order</field>
100 <field name="type">search</field>
101 <field name="arch" type="xml">
102 <search string="Search Procurement">
104 <filter icon="terp-emblem-important" string="Exceptions" name="exceptions" domain="[('state','=','exception')]" help="Procurement Exceptions"/>
105 <filter icon="terp-emblem-important" string="To Fix" name="perm_exceptions" domain="[('state','=','exception'),('message', '!=', '')]" help="Permanent Procurement Exceptions"/>
106 <filter icon="terp-emblem-important" string="Temporary" name="temp_exceptions" domain="[('state','=','exception'),('message', '=', '')]" help="Temporary Procurement Exceptions"/>
107 <separator orientation="vertical"/>
108 <filter icon="terp-gnome-cpu-frequency-applet+" string="Late"
109 domain="['&', ('date_planned','<', current_date), ('state', 'in', ('draft', 'confirmed'))]"
110 help="Procurement started late" />
111 <separator orientation="vertical"/>
112 <field name="origin"/>
113 <field name="product_id" />
114 <field name="date_planned"/>
115 <field name="state" />
118 <group expand="0" string="Group By">
119 <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
120 <filter string="Reason" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'name'}"/>
121 <filter string="Scheduled Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_planned'}"/>
122 <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
128 <record id="procurement_action" model="ir.actions.act_window">
129 <field name="name">Procurement Orders</field>
130 <field name="type">ir.actions.act_window</field>
131 <field name="res_model">procurement.order</field>
132 <field name="view_type">form</field>
133 <field name="view_id" eval="False"/>
134 <field name="search_view_id" ref="view_procurement_filter"/>
135 <field name="context">{'search_default_current':1}</field>
136 <field name="help">A procurement order is used to record a need for a specific product at a specific location. A procurement order is usually created automatically from sales orders, a Pull Logistics rule or Minimum Stock Rules. When the procurement order is confirmed, it automatically creates the necessary operations to fullfil the need: purchase order proposition, manufacturing order, etc.</field>
139 <record id="procurement_exceptions" model="ir.actions.act_window">
140 <field name="name">Procurement Exceptions</field>
141 <field name="type">ir.actions.act_window</field>
142 <field name="res_model">procurement.order</field>
143 <field name="view_type">form</field>
144 <field name="view_mode">tree,form</field>
145 <field name="context">{'search_default_perm_exceptions':1}</field>
146 <field name="search_view_id" ref="view_procurement_filter"/>
147 <field name="help">Procurement Orders represent the need for a certain quantity of products, at a given time, in a given location. Sales Orders are one typical source of Procurement Orders (but these are distinct documents). Depending on the procurement parameters and the product configuration, the procurement engine will attempt to satisfy the need by reserving products from stock, 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>
150 <record id="procurement_action5" model="ir.actions.act_window">
151 <field name="name">Procurement Exceptions</field>
152 <field name="type">ir.actions.act_window</field>
153 <field name="res_model">procurement.order</field>
154 <field name="view_type">form</field>
155 <field name="view_mode">tree,form</field>
156 <field name="domain">[('state','=','exception')]</field>
160 <record id="view_warehouse_orderpoint_tree" model="ir.ui.view">
161 <field name="name">stock.warehouse.orderpoint.tree</field>
162 <field name="model">stock.warehouse.orderpoint</field>
163 <field name="type">tree</field>
164 <field name="arch" type="xml">
165 <tree string="Minimum Stock Rules">
167 <field name="warehouse_id"/>
168 <field name="location_id"/>
169 <field name="product_id"/>
170 <field name="product_uom"/>
171 <field name="product_min_qty"/>
172 <field name="product_max_qty"/>
177 <record model="ir.ui.view" id="warehouse_orderpoint_search">
178 <field name="name">stock.warehouse.orderpoint.search</field>
179 <field name="model">stock.warehouse.orderpoint</field>
180 <field name="type">search</field>
181 <field name="arch" type="xml">
182 <search string="Minimum Stock Rules Search">
185 <field name="warehouse_id" widget="selection"/>
186 <field name="location_id"/>
187 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
188 <field name="product_id"/>
191 <group expand="0" string="Group By...">
192 <filter string="Warehouse" icon="terp-go-home" domain="[]" context="{'group_by':'warehouse_id'}"/>
193 <filter string="Location" icon="terp-go-home" domain="[]" context="{'group_by':'location_id'}"/>
199 <record id="view_warehouse_orderpoint_form" model="ir.ui.view">
200 <field name="name">stock.warehouse.orderpoint.form</field>
201 <field name="model">stock.warehouse.orderpoint</field>
202 <field name="type">form</field>
203 <field name="arch" type="xml">
204 <form string="Minimum Stock Rules">
205 <group col="2" colspan="2">
206 <separator string="General Information" colspan="2" />
207 <field name="name" />
208 <field name="product_id" on_change="onchange_product_id(product_id)"/>
209 <field name="product_uom"/>
211 <group col="2" colspan="2">
212 <separator string="Locations" colspan="2" />
213 <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection"/>
214 <field name="location_id"/>
215 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
217 <group col="2" colspan="2">
218 <separator string="Quantity Rules" colspan="2" />
219 <field name="product_min_qty"/>
220 <field name="product_max_qty"/>
221 <field name="qty_multiple"/>
223 <group col="2" colspan="2">
224 <separator string="Misc" colspan="2" />
225 <field name="procurement_id" readonly="1"/>
226 <field name="active" />
228 <group col="4" colspan="4">
229 <separator string="Procurement Orders to Process" colspan="4" />
230 <field name="procurement_draft_ids" colspan="4" nolabel="1"/>
236 <record id="action_orderpoint_form" model="ir.actions.act_window">
237 <field name="name">Minimum Stock Rules</field>
238 <field name="res_model">stock.warehouse.orderpoint</field>
239 <field name="type">ir.actions.act_window</field>
240 <field name="view_type">form</field>
241 <field name="view_id" ref="view_warehouse_orderpoint_tree"/>
242 <field name="search_view_id" ref="warehouse_orderpoint_search" />
243 <field name="help">You can define your minimum stock rules, so that OpenERP will automatically create draft manufacturing orders or purchase quotations according to the stock level. Once the virtual stock of a product (= stock on hand minus all confirmed orders and reservations) is below the minimum quantity, OpenERP will generate a procurement request to increase the stock up to the maximum quantity.</field>
247 context="{'search_default_warehouse_id': active_id, 'default_warehouse_id': active_id}"
248 id="act_stock_warehouse_2_stock_warehouse_orderpoint"
249 name="Minimum Stock Rules"
250 res_model="stock.warehouse.orderpoint"
251 src_model="stock.warehouse"
252 groups="stock.group_stock_user"/>
255 context="{'product_uom': locals().has_key('uom_id') and uom_id, 'default_procurement_id': active_id}"
256 id="act_procurement_2_stock_warehouse_orderpoint"
257 name="Minimum Stock Rules"
258 res_model="stock.warehouse.orderpoint"
259 src_model="procurement.order"
260 groups="stock.group_stock_user"/>
262 <!-- Procurements are located in Warehouse menu hierarchy, MRP users should come to Stock application to use it. -->
263 <menuitem id="menu_stock_sched" name="Schedulers" parent="stock.menu_stock_root" sequence="4"/>
264 <menuitem action="action_compute_schedulers" id="menu_stock_proc_schedulers" parent="menu_stock_sched" sequence="20" groups="stock.group_stock_manager"/>
265 <menuitem action="procurement_exceptions" id="menu_stock_procurement_action" parent="menu_stock_sched" sequence="50" groups="stock.group_stock_manager"/>
266 <menuitem id="menu_stock_procurement" name="Automatic Procurements" parent="stock.menu_stock_configuration" sequence="5"/>
267 <menuitem action="action_orderpoint_form" id="menu_stock_order_points" parent="stock.menu_stock_configuration" sequence="10"/>
270 <record id="product_normal_form_view" model="ir.ui.view">
271 <field name="name">product.normal.form.orderpoint.inherit</field>
272 <field name="model">product.product</field>
273 <field name="type">form</field>
274 <field name="inherit_id" ref="product.product_normal_form_view"/>
275 <field name="arch" type="xml">
276 <group name="misc" position="after">
277 <group col="2" colspan="4" attrs="{'invisible':[('type', '=', 'service')]}">
278 <field name="orderpoint_ids" context="{'default_product_uom': uom_id, 'default_product_id': active_id}" nolabel="1">
279 <tree string="Minimum Stock Rules" editable="bottom">
280 <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection"/>
281 <field name="location_id"/>
282 <field name="product_min_qty"/>
283 <field name="product_max_qty"/>
284 <field name="product_uom" groups="product.group_uom"/>