odoo/addons/purchase/purchase_view.xml

295 lines
17 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!--<menuitem icon="terp-purchase" id="base.menu_purchase_root" name="Purchase Management"
groups="group_purchase_user"/>-->
<menuitem icon="terp-purchase" id="base.menu_purchase_root" name="Procurement Management"
groups="group_purchase_user" sequence="7"/>
<menuitem id="menu_procurement_management" name="Procurement Management"
parent="base.menu_purchase_root" sequence="1"/>
<!--supplier menu-->
<menuitem id="base.menu_procurement_management_supplier" name="Suppliers"
parent="base.menu_purchase_root" sequence="3"/>
<menuitem id="menu_procurement_management_supplier_name" name="Suppliers"
parent="base.menu_procurement_management_supplier" action="base.action_partner_supplier_form" sequence="1"/>
<!--Inventory control-->
<menuitem id="menu_procurement_management_nventory" name="Inventory Control"
parent="base.menu_purchase_root" sequence="4"/>
<menuitem action="stock.action_picking_tree4" id="menu_action_picking_tree4" parent="menu_procurement_management_nventory"
name="Incoming shipments" sequence="9"/>
<menuitem action="stock.action_reception_picking_move" id="menu_action_reception_picking_move"
name="Incoming Products" parent="menu_procurement_management_nventory" sequence="10"/>
<!--Invoice control-->
<menuitem id="menu_procurement_management_invoice" name="Invoice Control"
parent="base.menu_purchase_root" sequence="6"/>
<menuitem name="Pending Invoices" id="menu_procurement_management_pending_invoice" action="account.action_invoice_tree_pending_invoice"
parent="menu_procurement_management_invoice"/>
<!--product menu-->
<menuitem id="menu_procurement_management_product" name="Product"
parent="base.menu_purchase_root" sequence="8"/>
<menuitem name="Products" id="menu_procurement_partner_contact_form" action="product.product_normal_action_puchased"
parent="menu_procurement_management_product"/>
<record model="ir.ui.view" id="purchase_order_calendar">
<field name="name">purchase.order.calendar</field>
<field name="model">purchase.order</field>
<field name="type">calendar</field>
<field name="priority" eval="2"/>
<field name="arch" type="xml">
<calendar string="Calendar View" date_start="minimum_planned_date" color="partner_id">
<field name="name"/>
<field name="amount_total"/>
<field name="partner_id"/>
</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 name="model">purchase.order</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Purchase Order">
<group col="6" colspan="4">
<field name="name" select="1"/>
<field name="date_order" select="2"/>
<field name="invoiced" select="2"/>
<newline/>
<field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection"/>
<field name="origin" select="2"/>
<field name="shipped" select="2"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<notebook colspan="4">
<page string="Purchase Order">
<field name="partner_id" on_change="onchange_partner_id(partner_id)" select="1" domain="[('supplier','=', 1)]"/>
<field name="partner_address_id"/>
<field domain="[('type','=','purchase')]" name="pricelist_id"/>
<field name="partner_ref" select="2"/>
<newline/>
<field colspan="4" name="order_line" nolabel="1" mode="tree,form">
<tree colors="red:date_planned&lt;=current_date;black:date_planned&gt;current_date" string="Purchase Order Lines">
<field name="date_planned"/>
<field name="name"/>
<field name="product_id"/>
<field name="product_qty"/>
<field name="product_uom"/>
<field name="price_unit"/>
<field name="price_subtotal"/>
</tree>
<!-- default form view -->
</field>
<group col="7" colspan="4">
<field name="amount_untaxed" sum="Untaxed amount"/>
<field name="amount_tax"/>
<field name="amount_total" sum="Total amount"/>
<button name="button_dummy" states="draft" string="Compute" type="object" icon="gtk-execute"/>
</group>
<group col="11" colspan="4">
<field name="state" readonly="1"/>
<button name="purchase_confirm" states="draft" string="Confirm Purchase Order" icon="gtk-apply"/>
<button name="purchase_appbuyer" states="wait_auth" string="Approve Purchase" icon="gtk-ok"/>
<button name="purchase_approve" states="confirmed" string="Approved by Supplier" icon="gtk-ok"/>
<button name="purchase_cancel" states="draft,confirmed,wait_auth" string="Cancel Purchase Order" icon="gtk-cancel"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
<button name="action_cancel" states="approved,except_picking,except_invoice" string="Cancel Purchase Order" type="object" icon="gtk-cancel"/>
<button name="picking_ok" states="except_picking" string="Manually Corrected" icon="gtk-convert"/>
<button name="invoice_ok" states="except_invoice" string="Manually Corrected" icon="gtk-convert"/>
</group>
</page>
<page string="Delivery &amp; Invoices" groups="account.group_account_user">
<group colspan="2" col="2">
<separator string="Delivery" colspan="2"/>
<field name="dest_address_id" on_change="onchange_dest_address_id(dest_address_id)"/>
<field name="minimum_planned_date"/>
<field name="location_id" widget="selection"/>
</group>
<group colspan="2" col="2">
<separator string="Invoice Control" colspan="2"/>
<field name="invoice_method"/>
<field name="invoice_id" readonly="1"/>
<field name="fiscal_position" groups="base.group_extended" widget="selection"/>
</group>
<newline/>
<separator string="Purchase Control" colspan="4"/>
<field name="validator"/>
<field name="date_approve"/>
</page>
<page string="Notes">
<field colspan="4" name="notes" nolabel="1"/>
</page>
</notebook>
</form>
</field>
</record>
<record id="view_purchase_order_filter" model="ir.ui.view">
<field name="name">purchase.order.list.select</field>
<field name="model">purchase.order</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Purchase Order">
<group col='10' colspan='4'>
<filter icon="terp-purchase" string="Quotations" domain="[('state','=','draft')]" separator="1"/>
<filter icon="terp-purchase" string="Unapproved" domain="[('state','in',('wait','confirmed'))]" separator="1"/>
<separator orientation="vertical"/>
<filter icon="terp-purchase" string="To Invoice" domain="[('invoiced','=',1)]" separator="1"/>
<separator orientation="vertical"/>
<field name="name" select="1" string="Reference"/>
<field name="partner_id" select="1"/>
<field name="product_id" select="1"/>
<field name="create_uid" select="1" widget="selection">
<filter icon="terp-partner" domain="[('create_uid','=',uid)]" help="My Purchase Orders"/>
</field>
</group>
<group expand="1" string="Group By..." colspan="4" col="10">
<filter string="Supplier" icon="terp-purchase" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="State" icon="terp-sale" domain="[]" context="{'group_by':'state'}"/>
<filter string="Order Date" icon="terp-purchase" domain="[]" context="{'group_by':'date_order'}"/>
</group>
</search>
</field>
</record>
<record id="purchase_rfq" model="ir.actions.act_window">
<field name="name">Quotation Request</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">purchase.order</field>
<field name="view_type">form</field>
<field name="domain">[('state','=','draft')]</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_purchase_order_filter"/>
</record>
<menuitem action="purchase_rfq" id="menu_purchase_rfq" parent="menu_procurement_management"
name="Request for Quotations" sequence="6"/>
<record id="purchase_form_action" model="ir.actions.act_window">
<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,form,calendar,graph</field>
<field name="search_view_id" ref="view_purchase_order_filter"/>
</record>
<menuitem action="purchase_form_action" id="menu_purchase_form_action" parent="menu_procurement_management"/>
<record id="purchase_form_action4" model="ir.actions.act_window">
<field name="name">Purchase Orders in Progress</field>
<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,form,calendar,graph</field>
<field name="domain">[('state','=','approved')]</field>
<field name="search_view_id" ref="view_purchase_order_filter"/>
</record>
<record id="purchase_order_tree" model="ir.ui.view">
<field name="name">purchase.order.tree</field>
<field name="model">purchase.order</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Purchase Order">
<field name="name" string="Reference"/>
<field name="origin"/>
<field name="date_order" string="Order Date"/>
<field name="partner_id"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<field name="location_id"/>
<field name="minimum_planned_date"/>
<field name="invoiced_rate" widget="progressbar"/>
<field name="shipped_rate" widget="progressbar"/>
<field name="amount_untaxed" sum="Total Untaxed amount"/>
<field name="amount_total" sum="Total amount"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="purchase_order_line_form" model="ir.ui.view">
<field name="name">purchase.order.line.form</field>
<field name="model">purchase.order.line</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Purchase Order Line">
<notebook colspan="4">
<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,parent.fiscal_position,date_planned,name,price_unit,notes)"/>
<field context="partner_id=parent.partner_id,quantity=product_qty,pricelist=parent.pricelist_id,uom=product_uom,warehouse=parent.warehouse_id" name="product_qty" on_change="product_id_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id,parent.date_order,parent.fiscal_position,date_planned,name,price_unit,notes)"/>
<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" name="name"/>
<field name="date_planned" widget="date"/>
<field name="price_unit"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<field name="price_subtotal" readonly="1"/>
</page>
<page string="Notes">
<field colspan="4" name="notes" nolabel="1"/>
</page>
<page string="History" groups="base.group_extended,stock.group_stock_user">
<separator colspan="4" string="Stock Moves"/>
<field colspan="4" name="move_ids" nolabel="1" widget="many2many"/>
</page>
<page string="Invoicing" groups="account.group_account_user">
<field name="account_analytic_id" colspan="4"/>
<separator colspan="4" string="Taxes"/>
<field colspan="4" nolabel="1" name="taxes_id" domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/>
</page>
</notebook>
</form>
</field>
</record>
<record id="purchase_order_line_tree" model="ir.ui.view">
<field name="name">purchase.order.line.tree</field>
<field name="model">purchase.order.line</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="red:date_planned&lt;=current_date;black:date_planned&gt;current_date" string="Purchase Order Lines">
<field name="order_id"/>
<field name="name"/>
<field name="date_planned" widget="date"/>
<field name="product_id"/>
<field name="product_qty"/>
<field name="product_uom"/>
<field name="price_unit"/>
<field name="price_subtotal"/>
</tree>
</field>
</record>
<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"/>
<act_window
domain="[('product_id','=',active_id)]"
id="action_purchase_line_product_tree"
name="Product purchases"
res_model="purchase.order.line"
src_model="product.product"/>
</data>
</openerp>