Cleaning upper/lowercase in menus
[odoo/odoo.git] / addons / purchase / purchase_view.xml
1 <?xml version="1.0"?>
2 <terp>
3 <data>
4
5         <menuitem name="Purchase Management" id="menu_purchase_root" icon="terp-purchase"/>
6
7         <record model="ir.ui.view" id="purchase_order_form">
8                 <field name="name">purchase.order.form</field>
9                 <field name="model">purchase.order</field>
10                 <field name="type">form</field>
11                 <field name="arch" type="xml">
12                         <form string="Purchase Order">
13                                 <notebook>
14                                         <page string="Purchase Order">
15                                                 <field name="name" select="1"/>
16                                                 <group colspan="2" col="4">
17                                                         <field name="shipped" select="2"/>
18                                                         <field name="invoiced" select="2"/>
19                                                 </group>
20                                                 <newline/>
21                                                 <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)"/>
22                                                 <field name="date_order" select="2"/>
23                                                 <field name="partner_id" select="1" on_change="onchange_partner_id(partner_id)"/>
24                                                 <field name="partner_address_id"/>
25                                                 <field name="pricelist_id" domain="[('type','=','purchase')]"/>
26                                                 <field name="ref" select="1"/>
27                                                 <field name="partner_ref" select="2"/>
28                                                 <newline/>
29                                                 <field name="order_line" widget="one2many_list" colspan="4" nolabel="1"/>
30                                                 <separator string="Document State" colspan="4" select="2"/>
31                                                 <group colspan="4" col="7">
32                                                         <field name="amount_untaxed" sum="Untaxed amount"/>
33                                                         <field name="amount_tax"/>
34                                                         <field name="amount_total" sum="Total amount"/>
35                                                         <button name="button_dummy" string="Compute" states="draft" type="object"/>
36                                                 </group>
37                                                 <group col="9" colspan="4">
38                                                         <field name="state" readonly="1"/>
39                                                         <button name="purchase_confirm" states="draft" string="Confirm Purchase Order"/>
40                                                         <button name="purchase_appbuyer" states="wait_auth" string="Approve Purchase"/>
41                                                         <button name="purchase_approve" states="confirmed" string="Approved by Supplier"/>
42                                                         <button name="purchase_cancel" states="draft,confirmed,wait_auth" string="Cancel Purchase Order"/>
43
44                                                         <button name="purchase_cancel" states="approved" string="Cancel Purchase Order"/>
45
46                                                         <button name="shipping_ok" states="except_shipping" string="Shipping Done"/>
47                                                         <button name="invoice_ok" states="except_invoice" string="Invoice Done"/>
48                                                 </group>
49                                         </page>
50                                         <page string="Purchase Shippings">
51                                                 <field name="dest_address_id" on_change="onchange_dest_address_id(dest_address_id)"/>
52                                                 <field name="location_id"/>
53                                                 <field name="invoice_method"/>
54                                                 <newline/>
55                                                 <field name="invoice_id" colspan="4"/>
56                                                 <field name="picking_ids" colspan="4"/>
57                                         </page>
58                                         <page string="Notes">
59                                                 <field name="validator" />
60                                                 <field name="date_approve" />
61                                                 <field name="origin" select="2"/>
62                                                 <field name="notes" colspan="4" nolabel="1"/>
63                                         </page>
64                                 </notebook>
65                         </form>
66                 </field>
67         </record>
68
69         <record model="ir.actions.act_window" id="purchase_form_action">
70                 <field name="type">ir.actions.act_window</field>
71                 <field name="res_model">purchase.order</field>
72                 <field name="view_mode">form,tree</field>
73         </record>
74         <menuitem name="Purchase Management/Purchase order" id="menu_purchase_form_action" action="purchase_form_action"/>
75         <record model="ir.actions.act_window" id="purchase_form_action2">
76                 <field name="name">Request for quotation</field>
77                 <field name="type">ir.actions.act_window</field>
78                 <field name="res_model">purchase.order</field>
79                 <field name="domain">[('state','=','draft')]</field>
80                 <field name="view_type">form</field>
81                 <field name="view_mode">tree,form</field>
82         </record>
83         <menuitem name="Purchase Management/Purchase order/Requests for quotation" action="purchase_form_action2" id="menu_purchase_order_draft"/>
84         <record model="ir.actions.act_window" id="purchase_form_action3">
85                 <field name="name">Purchase order waiting Approval</field>
86                 <field name="type">ir.actions.act_window</field>
87                 <field name="res_model">purchase.order</field>
88                 <field name="view_type">form</field>
89                 <field name="view_mode">tree,form</field>
90                 <field name="domain">[('state','=','confirmed')]</field>
91         </record>
92         <menuitem name="Purchase Management/Purchase order/Purchase order waiting approval" id="menu_purchase_form_action3" action="purchase_form_action3"/>
93         <record model="ir.actions.act_window" id="purchase_form_action4">
94                 <field name="name">Running purchase order</field>
95                 <field name="type">ir.actions.act_window</field>
96                 <field name="res_model">purchase.order</field>
97                 <field name="view_type">form</field>
98                 <field name="view_mode">tree,form</field>
99                 <field name="domain">[('state','=','approved')]</field>
100         </record>
101         <menuitem name="Purchase Management/Purchase order/Running purchase order" id="menu_purchase_form_action4" action="purchase_form_action4"/>
102
103         <record model="ir.ui.view" id="purchase_order_tree">
104                 <field name="name">purchase.order.tree</field>
105                 <field name="model">purchase.order</field>
106                 <field name="type">tree</field>
107                 <field name="arch" type="xml">
108                         <tree string="Purchase Order">
109                                 <field name="name"/>
110                                 <field name="date_order"/>
111                                 <field name="partner_id"/>
112                                 <field name="location_id"/>
113                                 <field name="origin"/>
114                                 <field name="invoiced" string="Paid"/>
115                                 <field name="shipped"/>
116                                 <field name="amount_untaxed"/>
117                                 <field name="state"/>
118                         </tree>
119                 </field>
120         </record>
121
122         <record model="ir.ui.view" id="purchase_order_line_form">
123                 <field name="name">purchase.order.line.form</field>
124                 <field name="model">purchase.order.line</field>
125                 <field name="type">form</field>
126                 <field name="arch" type="xml">
127                         <form string="Purchase Order Line">
128                                 <notebook>
129                                         <page string="Order Line">
130                                                 <field name="account_analytic_id"/>
131                                                 <newline/>
132                                                 <field name="product_qty"/>
133                                                 <field name="product_uom" on_change="product_uom_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id)"/>
134                                                 <field name="product_id" colspan="4" on_change="product_id_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id)" context="partner_id=parent.partner_id,quantity=product_qty,pricelist=parent.pricelist_id,uom=product_uom,warehouse=parent.warehouse_id"/>
135                                                 <field name="name" colspan="4"/>
136                                                 <field name="date_planned"/>
137                                                 <field name="price_unit"/>
138                                                 <field name="price_subtotal" readonly="1" />
139                                                 <field name="taxes_id" colspan="4"/>
140                                         </page><page string="Notes">
141                                                 <field name="notes" colspan="4" nolabel="1"/>
142                                         </page>
143                                 </notebook>
144                         </form>
145                 </field>
146         </record>
147
148         <record model="ir.ui.view" id="purchase_order_line_tree">
149                 <field name="name">purchase.order.line.tree</field>
150                 <field name="model">purchase.order.line</field>
151                 <field name="type">tree</field>
152                 <field name="arch" type="xml">
153                         <tree string="Purchase Order Line" colors="red:date_planned&lt;=current_date">
154                                 <field name="date_planned"/>
155                                 <field name="name"/>
156                                 <field name="product_id"/>
157                                 <field name="product_qty"/>
158                                 <field name="product_uom"/>
159                                 <field name="price_unit"/>
160                                 <field name="price_subtotal"/>
161                         </tree>
162                 </field>
163         </record>
164
165         <act_window name="Purchases"
166                 domain="[('partner_id', '=', active_id)]"
167                 context="{'partner_id': active_id}"
168                 res_model="purchase.order"
169                 src_model="res.partner"
170                 id="act_res_partner_2_purchase_order"/>
171 </data>
172 </terp>