<?xml version="1.0" encoding="utf-8"?>
-<terp>
+<openerp>
<data>
- <menuitem icon="terp-purchase" id="menu_purchase_root" name="Purchase Management"/>
+ <menuitem icon="terp-purchase" id="menu_purchase_root" name="Purchase Management"
+ groups="group_purchase_user"/>
<record model="ir.ui.view" id="purchase_order_calendar">
<field name="name">purchase.order.calendar</field>
</calendar>
</field>
</record>
+ <record model="ir.ui.view" id="view_purchase_order_graph">
+ <field name="name">purchase.order.graph</field>
+ <field name="model">purchase.order</field>
+ <field name="type">graph</field>
+ <field name="arch" type="xml">
+ <graph string="Purchase Order" type="bar">
+ <field name="partner_id"/>
+ <field name="amount_total" operator="+"/>
+ </graph>
+ </field>
+ </record>
<record id="purchase_order_form" model="ir.ui.view">
<field name="name">purchase.order.form</field>
<field domain="[('type','=','purchase')]" name="pricelist_id"/>
<field name="partner_ref" select="2"/>
<newline/>
- <field colspan="4" name="order_line" nolabel="1" widget="one2many_list"/>
+ <field colspan="4" name="order_line" nolabel="1"/>
<group col="7" colspan="4">
<field name="amount_untaxed" sum="Untaxed amount"/>
<field name="amount_tax"/>
<button name="purchase_appbuyer" states="wait_auth" string="Approve Purchase"/>
<button name="purchase_approve" states="confirmed" string="Approved by Supplier"/>
<button name="purchase_cancel" states="draft,confirmed,wait_auth" string="Cancel Purchase Order"/>
+ <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
+ <button name="action_cancel" states="approved" string="Cancel Purchase Order" type="object"/>
- <button name="purchase_cancel" states="approved" string="Cancel Purchase Order"/>
-
- <button name="shipping_ok" states="except_shipping" string="Shipping Done"/>
- <button name="invoice_ok" states="except_invoice" string="Invoice Done"/>
+ <button name="picking_ok" states="except_picking" string="Manually Corrected"/>
+ <button name="invoice_ok" states="except_invoice" string="Manually Corrected"/>
</group>
</page>
<page string="Delivery & Invoices">
<field name="name">Purchase Orders</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">purchase.order</field>
- <field name="view_mode">tree,calendar,form</field>
+ <field name="view_mode">tree,form,calendar,graph</field>
</record>
<menuitem action="purchase_form_action" id="menu_purchase_form_action" parent="purchase.menu_purchase_root"/>
<field name="res_model">purchase.order</field>
<field name="domain">[('state','=','draft')]</field>
<field name="view_type">form</field>
- <field name="view_mode">tree,calendar,form</field>
+ <field name="view_mode">tree,form,calendar,graph</field>
</record>
<menuitem action="purchase_form_action2" id="menu_purchase_order_draft" parent="purchase.menu_purchase_form_action"/>
<field name="type">ir.actions.act_window</field>
<field name="res_model">purchase.order</field>
<field name="view_type">form</field>
- <field name="view_mode">tree,calendar,form</field>
+ <field name="view_mode">tree,form,calendar,graph</field>
<field name="domain">[('state','=','confirmed')]</field>
</record>
<menuitem action="purchase_form_action3" id="menu_purchase_form_action3" parent="purchase.menu_purchase_form_action"/>
<field name="type">ir.actions.act_window</field>
<field name="res_model">purchase.order</field>
<field name="view_type">form</field>
- <field name="view_mode">tree,calendar,form</field>
+ <field name="view_mode">tree,form,calendar,graph</field>
<field name="domain">[('state','=','approved')]</field>
</record>
<menuitem action="purchase_form_action4" id="menu_purchase_form_action4" parent="purchase.menu_purchase_form_action"/>
<form string="Purchase Order Line">
<notebook>
<page string="Order Line">
+ <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)"/>
<field name="product_qty"/>
<field name="product_uom" on_change="product_uom_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id, parent.date_order)"/>
- <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)"/>
<field colspan="4" name="name"/>
<field name="date_planned"/>
<field name="price_unit"/>
<tree colors="red:date_planned<=current_date" string="Purchase Order Line">
<field name="date_planned"/>
<field name="name"/>
- <field name="product_id"/>
<field name="product_qty"/>
<field name="product_uom"/>
<field name="price_unit"/>
<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"/>
</data>
-</terp>
+</openerp>