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 eval="20" name="priority"/>
32 <field name="arch" type="xml">
33 <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')">
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" groups="base.group_extended"/>
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,base.group_extended"/>
71 <field name="product_uos" groups="product.group_uos,base.group_extended"/>
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" groups="base.group_extended"/>
86 <field name="date_close"/>
87 <field name="close_move" groups="base.group_extended"/>
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">
103 <group col='10' colspan='4'>
104 <filter icon="terp-check" string="Current" domain="[('state','in',('draft','confirmed'))]" name="current" help="Procurement Orders in draft or open state."/>
105 <filter icon="terp-gnome-cpu-frequency-applet+" string="Late"
106 domain="['&', ('date_planned::date','<', current_date), ('state', 'in', ('draft', 'confirmed'))]"
107 help="Procurement started late" />
108 <separator orientation="vertical"/>
109 <filter icon="terp-emblem-important" string="Exceptions" name="exceptions" domain="[('state','=','exception')]" help="Procurement Exceptions"/>
110 <filter icon="terp-emblem-important" string="To Fix" name="perm_exceptions" domain="[('state','=','exception'),('message', '!=', '')]" help="Permanent Procurement Exceptions"/>
111 <filter icon="terp-emblem-important" string="Temporary" name="temp_exceptions" domain="[('state','=','exception'),('message', '=', '')]" help="Temporary Procurement Exceptions"/>
112 <separator orientation="vertical"/>
113 <field name="origin"/>
114 <field name="product_id" />
115 <field name="date_planned" widget="date"/>
116 <field name="state" />
119 <group expand="0" string="Group By" colspan="4" col="8" groups="base.group_extended">
120 <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
121 <filter string="Reason" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'name'}"/>
122 <filter string="Scheduled Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_planned'}"/>
123 <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
129 <record id="procurement_action" model="ir.actions.act_window">
130 <field name="name">Procurement Orders</field>
131 <field name="type">ir.actions.act_window</field>
132 <field name="res_model">procurement.order</field>
133 <field name="view_type">form</field>
134 <field name="view_id" eval="False"/>
135 <field name="search_view_id" ref="view_procurement_filter"/>
136 <field name="context">{'search_default_current':1}</field>
137 <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>
140 <record id="procurement_exceptions" model="ir.actions.act_window">
141 <field name="name">Procurement Exceptions</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_mode">tree,form</field>
146 <field name="context">{'search_default_perm_exceptions':1}</field>
147 <field name="search_view_id" ref="view_procurement_filter"/>
148 <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>
151 <record id="procurement_action5" model="ir.actions.act_window">
152 <field name="name">Procurement Exceptions</field>
153 <field name="type">ir.actions.act_window</field>
154 <field name="res_model">procurement.order</field>
155 <field name="view_type">form</field>
156 <field name="view_mode">tree,form</field>
157 <field name="domain">[('state','=','exception')]</field>
161 <record id="view_warehouse_orderpoint_tree" model="ir.ui.view">
162 <field name="name">stock.warehouse.orderpoint.tree</field>
163 <field name="model">stock.warehouse.orderpoint</field>
164 <field name="type">tree</field>
165 <field name="arch" type="xml">
166 <tree string="Minimum Stock Rules">
168 <field name="warehouse_id"/>
169 <field name="location_id"/>
170 <field name="product_id"/>
171 <field name="product_uom"/>
172 <field name="product_min_qty"/>
173 <field name="product_max_qty"/>
178 <record model="ir.ui.view" id="warehouse_orderpoint_search">
179 <field name="name">stock.warehouse.orderpoint.search</field>
180 <field name="model">stock.warehouse.orderpoint</field>
181 <field name="type">search</field>
182 <field name="arch" type="xml">
183 <search string="Minimum Stock Rules Search">
184 <group col="10" colspan="4">
186 <field name="warehouse_id" widget="selection"/>
187 <field name="location_id"/>
188 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
189 <field name="product_id"/>
192 <group expand="0" string="Group By..." colspan="4" col="10">
193 <filter string="Warehouse" icon="terp-go-home" domain="[]" context="{'group_by':'warehouse_id'}"/>
194 <filter string="Location" icon="terp-go-home" domain="[]" context="{'group_by':'location_id'}"/>
200 <record id="view_warehouse_orderpoint_form" model="ir.ui.view">
201 <field name="name">stock.warehouse.orderpoint.form</field>
202 <field name="model">stock.warehouse.orderpoint</field>
203 <field name="type">form</field>
204 <field name="arch" type="xml">
205 <form string="Minimum Stock Rules">
206 <group col="2" colspan="2">
207 <separator string="General Information" colspan="2" />
208 <field name="name" />
209 <field name="product_id" on_change="onchange_product_id(product_id)"/>
210 <field name="product_uom"/>
212 <group col="2" colspan="2">
213 <separator string="Locations" colspan="2" />
214 <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection"/>
215 <field name="location_id"/>
216 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
218 <group col="2" colspan="2">
219 <separator string="Quantity Rules" colspan="2" />
220 <field name="product_min_qty"/>
221 <field name="product_max_qty"/>
222 <field name="qty_multiple"/>
224 <group col="2" colspan="2" groups="base.group_extended">
225 <separator string="Misc" colspan="2" />
226 <field name="procurement_id" readonly="1"/>
227 <field name="active" />
229 <group col="4" colspan="4" groups="base.group_extended">
230 <separator string="Procurement Orders to Process" colspan="4" />
231 <field name="procurement_draft_ids" colspan="4" nolabel="1"/>
237 <record id="action_orderpoint_form" model="ir.actions.act_window">
238 <field name="name">Minimum Stock Rules</field>
239 <field name="res_model">stock.warehouse.orderpoint</field>
240 <field name="type">ir.actions.act_window</field>
241 <field name="view_type">form</field>
242 <field name="view_id" ref="view_warehouse_orderpoint_tree"/>
243 <field name="search_view_id" ref="warehouse_orderpoint_search" />
244 <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>
248 context="{'search_default_warehouse_id': active_id}"
249 id="act_stock_warehouse_2_stock_warehouse_orderpoint"
250 name="Minimum Stock Rules"
251 res_model="stock.warehouse.orderpoint"
252 src_model="stock.warehouse"
253 groups="stock.group_stock_user"/>
255 <!-- add product_uom to context to be the default value when adding new orderpoints -->
257 context="{'product_uom': locals().has_key('uom_id') and uom_id,'search_default_product_id': [active_id]}"
258 domain="[('product_id', '=', active_id)]"
259 id="act_product_product_2_stock_warehouse_orderpoint"
260 name="Minimum Stock Rules"
261 res_model="stock.warehouse.orderpoint"
262 src_model="product.product"
263 groups="stock.group_stock_user"/>
266 context="{'product_uom': locals().has_key('uom_id') and uom_id}"
267 domain="[('procurement_id', '=', active_id)]"
268 id="act_procurement_2_stock_warehouse_orderpoint"
269 name="Minimum Stock Rules"
270 res_model="stock.warehouse.orderpoint"
271 src_model="procurement.order"
272 groups="stock.group_stock_user"/>
274 <!-- Procurements are located in Warehouse menu hierarchy, MRP users should come to Stock application to use it. -->
275 <menuitem id="menu_stock_sched" name="Schedulers" parent="stock.menu_stock_root" sequence="4"/>
276 <menuitem action="action_compute_schedulers" id="menu_stock_proc_schedulers" parent="menu_stock_sched" sequence="20" groups="stock.group_stock_manager"/>
277 <menuitem action="procurement_exceptions" id="menu_stock_procurement_action" parent="menu_stock_sched" sequence="50" groups="stock.group_stock_manager"/>
278 <menuitem id="menu_stock_procurement" name="Automatic Procurements" parent="stock.menu_stock_configuration" sequence="5"/>
279 <menuitem action="action_orderpoint_form" id="menu_stock_order_points" parent="menu_stock_procurement" sequence="10"/>