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"/>
24 <record id="procurement_form_view" model="ir.ui.view">
25 <field name="name">procurement.order.form</field>
26 <field name="model">procurement.order</field>
27 <field name="arch" type="xml">
28 <form string="Procurement" version="7.0">
30 <button name="run" states="confirmed,exception" string="Run Procurement" class="oe_highlight" type="object"/>
31 <button name="check" states="running" string="Check Procurement" class="oe_highlight" type="object"/>
32 <button name="cancel" states="exception,confirmed,running" string="Cancel Procurement" type="object"/>
33 <button name="reset_to_confirmed" states="cancel" string="Reconfirm Procurement" type="object"/>
34 <field name="state" readonly="1" widget="statusbar" statusbar_visible="draft,confirmed,running,done" />
37 <div class="oe_right oe_button_box" name="button_box">
38 <button name="do_view_procurements" string="Group's Procurements" type="object"/>
42 <field name="product_id" on_change="onchange_product_id(product_id)"/>
43 <label for="product_qty"/>
46 <field name="product_qty" class="oe_inline"/>
47 <field name="product_uom" class="oe_inline" groups="product.group_uom"/>
50 <label for="product_uos_qty" groups="product.group_uos"/>
51 <div groups="product.group_uos">
52 <field name="product_uos_qty" class="oe_inline"/>
53 <field name="product_uos" class="oe_inline"/>
56 <group name="scheduling" string="Scheduling">
57 <field name="date_planned"/>
58 <field name="priority"/>
63 <label for="name" class="oe_edit_only"/>
64 <field name="name" placeholder="External note..."/>
66 <page string="Extra Information">
69 <field name="origin" placeholder="e.g. SO005"/>
70 <field name="group_id" groups="base.group_no_one"/>
73 <field name="rule_id"/>
74 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
80 <div class="oe_chatter">
81 <field name="message_follower_ids" widget="mail_followers"/>
82 <field name="message_ids" widget="mail_thread"/>
88 <record id="do_view_procurements" model="ir.actions.act_window">
89 <field name="name">Group's Procurements</field>
90 <field name="res_model">procurement.order</field>
91 <field name="view_type">form</field>
92 <field name="view_mode">tree,form</field>
93 <field name="domain">[('group_id','=',active_id)]</field>
96 <record id="procurement_group_form_view" model="ir.ui.view">
97 <field name="name">procurement.group.form</field>
98 <field name="model">procurement.group</field>
99 <field name="arch" type="xml">
100 <form string="Procurement group" version="7.0">
102 <div class="oe_right oe_button_box" name="button_box">
103 <button name="%(do_view_procurements)d" string="Procurements" type="action"/>
107 <field name="move_type"/>
108 <field name="partner_id"/>
115 <record id="view_procurement_filter" model="ir.ui.view">
116 <field name="name">procurement.order.select</field>
117 <field name="model">procurement.order</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-gnome-cpu-frequency-applet+" string="Late" domain="['&', ('date_planned','<', current_date), ('state', '=', '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="Scheduled Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_planned'}"/>
130 <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
136 <record id="procurement_action" model="ir.actions.act_window">
137 <field name="name">Procurement Orders</field>
138 <field name="type">ir.actions.act_window</field>
139 <field name="res_model">procurement.order</field>
140 <field name="view_type">form</field>
141 <field name="view_id" eval="False"/>
142 <field name="search_view_id" ref="view_procurement_filter"/>
143 <field name="context">{'search_default_current':1}</field>
144 <field name="help" type="html">
145 <p class="oe_view_nocontent_create">
146 Click to create a procurement order.
149 A <b>procurement order</b> is used to record a need for a specific
150 product at a specific location. Procurement orders are usually
151 created automatically from <i>sales orders, pull logistic rules or
152 minimum stock rules.</i>
155 When the procurement order is confirmed, it automatically
156 creates the necessary operations to fullfil the need: purchase
157 order proposition, manufacturing order, etc.
162 <record id="procurement_exceptions" model="ir.actions.act_window">
163 <field name="name">Procurements</field>
164 <field name="type">ir.actions.act_window</field>
165 <field name="res_model">procurement.order</field>
166 <field name="view_type">form</field>
167 <field name="view_mode">tree,form</field>
168 <field name="context">{}</field>
169 <field name="search_view_id" ref="view_procurement_filter"/>
170 <field name="help" type="html">
171 <p class="oe_view_nocontent_create">
172 Click to create a Procurement.
175 <b>Procurement Orders</b> represent the need for a certain quantity of products, at a given time, in a given location.
178 <b>Sales Orders</b> are one typical source of Procurement Orders (but these are distinct documents).
179 <br/>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...
182 A <b>Procurement Exception</b> 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 in the chatter).
187 <record id="procurement_action5" model="ir.actions.act_window">
188 <field name="name">Procurement Exceptions</field>
189 <field name="type">ir.actions.act_window</field>
190 <field name="res_model">procurement.order</field>
191 <field name="view_type">form</field>
192 <field name="view_mode">tree,form</field>
193 <field name="domain">[('state','=','exception')]</field>
196 <!-- Procurement Rules -->
197 <record model="ir.ui.view" id="view_procurement_rule_tree">
198 <field name="name">procurement.rule.tree</field>
199 <field name="model">procurement.rule</field>
200 <field eval="10" name="priority"/>
201 <field name="arch" type="xml">
202 <tree string="Pull Rules">
204 <field name="action"/>
205 <field name='company_id' groups="base.group_multi_company"/>
210 <record model="ir.ui.view" id="view_procurement_rule_form">
211 <field name="name">procurement.rule.form</field>
212 <field name="model">procurement.rule</field>
213 <field eval="10" name="priority"/>
214 <field name="arch" type="xml">
215 <form string="Pull Rule" version="7.0">
217 <div class="oe_title">
218 <label for="name" class="oe_edit_only"/>
219 <h1><field name="name"/></h1>
222 <group string="General Information">
223 <field name="action"/>
224 <field name="sequence"/>
226 <group name="propagation_group" string="Propagation Options" groups="base.group_no_one">
227 <field name="group_propagation_option"/>
228 <field name="group_id" attrs="{'invisible': [('group_propagation_option', '!=', 'fixed')], 'required': [('group_propagation_option', '=', 'fixed')]}"/>