Merge with addons
[odoo/odoo.git] / addons / purchase / purchase_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4         <menuitem icon="terp-purchase" id="menu_purchase_root" name="Purchase Management"/>
5
6        <record model="ir.ui.view" id="purchase_order_calendar">
7             <field name="name">purchase.order.calendar</field>
8             <field name="model">purchase.order</field>
9             <field name="type">calendar</field>
10             <field name="priority" eval="2"/>
11             <field name="arch" type="xml">
12                 <calendar string="Calendar View" date_start="minimum_planned_date" color="partner_id">
13                     <field name="name"/>
14                     <field name="amount_total"/>
15                     <field name="partner_id"/>
16                 </calendar>
17             </field>
18         </record>
19         <record model="ir.ui.view" id="view_purchase_order_graph">
20             <field name="name">purchase.order.graph</field>
21             <field name="model">purchase.order</field>
22             <field name="type">graph</field>
23             <field name="arch" type="xml">
24                 <graph string="Purchase Order" type="bar">
25                     <field name="partner_id"/>
26                     <field name="amount_total" operator="+"/>
27                 </graph>
28             </field>
29         </record>
30
31         <record id="purchase_order_form" model="ir.ui.view">
32             <field name="name">purchase.order.form</field>
33             <field name="model">purchase.order</field>
34             <field name="type">form</field>
35             <field name="arch" type="xml">
36                 <form string="Purchase Order">
37                     <group col="6" colspan="4">
38                         <field name="name" select="1"/>
39                         <field name="date_order" select="2"/>
40                         <field name="invoiced" select="2"/>
41                         <newline/>
42                         <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)"/>
43                         <field name="origin" select="2"/>
44                         <field name="shipped" select="2"/>
45                     </group>
46                     <notebook colspan="4">
47                         <page string="Purchase Order">
48                             <field name="partner_id" on_change="onchange_partner_id(partner_id)" select="1" domain="[('supplier','=', 1)]"/>
49                             <field name="partner_address_id"/>
50                             <field domain="[('type','=','purchase')]" name="pricelist_id"/>
51                             <field name="partner_ref" select="2"/>
52                             <newline/>
53                             <field colspan="4" name="order_line" nolabel="1" widget="one2many_list"/>
54                             <group col="7" colspan="4">
55                                 <field name="amount_untaxed" sum="Untaxed amount"/>
56                                 <field name="amount_tax"/>
57                                 <field name="amount_total" sum="Total amount"/>
58                                 <button name="button_dummy" states="draft" string="Compute" type="object"/>
59                             </group>
60                             <group col="9" colspan="4">
61                                 <field name="state" readonly="1"/>
62                                 <button name="purchase_confirm" states="draft" string="Confirm Purchase Order"/>
63                                 <button name="purchase_appbuyer" states="wait_auth" string="Approve Purchase"/>
64                                 <button name="purchase_approve" states="confirmed" string="Approved by Supplier"/>
65                                 <button name="purchase_cancel" states="draft,confirmed,wait_auth" string="Cancel Purchase Order"/>
66
67                                 <button name="purchase_cancel" states="approved" string="Cancel Purchase Order"/>
68
69                                 <button name="shipping_ok" states="except_shipping" string="Shipping Done"/>
70                                 <button name="invoice_ok" states="except_invoice" string="Invoice Done"/>
71                             </group>
72                         </page>
73                         <page string="Delivery &amp; Invoices">
74                             <group colspan="2" col="2">
75                                 <separator string="Delivery" colspan="2"/>
76                                 <field name="dest_address_id" on_change="onchange_dest_address_id(dest_address_id)"/>
77                                 <field name="minimum_planned_date"/>
78                                 <field name="location_id"/>
79                             </group>
80                             <group colspan="2" col="2">
81                                 <separator string="Invoice Control" colspan="2"/>
82                                 <field name="invoice_method"/>
83                             </group>
84                             <newline/>
85                             <separator string="Purchase Control" colspan="4"/>
86                             <field name="validator"/>
87                             <field name="date_approve"/>
88                         </page>
89                         <page string="Notes">
90                             <field colspan="4" name="notes" nolabel="1"/>
91                         </page>
92                     </notebook>
93                 </form>
94             </field>
95         </record>
96
97         <record id="purchase_form_action" model="ir.actions.act_window">
98             <field name="name">Purchase Orders</field>
99             <field name="type">ir.actions.act_window</field>
100             <field name="res_model">purchase.order</field>
101             <field name="view_mode">tree,form,calendar,graph</field>
102         </record>
103         <menuitem action="purchase_form_action" id="menu_purchase_form_action" parent="purchase.menu_purchase_root"/>
104
105         <record id="purchase_form_action2" model="ir.actions.act_window">
106             <field name="name">Request For Quotations</field>
107             <field name="type">ir.actions.act_window</field>
108             <field name="res_model">purchase.order</field>
109             <field name="domain">[('state','=','draft')]</field>
110             <field name="view_type">form</field>
111             <field name="view_mode">tree,form,calendar,graph</field>
112         </record>
113         <menuitem action="purchase_form_action2" id="menu_purchase_order_draft" parent="purchase.menu_purchase_form_action"/>
114
115         <record id="purchase_form_action3" model="ir.actions.act_window">
116             <field name="name">Purchase Order Waiting Approval</field>
117             <field name="type">ir.actions.act_window</field>
118             <field name="res_model">purchase.order</field>
119             <field name="view_type">form</field>
120             <field name="view_mode">tree,form,calendar,graph</field>
121             <field name="domain">[('state','=','confirmed')]</field>
122         </record>
123         <menuitem action="purchase_form_action3" id="menu_purchase_form_action3" parent="purchase.menu_purchase_form_action"/>
124
125         <record id="purchase_form_action4" model="ir.actions.act_window">
126             <field name="name">Purchase Orders in Progress</field>
127             <field name="type">ir.actions.act_window</field>
128             <field name="res_model">purchase.order</field>
129             <field name="view_type">form</field>
130             <field name="view_mode">tree,form,calendar,graph</field>
131             <field name="domain">[('state','=','approved')]</field>
132         </record>
133         <menuitem action="purchase_form_action4" id="menu_purchase_form_action4" parent="purchase.menu_purchase_form_action"/>
134
135         <record id="purchase_form_action_new" model="ir.actions.act_window">
136             <field name="name">New Purchase Order</field>
137             <field name="type">ir.actions.act_window</field>
138             <field name="res_model">purchase.order</field>
139             <field name="view_mode">form,tree</field>
140         </record>
141         <menuitem action="purchase_form_action_new" id="menu_purchase_form_action_new" parent="purchase.menu_purchase_root"/>
142
143
144         <record id="purchase_order_tree" model="ir.ui.view">
145             <field name="name">purchase.order.tree</field>
146             <field name="model">purchase.order</field>
147             <field name="type">tree</field>
148             <field name="arch" type="xml">
149                 <tree string="Purchase Order">
150                     <field name="name" string="Reference"/>
151                     <field name="date_order"/>
152                     <field name="minimum_planned_date"/>
153                     <field name="partner_id"/>
154                     <field name="location_id"/>
155                     <field name="invoiced_rate" widget="progressbar"/>
156                     <field name="shipped_rate" widget="progressbar"/>
157                     <field name="amount_untaxed"/>
158                     <field name="origin"/>
159                     <field name="state"/>
160                 </tree>
161             </field>
162         </record>
163
164         <record id="purchase_order_line_form" model="ir.ui.view">
165             <field name="name">purchase.order.line.form</field>
166             <field name="model">purchase.order.line</field>
167             <field name="type">form</field>
168             <field name="arch" type="xml">
169                 <form string="Purchase Order Line">
170                     <notebook>
171                         <page string="Order Line">
172                             <field colspan="4" context="partner_id=parent.partner_id,quantity=product_qty,pricelist=parent.pricelist_id,uom=product_uom,warehouse=parent.warehouse_id" name="product_id" on_change="product_id_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id, parent.date_order)"/>
173                             <field name="product_qty"/>
174                             <field name="product_uom" on_change="product_uom_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id, parent.date_order)"/>
175                             <field colspan="4" name="name"/>
176                             <field name="date_planned"/>
177                             <field name="price_unit"/>
178                             <field name="account_analytic_id"/>
179                             <field name="price_subtotal" readonly="1"/>
180                             <field colspan="4" name="taxes_id" domain="[('parent_id','=',False)]"/>
181                         </page>
182                         <page string="Notes">
183                             <field colspan="4" name="notes" nolabel="1"/>
184                         </page>
185                     </notebook>
186                 </form>
187             </field>
188         </record>
189
190         <record id="purchase_order_line_tree" model="ir.ui.view">
191             <field name="name">purchase.order.line.tree</field>
192             <field name="model">purchase.order.line</field>
193             <field name="type">tree</field>
194             <field name="arch" type="xml">
195                 <tree colors="red:date_planned&lt;=current_date" string="Purchase Order Line">
196                     <field name="date_planned"/>
197                     <field name="name"/>
198                     <field name="product_id"/>
199                     <field name="product_qty"/>
200                     <field name="product_uom"/>
201                     <field name="price_unit"/>
202                     <field name="price_subtotal"/>
203                 </tree>
204             </field>
205         </record>
206
207         <act_window context="{'partner_id': active_id}" domain="[('partner_id', '=', active_id)]" id="act_res_partner_2_purchase_order" name="Purchase orders" res_model="purchase.order" src_model="res.partner"/>
208     </data>
209 </openerp>