[MOD] procurement : removed unused reference of product
[odoo/odoo.git] / addons / procurement / procurement_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3         <data>
4                 <!--
5         Procurement
6         -->
7
8         <record id="procurement_tree_view" model="ir.ui.view">
9             <field name="name">procurement.order.tree</field>
10             <field name="model">procurement.order</field>
11             <field name="type">tree</field>
12             <field name="arch" type="xml">
13                 <tree string="Procurement Lines" colors="red:date_planned&lt;current_date and state in ('exception');black:state=='running';darkgreen:state=='confirmed';gray:state in ['done','cancel'];blue:state in ('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="UOM"/>
19                     <field name="procure_method"/>
20                     <field name="state"/>
21                     <field name="message"/>
22                     <field name="name" invisible="1"/>
23                 </tree>
24             </field>
25         </record>
26         <record id="procurement_form_view" model="ir.ui.view">
27             <field name="name">procurement.order.form</field>
28             <field name="model">procurement.order</field>
29             <field name="type">form</field>
30             <field name="arch" type="xml">
31                 <form string="Procurement">
32                     <group col="2" colspan="2">
33                         <separator colspan="2" string="References"/>
34                         <field name="name" string="Procurement Reason"/>
35                         <field name="origin"/>
36                         <field name="company_id" groups="base.group_multi_company" widget="selection"/>
37                     </group>
38                     <group col="2" colspan="2">
39                         <separator colspan="2" string="Planification"/>
40                         <field name="date_planned"/>
41                         <field name="procure_method"/>
42                         <field name="priority" groups="base.group_extended"/>
43                     </group>
44                     <notebook colspan="4">
45                     <page string="Procurement Details">
46                         <separator colspan="4" string="Product &amp; Location"/>
47                         <field name="product_id" on_change="onchange_product_id(product_id)"/>
48                         <field name="location_id" domain="[('usage','=','internal')]"/>
49                         <field name="product_qty"/>
50                         <field name="product_uom" widget="selection"/>
51
52                         <field name="product_uos_qty" groups="product.group_uos,base.group_extended"/>
53                         <field name="product_uos" widget="selection" groups="product.group_uos,base.group_extended"/>
54
55                         <separator colspan="4" string="Status"/>
56                         <field colspan="4" name="message" readonly="1"/>
57                         <field name="state" readonly="1"/>
58                         <group col="7" colspan="2">
59                             <button name="button_confirm" states="draft" string="Confirm" icon="gtk-apply"/>
60                             <button name="button_restart" states="exception" string="Retry" icon="gtk-convert"/>
61                             <button name="button_cancel" states="draft,exception,waiting" string="Cancel" icon="gtk-cancel"/>
62                             <button name="button_check" states="confirmed" string="Run Procurement" icon="gtk-media-play"/>
63                         </group>
64                     </page>
65                     <page string="Extra Information">
66                         <separator colspan="4" string="Details"/>
67                         <field name="move_id" groups="base.group_extended"/>
68                         <field name="date_close"/>
69                         <field name="close_move" groups="base.group_extended"/>
70                         <group colspan="4"  groups="base.group_extended">
71                                 <separator colspan="4" string="Properties" />
72                                 <field colspan="4" name="property_ids" nolabel="1"/>
73                          </group>
74                     </page>
75                     <page string="Notes">
76                         <separator colspan="4" string="Note" />
77                         <field name="note" colspan="4" nolabel="1"/>
78                     </page>
79                     </notebook>
80                 </form>
81             </field>
82         </record>
83         <record id="view_procurement_filter" model="ir.ui.view">
84             <field name="name">procurement.order.select</field>
85             <field name="model">procurement.order</field>
86             <field name="type">search</field>
87             <field name="arch" type="xml">
88                 <search string="Search Procurement">
89                     <group col='10' colspan='4'>
90                        <filter icon="terp-check" string="Current" domain="[('state','in',('draft','confirmed'))]" name="current" help="Procurement Orders in draft or open state."/>
91                        <filter icon="terp-emblem-important" string="Exceptions" domain="[('state','=','exception')]" help="Procurement Orders with exceptions"/>
92                        <filter icon="terp-gnome-cpu-frequency-applet+" string="Late"
93                            domain="['&amp;', ('date_planned::date','&lt;', current_date), ('state', 'in', ('draft', 'confirmed'))]"
94                            help="Procurement started late" />
95                        <filter icon="terp-gtk-go-back-rtl" string="To Fix" domain="[('state', '=', 'exception'),('message','=','')]" help="Procurement Orders with exceptions and without message"/>
96                        <separator orientation="vertical"/>
97                        <field name="name"/>
98                        <field name="origin"/>
99                        <field name="product_id" />
100                        <field name="date_planned" widget="date"/>
101                        <field name="state" />
102                     </group>
103                     <newline/>
104                     <group expand="0" string="Group By" colspan="4" col="8" groups="base.group_extended">
105                         <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
106                         <filter string="Reason" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'name'}"/>
107                         <filter string="Scheduled Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_planned'}"/>
108                         <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
109                     </group>
110                 </search>
111             </field>
112         </record>
113         <record id="procurement_action" model="ir.actions.act_window">
114             <field name="name">Procurement Orders</field>
115             <field name="type">ir.actions.act_window</field>
116             <field name="res_model">procurement.order</field>
117             <field name="view_type">form</field>
118             <field name="view_id" eval="False"/>
119             <field name="context">{'search_default_current':1}</field>
120             <field name="search_view_id" ref="view_procurement_filter"/>
121             <field name="context">{'search_default_Current':1}</field>
122             <field name="help">The procurement order will schedule a proposal for automatic procurement for the product concerned. This procurement will start a task, a purchase order form for the supplier or a production depending on the product configuration.</field>
123         </record>
124
125         <record id="procurement_action3" model="ir.actions.act_window">
126             <field name="name">Procurements</field>
127             <field name="type">ir.actions.act_window</field>
128             <field name="res_model">procurement.order</field>
129             <field name="view_type">form</field>
130             <field name="view_mode">tree,form</field>
131             <field name="search_view_id" ref="view_procurement_filter"/>
132             <field name="domain">[]</field>
133             <field name="context">{}</field>
134         </record>
135
136         <record id="procurement_action5" model="ir.actions.act_window">
137             <field name="name">Procurement Exceptions</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_mode">tree,form</field>
142             <field name="domain">[('state','=','exception')]</field>
143             <field name="help"> For each customer order line or raw materials in a manufacturing order, there is a procurement form . In normal system use, procurement orders are automatically generated by Open ERP. But if there are configuration problems, the system can remain blocked by a procurement without generating a corresponding document. It is a procurement exception. Some problems are link to timing and will be correct automatically by the system. If there is no procurement rule, the exception must be corrected manually.</field>
144         </record>
145
146         <record id="procurement_action4" model="ir.actions.act_window">
147             <field name="name">Procurement Exceptions to Fix</field>
148             <field name="type">ir.actions.act_window</field>
149             <field name="res_model">procurement.order</field>
150             <field name="view_type">form</field>
151             <field name="view_mode">tree,form</field>
152             <field name="domain">[('state','=','exception'), ('message', '&lt;&gt;', '')]</field>
153             <field name="filter" eval="True"/>
154         </record>
155
156         <record id="procurement_action11" model="ir.actions.act_window">
157             <field name="name">Temporary Procurement Exceptions</field>
158             <field name="type">ir.actions.act_window</field>
159             <field name="res_model">procurement.order</field>
160             <field name="view_type">form</field>
161             <field name="view_mode">tree,form</field>
162             <field name="domain">[('state','=','exception'), ('message', '=', '')]</field>
163         </record>
164
165         <!-- Order Point -->
166         <record id="view_warehouse_orderpoint_tree" model="ir.ui.view">
167             <field name="name">stock.warehouse.orderpoint.tree</field>
168             <field name="model">stock.warehouse.orderpoint</field>
169             <field name="type">tree</field>
170             <field name="arch" type="xml">
171                 <tree string="Minimum Stock Rules">
172                     <field name="name"/>
173                     <field name="warehouse_id"/>
174                     <field name="location_id"/>
175                     <field name="product_id"/>
176                     <field name="product_uom"/>
177                     <field name="product_min_qty"/>
178                     <field name="product_max_qty"/>
179                 </tree>
180             </field>
181         </record>
182
183         <record model="ir.ui.view" id="warehouse_orderpoint_search">
184             <field name="name">stock.warehouse.orderpoint.search</field>
185             <field name="model">stock.warehouse.orderpoint</field>
186             <field name="type">search</field>
187             <field name="arch" type="xml">
188                 <search string="Minimum Stock Rules Search">
189                     <group col="10" colspan="4">
190                         <field name="name"/>
191                         <field name="warehouse_id" widget="selection"/>
192                         <field name="location_id"/>
193                         <field name="company_id" widget="selection" groups="base.group_multi_company"/>
194                         <field name="product_id"/>
195                     </group>
196                     <newline/>
197                     <group expand="0" string="Group By..." colspan="4" col="10">
198                         <filter string="Warehouse" icon="terp-go-home" domain="[]"  context="{'group_by':'warehouse_id'}"/>
199                         <filter string="Location" icon="terp-go-home" domain="[]" context="{'group_by':'location_id'}"/>
200                     </group>
201                 </search>
202             </field>
203         </record>
204
205         <record id="view_warehouse_orderpoint_form" model="ir.ui.view">
206             <field name="name">stock.warehouse.orderpoint.form</field>
207             <field name="model">stock.warehouse.orderpoint</field>
208             <field name="type">form</field>
209             <field name="arch" type="xml">
210                 <form string="Minimum Stock Rules">
211                     <group col="2" colspan="2">
212                         <separator string="General Information" colspan="2" />
213                         <field name="name" />
214                         <field name="product_id" on_change="onchange_product_id(product_id)"/>
215                         <field name="product_uom"/>
216                     </group>
217                     <group col="2" colspan="2">
218                         <separator string="Locations" colspan="2" />
219                         <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection"/>
220                         <field name="location_id"/>
221                         <field name="company_id" groups="base.group_multi_company" widget="selection"/>
222                     </group>
223                     <group col="2" colspan="2">
224                         <separator string="Quantity Rules" colspan="2" />
225                         <field name="product_min_qty"/>
226                         <field name="product_max_qty"/>
227                         <field name="qty_multiple"/>
228                     </group>
229                     <group col="2" colspan="2" groups="base.group_extended">
230                         <separator string="Misc" colspan="2" />
231                         <field name="procurement_id" readonly="1"/>
232                         <field name="active" />
233                     </group>
234                 </form>
235             </field>
236         </record>
237
238         <record id="action_orderpoint_form" model="ir.actions.act_window">
239             <field name="name">Minimum Stock Rules</field>
240             <field name="res_model">stock.warehouse.orderpoint</field>
241             <field name="type">ir.actions.act_window</field>
242             <field name="view_type">form</field>
243             <field name="view_id" ref="view_warehouse_orderpoint_tree"/>
244             <field name="search_view_id" ref="warehouse_orderpoint_search" />
245         </record>
246
247         <act_window domain="[('warehouse_id', '=', active_id)]" id="act_stock_warehouse_2_stock_warehouse_orderpoint" name="Minimum Stock Rules" res_model="stock.warehouse.orderpoint" src_model="stock.warehouse"/>
248
249         <!-- add product_uom to context to be the default value when adding new orderpoints -->
250         <act_window
251             context="{'product_uom': locals().has_key('uom_id') and uom_id}"
252             domain="[('product_id', '=', active_id)]"
253             id="act_product_product_2_stock_warehouse_orderpoint"
254             name="Minimum Stock Rules"
255             res_model="stock.warehouse.orderpoint"
256             src_model="product.product"/>
257
258         <act_window
259             context="{'product_uom': locals().has_key('uom_id') and uom_id}"
260             domain="[('product_id', '=', active_id)]"
261             id="act_procurement_2_stock_warehouse_orderpoint"
262             name="Minimum Stock Rules"
263             res_model="stock.warehouse.orderpoint"
264             src_model="procurement.order"/>
265
266 <!--        <act_window-->
267 <!--            domain="[('id', '=', product_id)]"-->
268 <!--            id="act_product_product_2_stock_warehouse_orderpoint"-->
269 <!--            name="Product"-->
270 <!--            res_model="product.product"-->
271 <!--            src_model="procurement.order"/>-->
272
273     </data>
274 </openerp>