1 <?xml version="1.0" encoding="utf-8"?>
4 <menuitem icon="terp-purchase" id="menu_purchase_root" name="Purchase Management"
5 groups="group_purchase_user"/>
7 <record model="ir.ui.view" id="purchase_order_calendar">
8 <field name="name">purchase.order.calendar</field>
9 <field name="model">purchase.order</field>
10 <field name="type">calendar</field>
11 <field name="priority" eval="2"/>
12 <field name="arch" type="xml">
13 <calendar string="Calendar View" date_start="minimum_planned_date" color="partner_id">
15 <field name="amount_total"/>
16 <field name="partner_id"/>
20 <record model="ir.ui.view" id="view_purchase_order_graph">
21 <field name="name">purchase.order.graph</field>
22 <field name="model">purchase.order</field>
23 <field name="type">graph</field>
24 <field name="arch" type="xml">
25 <graph string="Purchase Order" type="bar">
26 <field name="partner_id"/>
27 <field name="amount_total" operator="+"/>
32 <record id="purchase_order_form" model="ir.ui.view">
33 <field name="name">purchase.order.form</field>
34 <field name="model">purchase.order</field>
35 <field name="type">form</field>
36 <field name="arch" type="xml">
37 <form string="Purchase Order">
38 <group col="6" colspan="4">
39 <field name="name" select="1"/>
40 <field name="date_order" select="2"/>
41 <field name="invoiced" select="2"/>
43 <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)"/>
44 <field name="origin" select="2"/>
45 <field name="shipped" select="2"/>
47 <notebook colspan="4">
48 <page string="Purchase Order">
49 <field name="partner_id" on_change="onchange_partner_id(partner_id)" select="1" domain="[('supplier','=', 1)]"/>
50 <field name="partner_address_id"/>
51 <field domain="[('type','=','purchase')]" name="pricelist_id"/>
52 <field name="partner_ref" select="2"/>
54 <field colspan="4" name="order_line" nolabel="1"/>
55 <group col="7" colspan="4">
56 <field name="amount_untaxed" sum="Untaxed amount"/>
57 <field name="amount_tax"/>
58 <field name="amount_total" sum="Total amount"/>
59 <button name="button_dummy" states="draft" string="Compute" type="object"/>
61 <group col="9" colspan="4">
62 <field name="state" readonly="1"/>
63 <button name="purchase_confirm" states="draft" string="Confirm Purchase Order"/>
64 <button name="purchase_appbuyer" states="wait_auth" string="Approve Purchase"/>
65 <button name="purchase_approve" states="confirmed" string="Approved by Supplier"/>
66 <button name="purchase_cancel" states="draft,confirmed,wait_auth" string="Cancel Purchase Order"/>
67 <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
68 <button name="action_cancel" states="approved" string="Cancel Purchase Order" type="object"/>
70 <button name="picking_ok" states="except_picking" string="Manually Corrected"/>
71 <button name="invoice_ok" states="except_invoice" string="Manually Corrected"/>
74 <page string="Delivery & Invoices">
75 <group colspan="2" col="2">
76 <separator string="Delivery" colspan="2"/>
77 <field name="dest_address_id" on_change="onchange_dest_address_id(dest_address_id)"/>
78 <field name="minimum_planned_date"/>
79 <field name="location_id"/>
81 <group colspan="2" col="2">
82 <separator string="Invoice Control" colspan="2"/>
83 <field name="invoice_method"/>
86 <separator string="Purchase Control" colspan="4"/>
87 <field name="validator"/>
88 <field name="date_approve"/>
91 <field colspan="4" name="notes" nolabel="1"/>
98 <record id="purchase_form_action" model="ir.actions.act_window">
99 <field name="name">Purchase Orders</field>
100 <field name="type">ir.actions.act_window</field>
101 <field name="res_model">purchase.order</field>
102 <field name="view_mode">tree,form,calendar,graph</field>
104 <menuitem action="purchase_form_action" id="menu_purchase_form_action" parent="purchase.menu_purchase_root"/>
106 <record id="purchase_form_action2" model="ir.actions.act_window">
107 <field name="name">Request For Quotations</field>
108 <field name="type">ir.actions.act_window</field>
109 <field name="res_model">purchase.order</field>
110 <field name="domain">[('state','=','draft')]</field>
111 <field name="view_type">form</field>
112 <field name="view_mode">tree,form,calendar,graph</field>
114 <menuitem action="purchase_form_action2" id="menu_purchase_order_draft" parent="purchase.menu_purchase_form_action"/>
116 <record id="purchase_form_action3" model="ir.actions.act_window">
117 <field name="name">Purchase Order Waiting Approval</field>
118 <field name="type">ir.actions.act_window</field>
119 <field name="res_model">purchase.order</field>
120 <field name="view_type">form</field>
121 <field name="view_mode">tree,form,calendar,graph</field>
122 <field name="domain">[('state','=','confirmed')]</field>
124 <menuitem action="purchase_form_action3" id="menu_purchase_form_action3" parent="purchase.menu_purchase_form_action"/>
126 <record id="purchase_form_action4" model="ir.actions.act_window">
127 <field name="name">Purchase Orders in Progress</field>
128 <field name="type">ir.actions.act_window</field>
129 <field name="res_model">purchase.order</field>
130 <field name="view_type">form</field>
131 <field name="view_mode">tree,form,calendar,graph</field>
132 <field name="domain">[('state','=','approved')]</field>
134 <menuitem action="purchase_form_action4" id="menu_purchase_form_action4" parent="purchase.menu_purchase_form_action"/>
136 <record id="purchase_form_action_new" model="ir.actions.act_window">
137 <field name="name">New Purchase Order</field>
138 <field name="type">ir.actions.act_window</field>
139 <field name="res_model">purchase.order</field>
140 <field name="view_mode">form,tree</field>
142 <menuitem action="purchase_form_action_new" id="menu_purchase_form_action_new" parent="purchase.menu_purchase_root"/>
145 <record id="purchase_order_tree" model="ir.ui.view">
146 <field name="name">purchase.order.tree</field>
147 <field name="model">purchase.order</field>
148 <field name="type">tree</field>
149 <field name="arch" type="xml">
150 <tree string="Purchase Order">
151 <field name="name" string="Reference"/>
152 <field name="date_order"/>
153 <field name="minimum_planned_date"/>
154 <field name="partner_id"/>
155 <field name="location_id"/>
156 <field name="invoiced_rate" widget="progressbar"/>
157 <field name="shipped_rate" widget="progressbar"/>
158 <field name="amount_untaxed"/>
159 <field name="origin"/>
160 <field name="state"/>
165 <record id="purchase_order_line_form" model="ir.ui.view">
166 <field name="name">purchase.order.line.form</field>
167 <field name="model">purchase.order.line</field>
168 <field name="type">form</field>
169 <field name="arch" type="xml">
170 <form string="Purchase Order Line">
172 <page string="Order Line">
173 <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)"/>
174 <field name="product_qty"/>
175 <field name="product_uom" on_change="product_uom_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id, parent.date_order)"/>
176 <field colspan="4" name="name"/>
177 <field name="date_planned"/>
178 <field name="price_unit"/>
179 <field name="account_analytic_id"/>
180 <field name="price_subtotal" readonly="1"/>
181 <field colspan="4" name="taxes_id" domain="[('parent_id','=',False)]"/>
183 <page string="Notes">
184 <field colspan="4" name="notes" nolabel="1"/>
191 <record id="purchase_order_line_tree" model="ir.ui.view">
192 <field name="name">purchase.order.line.tree</field>
193 <field name="model">purchase.order.line</field>
194 <field name="type">tree</field>
195 <field name="arch" type="xml">
196 <tree colors="red:date_planned<=current_date" string="Purchase Order Line">
197 <field name="date_planned"/>
199 <field name="product_qty"/>
200 <field name="product_uom"/>
201 <field name="price_unit"/>
202 <field name="price_subtotal"/>
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"/>