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="Unit of Measure"/>
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="Unit of Measure"/>
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" version="7.0">
51 <button name="button_confirm" states="draft" string="Confirm" class="oe_highlight"/>
52 <button name="button_check" states="confirmed" string="Run Procurement" class="oe_highlight"/>
53 <button name="button_restart" states="exception" string="Retry" class="oe_highlight"/>
54 <button name="button_cancel" states="draft,exception,waiting" string="Cancel"/>
55 <field name="state" readonly="1" widget="statusbar" statusbar_visible="draft,confirmed" />
58 <label for="name" class="oe_edit_only"/>
60 <field name="name" class="oe_inline"/>
61 <label string="-" attrs="{'invisible':[('origin','=',False)]}"/>
62 <field name="origin" class="oe_inline"/>
66 <field name="date_planned"/>
67 <field name="procure_method"/>
68 <field name="priority"/>
71 <field name="message"/>
72 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
76 <page string="Procurement Details">
79 <field name="product_id" on_change="onchange_product_id(product_id)"/>
80 <label for="product_qty"/>
82 <field name="product_qty" class="oe_inline"/>
83 <field name="product_uom" class="oe_inline"/>
85 <label for="product_uos_qty" groups="product.group_uos"/>
86 <div groups="product.group_uos">
87 <field name="product_uos_qty" class="oe_inline"/>
88 <field name="product_uos" class="oe_inline"/>
92 <field name="location_id" domain="[('usage','=','internal')]"/>
96 <page string="Extra Information">
98 <field name="move_id"/>
99 <field name="date_close"/>
100 <field name="close_move"/>
103 <page string="Notes">
108 <div class="oe_chatter">
109 <field name="message_ids" widget="mail_thread"/>
114 <record id="view_procurement_filter" model="ir.ui.view">
115 <field name="name">procurement.order.select</field>
116 <field name="model">procurement.order</field>
117 <field name="type">search</field>
118 <field name="arch" type="xml">
119 <search string="Search Procurement">
120 <field name="origin" string="Procurement"/>
121 <field name="date_planned"/>
122 <filter icon="terp-emblem-important" string="Exceptions" name="exceptions" domain="[('state','=','exception')]" help="Procurement Exceptions"/>
124 <filter icon="terp-emblem-important" string="To Fix" name="perm_exceptions" domain="[('state','=','exception'),('message', '!=', '')]" help="Permanent Procurement Exceptions"/>
125 <filter icon="terp-emblem-important" string="Temporary" name="temp_exceptions" domain="[('state','=','exception'),('message', '=', '')]" help="Temporary Procurement Exceptions"/>
127 <filter icon="terp-gnome-cpu-frequency-applet+" string="Late" domain="['&', ('date_planned','<', current_date), ('state', 'in', ('draft', 'confirmed'))]" help="Procurement started late" />
128 <field name="product_id" />
129 <field name="state" />
130 <group expand="0" string="Group By">
131 <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
132 <filter string="Reason" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'name'}"/>
133 <filter string="Scheduled Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_planned'}"/>
134 <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
140 <record id="procurement_action" model="ir.actions.act_window">
141 <field name="name">Procurement Orders</field>
142 <field name="type">ir.actions.act_window</field>
143 <field name="res_model">procurement.order</field>
144 <field name="view_type">form</field>
145 <field name="view_id" eval="False"/>
146 <field name="search_view_id" ref="view_procurement_filter"/>
147 <field name="context">{'search_default_current':1}</field>
148 <field name="help" type="html">
149 <p class="oe_view_nocontent_create">
150 Click to create a procurement order.
152 A procurement order is used to record a need for a specific
153 product at a specific location. Procurement orders are usually
154 created automatically from sales orders, pull logistic rules or
157 When the procurement order is confirmed, it automatically
158 creates the necessary operations to fullfil the need: purchase
159 order proposition, manufacturing order, etc.
164 <record id="procurement_exceptions" model="ir.actions.act_window">
165 <field name="name">Procurement Exceptions</field>
166 <field name="type">ir.actions.act_window</field>
167 <field name="res_model">procurement.order</field>
168 <field name="view_type">form</field>
169 <field name="view_mode">tree,form</field>
170 <field name="context">{'search_default_perm_exceptions':1}</field>
171 <field name="search_view_id" ref="view_procurement_filter"/>
172 <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>
175 <record id="procurement_action5" model="ir.actions.act_window">
176 <field name="name">Procurement Exceptions</field>
177 <field name="type">ir.actions.act_window</field>
178 <field name="res_model">procurement.order</field>
179 <field name="view_type">form</field>
180 <field name="view_mode">tree,form</field>
181 <field name="domain">[('state','=','exception')]</field>
185 <record id="view_warehouse_orderpoint_tree" model="ir.ui.view">
186 <field name="name">stock.warehouse.orderpoint.tree</field>
187 <field name="model">stock.warehouse.orderpoint</field>
188 <field name="type">tree</field>
189 <field name="arch" type="xml">
190 <tree string="Reordering Rules">
192 <field name="warehouse_id" groups="stock.group_locations"/>
193 <field name="location_id" groups="stock.group_locations"/>
194 <field name="product_id"/>
195 <field name="product_uom" groups="product.group_uom"/>
196 <field name="product_min_qty"/>
197 <field name="product_max_qty"/>
202 <record model="ir.ui.view" id="warehouse_orderpoint_search">
203 <field name="name">stock.warehouse.orderpoint.search</field>
204 <field name="model">stock.warehouse.orderpoint</field>
205 <field name="type">search</field>
206 <field name="arch" type="xml">
207 <search string="Reordering Rules Search">
208 <field name="name" string="Reordering Rules"/>
209 <field name="warehouse_id"/>
210 <field name="location_id" groups="stock.group_locations"/>
211 <field name="company_id" groups="base.group_multi_company"/>
212 <field name="product_id"/>
213 <group expand="0" string="Group By...">
214 <filter string="Warehouse" icon="terp-go-home" domain="[]" context="{'group_by':'warehouse_id'}"/>
215 <filter string="Location" icon="terp-go-home" domain="[]" context="{'group_by':'location_id'}"/>
221 <record id="view_warehouse_orderpoint_form" model="ir.ui.view">
222 <field name="name">stock.warehouse.orderpoint.form</field>
223 <field name="model">stock.warehouse.orderpoint</field>
224 <field name="type">form</field>
225 <field name="arch" type="xml">
226 <form string="Reordering Rules" version="7.0">
230 <field name="name" />
231 <field name="product_id" on_change="onchange_product_id(product_id)"/>
234 <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection" groups="stock.group_locations"/>
235 <field name="product_uom" groups="product.group_uom"/>
236 <field name="location_id" groups="stock.group_locations"/>
237 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
241 <group string="Rules">
242 <field name="product_min_qty" />
243 <field name="product_max_qty" />
244 <field name="qty_multiple" string="Quantity Multiple"/>
246 <group string="Misc">
247 <field name="procurement_id" readonly="1"/>
248 <field name="active" />
251 <group string="Procurement Orders to Process">
252 <field name="procurement_draft_ids" nolabel="1"/>
259 <record id="action_orderpoint_form" model="ir.actions.act_window">
260 <field name="name">Reordering Rules</field>
261 <field name="res_model">stock.warehouse.orderpoint</field>
262 <field name="type">ir.actions.act_window</field>
263 <field name="view_type">form</field>
264 <field name="view_id" ref="view_warehouse_orderpoint_tree"/>
265 <field name="search_view_id" ref="warehouse_orderpoint_search" />
266 <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>
270 context="{'search_default_warehouse_id': active_id, 'default_warehouse_id': active_id}"
271 id="act_stock_warehouse_2_stock_warehouse_orderpoint"
272 name="Reordering Rules"
273 res_model="stock.warehouse.orderpoint"
274 src_model="stock.warehouse"
275 groups="stock.group_stock_user"/>
278 context="{'product_uom': locals().has_key('uom_id') and uom_id, 'default_procurement_id': active_id}"
279 id="act_procurement_2_stock_warehouse_orderpoint"
280 name="Reordering Rules"
281 res_model="stock.warehouse.orderpoint"
282 src_model="procurement.order"
283 groups="stock.group_stock_user"/>
285 <!-- Procurements are located in Warehouse menu hierarchy, MRP users should come to Stock application to use it. -->
286 <menuitem id="menu_stock_sched" name="Schedulers" parent="stock.menu_stock_root" sequence="4"/>
287 <menuitem action="action_compute_schedulers" id="menu_stock_proc_schedulers" parent="menu_stock_sched" sequence="20" groups="stock.group_stock_manager"/>
288 <menuitem action="procurement_exceptions" id="menu_stock_procurement_action" parent="menu_stock_sched" sequence="50" groups="stock.group_stock_manager"/>
289 <menuitem id="menu_stock_procurement" name="Automatic Procurements" parent="stock.menu_stock_configuration" sequence="5"/>
290 <menuitem action="action_orderpoint_form" id="menu_stock_order_points" parent="stock.menu_stock_configuration" sequence="10"/>
292 <record id="product_normal_form_view" model="ir.ui.view">
293 <field name="name">product.normal.form.orderpoint.inherit</field>
294 <field name="model">product.product</field>
295 <field name="type">form</field>
296 <field name="inherit_id" ref="product.product_normal_form_view"/>
297 <field name="arch" type="xml">
298 <page string="Procurement & Locations" position="inside">
299 <separator string="Minimum Stock Rules"/>
300 <field name="orderpoint_ids" widget="one2many_list" mode="tree" context="{'default_product_id': active_id}">
301 <tree string="Reordering Rules">
303 <field name="warehouse_id"/>
304 <field name="product_min_qty"/>
305 <field name="product_max_qty"/>