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="arch" type="xml">
13 <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'">
14 <field name="date_planned" widget="date"/>
15 <field name="origin"/>
16 <field name="product_id"/>
17 <field name="product_qty"/>
18 <field name="product_uom" string="Unit of Measure"/>
19 <field name="procure_method"/>
21 <field name="message"/>
22 <field name="name" invisible="1"/>
26 <record id="procurement_tree_view_board" model="ir.ui.view">
27 <field name="name">procurement.order.tree.board</field>
28 <field name="model">procurement.order</field>
29 <field eval="20" name="priority"/>
30 <field name="arch" type="xml">
31 <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'">
32 <field name="date_planned" widget="date"/>
33 <field name="origin"/>
34 <field name="product_id"/>
35 <field name="product_qty"/>
36 <field name="product_uom" string="Unit of Measure"/>
37 <field name="state" invisible = "1"/>
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="arch" type="xml">
46 <form string="Procurement" version="7.0">
48 <button name="button_confirm" states="draft" string="Confirm" class="oe_highlight"/>
49 <button name="button_check" states="confirmed" string="Run Procurement" class="oe_highlight"/>
50 <button name="button_restart" states="exception" string="Retry" class="oe_highlight"/>
51 <button name="button_cancel" states="draft,exception,waiting" string="Cancel"/>
52 <field name="state" readonly="1" widget="statusbar" statusbar_visible="draft,confirmed" />
55 <label for="name" class="oe_edit_only"/>
57 <field name="name" class="oe_inline"/>
58 <label string="-" attrs="{'invisible':[('origin','=',False)]}"/>
59 <field name="origin" class="oe_inline"/>
63 <field name="date_planned"/>
64 <field name="procure_method"/>
65 <field name="priority"/>
68 <field name="message"/>
69 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
73 <page string="Procurement Details">
76 <field name="product_id" on_change="onchange_product_id(product_id)"/>
77 <label for="product_qty"/>
79 <field name="product_qty" class="oe_inline"/>
80 <field name="product_uom" class="oe_inline"/>
82 <label for="product_uos_qty" groups="product.group_uos"/>
83 <div groups="product.group_uos">
84 <field name="product_uos_qty" class="oe_inline"/>
85 <field name="product_uos" class="oe_inline"/>
89 <field name="location_id" domain="[('usage','=','internal')]"/>
93 <page string="Extra Information">
95 <field name="move_id"/>
96 <field name="date_close"/>
97 <field name="close_move"/>
100 <page string="Notes">
105 <div class="oe_chatter">
106 <field name="message_follower_ids" widget="mail_followers"/>
107 <field name="message_ids" widget="mail_thread"/>
112 <record id="view_procurement_filter" model="ir.ui.view">
113 <field name="name">procurement.order.select</field>
114 <field name="model">procurement.order</field>
115 <field name="arch" type="xml">
116 <search string="Search Procurement">
117 <field name="origin" string="Procurement"/>
118 <field name="date_planned"/>
119 <filter icon="terp-emblem-important" string="Exceptions" name="exceptions" domain="[('state','=','exception')]" help="Procurement Exceptions"/>
121 <filter icon="terp-emblem-important" string="To Fix" name="perm_exceptions" domain="[('state','=','exception'),('message', '!=', '')]" help="Permanent Procurement Exceptions"/>
122 <filter icon="terp-emblem-important" string="Temporary" name="temp_exceptions" domain="[('state','=','exception'),('message', '=', '')]" help="Temporary Procurement Exceptions"/>
124 <filter icon="terp-gnome-cpu-frequency-applet+" string="Late" domain="['&', ('date_planned','<', current_date), ('state', 'in', ('draft', 'confirmed'))]" help="Procurement started late" />
125 <field name="product_id" />
126 <field name="state" />
127 <group expand="0" string="Group By">
128 <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
129 <filter string="Reason" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'name'}"/>
130 <filter string="Scheduled Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_planned'}"/>
131 <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
137 <record id="procurement_action" model="ir.actions.act_window">
138 <field name="name">Procurement Orders</field>
139 <field name="type">ir.actions.act_window</field>
140 <field name="res_model">procurement.order</field>
141 <field name="view_type">form</field>
142 <field name="view_id" eval="False"/>
143 <field name="search_view_id" ref="view_procurement_filter"/>
144 <field name="context">{'search_default_current':1}</field>
145 <field name="help" type="html">
146 <p class="oe_view_nocontent_create">
147 Click to create a procurement order.
149 A procurement order is used to record a need for a specific
150 product at a specific location. Procurement orders are usually
151 created automatically from sales orders, pull logistic rules or
154 When the procurement order is confirmed, it automatically
155 creates the necessary operations to fullfil the need: purchase
156 order proposition, manufacturing order, etc.
161 <record id="procurement_exceptions" model="ir.actions.act_window">
162 <field name="name">Procurement Exceptions</field>
163 <field name="type">ir.actions.act_window</field>
164 <field name="res_model">procurement.order</field>
165 <field name="view_type">form</field>
166 <field name="view_mode">tree,form</field>
167 <field name="context">{'search_default_perm_exceptions':1}</field>
168 <field name="search_view_id" ref="view_procurement_filter"/>
169 <field name="help" type="html">
171 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).
176 <record id="procurement_action5" model="ir.actions.act_window">
177 <field name="name">Procurement Exceptions</field>
178 <field name="type">ir.actions.act_window</field>
179 <field name="res_model">procurement.order</field>
180 <field name="view_type">form</field>
181 <field name="view_mode">tree,form</field>
182 <field name="domain">[('state','=','exception')]</field>
186 <record id="view_warehouse_orderpoint_tree" model="ir.ui.view">
187 <field name="name">stock.warehouse.orderpoint.tree</field>
188 <field name="model">stock.warehouse.orderpoint</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="arch" type="xml">
206 <search string="Reordering Rules Search">
207 <field name="name" string="Reordering Rules"/>
208 <field name="warehouse_id"/>
209 <field name="location_id" groups="stock.group_locations"/>
210 <field name="company_id" groups="base.group_multi_company"/>
211 <field name="product_id"/>
212 <group expand="0" string="Group By...">
213 <filter string="Warehouse" icon="terp-go-home" domain="[]" context="{'group_by':'warehouse_id'}"/>
214 <filter string="Location" icon="terp-go-home" domain="[]" context="{'group_by':'location_id'}"/>
220 <record id="view_warehouse_orderpoint_form" model="ir.ui.view">
221 <field name="name">stock.warehouse.orderpoint.form</field>
222 <field name="model">stock.warehouse.orderpoint</field>
223 <field name="arch" type="xml">
224 <form string="Reordering Rules" version="7.0">
228 <field name="name" />
229 <field name="product_id" on_change="onchange_product_id(product_id)"/>
232 <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection" groups="stock.group_locations"/>
233 <field name="product_uom" groups="product.group_uom"/>
234 <field name="location_id" groups="stock.group_locations"/>
235 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
239 <group string="Rules">
240 <field name="product_min_qty" />
241 <field name="product_max_qty" />
242 <field name="qty_multiple" string="Quantity Multiple"/>
244 <group string="Misc">
245 <field name="procurement_id" readonly="1"/>
246 <field name="active" />
249 <group string="Procurement Orders to Process">
250 <field name="procurement_draft_ids" nolabel="1"/>
257 <record id="action_orderpoint_form" model="ir.actions.act_window">
258 <field name="name">Reordering Rules</field>
259 <field name="res_model">stock.warehouse.orderpoint</field>
260 <field name="type">ir.actions.act_window</field>
261 <field name="view_type">form</field>
262 <field name="view_id" ref="view_warehouse_orderpoint_tree"/>
263 <field name="search_view_id" ref="warehouse_orderpoint_search" />
264 <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>
268 context="{'search_default_warehouse_id': active_id, 'default_warehouse_id': active_id}"
269 id="act_stock_warehouse_2_stock_warehouse_orderpoint"
270 name="Reordering Rules"
271 res_model="stock.warehouse.orderpoint"
272 src_model="stock.warehouse"
273 groups="stock.group_stock_user"/>
276 context="{'product_uom': locals().has_key('uom_id') and uom_id, 'default_procurement_id': active_id}"
277 id="act_procurement_2_stock_warehouse_orderpoint"
278 name="Reordering Rules"
279 res_model="stock.warehouse.orderpoint"
280 src_model="procurement.order"
281 groups="stock.group_stock_user"/>
283 <!-- Procurements are located in Warehouse menu hierarchy, MRP users should come to Stock application to use it. -->
284 <menuitem id="menu_stock_sched" name="Schedulers" parent="stock.menu_stock_root" sequence="4"/>
285 <menuitem action="action_compute_schedulers" id="menu_stock_proc_schedulers" parent="menu_stock_sched" sequence="20" groups="stock.group_stock_manager"/>
286 <menuitem action="procurement_exceptions" id="menu_stock_procurement_action" parent="menu_stock_sched" sequence="50" groups="stock.group_stock_manager"/>
287 <menuitem id="menu_stock_procurement" name="Automatic Procurements" parent="stock.menu_stock_configuration" sequence="5"/>
288 <menuitem action="action_orderpoint_form" id="menu_stock_order_points" parent="stock.menu_stock_configuration" sequence="10"/>
291 <record model="ir.actions.act_window" id="product_open_orderpoint">
292 <field name="context">{'default_product_id': active_id, 'search_default_product_id': active_id}</field>
293 <field name="name">Orderpoints</field>
294 <field name="res_model">stock.warehouse.orderpoint</field>
297 <record model="ir.ui.view" id="product_template_form_view_procurement">
298 <field name="name">product.template.procurement</field>
299 <field name="model">product.template</field>
300 <field name="inherit_id" ref="product.product_template_form_view"/>
301 <field name="arch" type="xml">
302 <xpath expr="//field[@name='type']" position="after">
303 <field name="procure_method"/>
304 <field name="supply_method"/>
309 <record id="product_search_form_view_procurment" model="ir.ui.view">
310 <field name="name">product.search.procurment.form</field>
311 <field name="model">product.product</field>
312 <field name="inherit_id" ref="product.product_search_form_view"/>
313 <field name="arch" type="xml">
314 <filter name="consumable" position="before">
315 <filter string="Products" icon="terp-accessories-archiver" domain="[('type','=','product')]" help="Stockable products"/>
320 <record model="ir.ui.view" id="product_form_view_procurement_button">
321 <field name="name">product.product.procurement</field>
322 <field name="model">product.product</field>
323 <field name="inherit_id" ref="product.product_normal_form_view"/>
324 <field name="arch" type="xml">
325 <xpath expr="//div[@name='buttons']" position="inside">
326 <button string="Request Procurement" name="%(act_make_procurement)d" type="action"/>
327 <button string="Orderpoints" name="%(product_open_orderpoint)d" type="action"/>
329 <xpath expr="//field[@name='cost_method']" position="before">
330 <field name="procure_method" groups="base.group_user"/>
331 <field name="supply_method" groups="base.group_user"/>
333 <xpath expr="//group[@name='general']" position="after" >
334 <group name="procurement_help" class="oe_grey" col="1" groups="base.group_user">
335 <p attrs="{'invisible': ['|','|',('type','<>','service'),('procure_method','<>','make_to_stock')]}">
336 When you sell this service, nothing special will be triggered
337 to deliver the customer, as you set the procurement method as
340 <p attrs="{'invisible': ['|','|',('type','<>','product'),('procure_method','<>','make_to_stock')]}">
341 When you sell this product, OpenERP will <b>use the available
342 inventory</b> for the delivery order.
344 If there are not enough quantities available, the delivery order
345 will wait for new products. To fulfill the inventory, you should
346 create others rules like orderpoints.
348 <p attrs="{'invisible': ['|','|',('type','<>','consu'),('procure_method','<>','make_to_stock')]}">
349 When you sell this product, a delivery order will be created.
350 OpenERP will consider that the <b>required quantities are always
351 available</b> as it's a consumable (as a result of this, the quantity
352 on hand may become negative).