636 lines
38 KiB
XML
636 lines
38 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<!-- Top menu item -->
|
|
<menuitem name="Purchases"
|
|
id="menu_purchase_root"
|
|
groups="group_purchase_manager,group_purchase_user"
|
|
web_icon="purchase,static/description/icon.png"
|
|
sequence="25"/>
|
|
|
|
<menuitem id="menu_procurement_management" name="Purchase"
|
|
parent="menu_purchase_root" sequence="1" />
|
|
|
|
<!--Supplier menu-->
|
|
<menuitem id="menu_procurement_management_supplier_name" name="Vendors"
|
|
parent="menu_procurement_management"
|
|
action="base.action_partner_supplier_form" sequence="15"/>
|
|
|
|
<menuitem id="menu_purchase_config" name="Configuration" parent="menu_purchase_root" sequence="100" groups="group_purchase_manager"/>
|
|
|
|
<menuitem
|
|
action="product.product_supplierinfo_type_action" id="menu_product_pricelist_action2_purchase"
|
|
parent="menu_procurement_management" sequence="16" groups="purchase.group_manage_vendor_price"/>
|
|
|
|
<menuitem
|
|
id="menu_product_in_config_purchase" name="Products"
|
|
parent="menu_purchase_config" sequence="30" groups="base.group_no_one"/>
|
|
|
|
<menuitem
|
|
action="product.product_category_action_form" id="menu_product_category_config_purchase"
|
|
parent="purchase.menu_product_in_config_purchase" sequence="1" />
|
|
|
|
<menuitem
|
|
action="product.product_uom_categ_form_action" id="menu_purchase_uom_categ_form_action"
|
|
parent="purchase.menu_product_in_config_purchase" sequence="10" />
|
|
|
|
<menuitem
|
|
action="product.product_uom_form_action" id="menu_purchase_uom_form_action"
|
|
parent="purchase.menu_product_in_config_purchase" sequence="5"/>
|
|
|
|
|
|
<!-- Purchase Control Menu -->
|
|
<menuitem id="menu_purchase_control" name="Control" parent="purchase.menu_purchase_root" sequence="4"/>
|
|
|
|
<!--Inventory control-->
|
|
<menuitem action="stock.action_receipt_picking_move" id="menu_action_picking_tree_in_move"
|
|
parent="menu_purchase_control" sequence="11"/>
|
|
|
|
<!--Invoice control-->
|
|
<menuitem
|
|
id="menu_procurement_management_pending_invoice"
|
|
action="action_invoice_pending"
|
|
parent="menu_purchase_control"
|
|
sequence="13"/>
|
|
|
|
<record id="product_normal_action_puchased" model="ir.actions.act_window">
|
|
<field name="name">Products</field>
|
|
<field name="type">ir.actions.act_window</field>
|
|
<field name="res_model">product.template</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">kanban,tree,form</field>
|
|
<field name="context">{"search_default_filter_to_purchase":1}</field>
|
|
<field name="search_view_id" eval="False"/> <!-- Force empty -->
|
|
<field name="view_id" eval="False"/> <!-- Force empty -->
|
|
<field name="help" type="html">
|
|
<p class="oe_view_nocontent_create">
|
|
Click to define a new product.
|
|
</p><p>
|
|
You must define a product for everything you purchase, whether
|
|
it's a physical product, a consumable or services you buy to
|
|
subcontractors.
|
|
</p><p>
|
|
The product form contains detailed information to improve the
|
|
purchase process: prices, procurement logistics, accounting data,
|
|
available vendors, etc.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Product menu-->
|
|
<menuitem name="Products" id="menu_procurement_partner_contact_form" action="product_normal_action_puchased"
|
|
parent="menu_procurement_management" sequence="20"/>
|
|
|
|
<menuitem name="Purchasable Products" id="menu_product_normal_action_puchased" action="product_normal_action_puchased"
|
|
parent="account.menu_finance_payables" sequence="110"/>
|
|
|
|
<record id="product_product_action" model="ir.actions.act_window">
|
|
<field name="name">Product Variants</field>
|
|
<field name="res_model">product.product</field>
|
|
<field name="view_mode">tree,kanban,form</field>
|
|
<field name="view_type">form</field>
|
|
<field name="context">{"search_default_filter_to_purchase": 1}</field>
|
|
<field name="help" type="html">
|
|
<p class="oe_view_nocontent_create">
|
|
Click to define a new product.
|
|
</p><p>
|
|
You must define a product for everything you purchase, whether
|
|
it's a physical product, a consumable or services you buy to
|
|
subcontractors.
|
|
</p><p>
|
|
The product form contains detailed information to improve the
|
|
purchase process: prices, procurement logistics, accounting data,
|
|
available vendors, etc.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
|
|
<menuitem id="product_product_menu" name="Product Variants" action="product_product_action"
|
|
parent="menu_procurement_management" sequence="21" groups="product.group_product_variant"/>
|
|
|
|
<record model="ir.ui.view" id="purchase_order_calendar">
|
|
<field name="name">purchase.order.calendar</field>
|
|
<field name="model">purchase.order</field>
|
|
<field name="priority" eval="2"/>
|
|
<field name="arch" type="xml">
|
|
<calendar string="Calendar View" date_start="date_planned" color="partner_id">
|
|
<field name="name"/>
|
|
<field name="amount_total" widget="monetary"/>
|
|
<field name="partner_id"/>
|
|
</calendar>
|
|
</field>
|
|
</record>
|
|
<record model="ir.ui.view" id="purchase_order_pivot">
|
|
<field name="name">purchase.order.pivot</field>
|
|
<field name="model">purchase.order</field>
|
|
<field name="arch" type="xml">
|
|
<pivot string="Purchase Order" display_quantity="True">
|
|
<field name="partner_id" type="row"/>
|
|
<field name="amount_total" type="measure"/>
|
|
</pivot>
|
|
</field>
|
|
</record>
|
|
<record model="ir.ui.view" id="purchase_order_graph">
|
|
<field name="name">purchase.order.graph</field>
|
|
<field name="model">purchase.order</field>
|
|
<field name="arch" type="xml">
|
|
<graph string="Purchase Order">
|
|
<field name="partner_id"/>
|
|
<field name="amount_total" type="measure"/>
|
|
</graph>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="purchase_open_picking" model="ir.actions.act_window">
|
|
<field name="name">Receptions</field>
|
|
<field name="res_model">stock.picking</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="domain">[('purchase_id', '=', active_id)]</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="arch" type="xml">
|
|
<form string="Purchase Order">
|
|
<header>
|
|
<button name="action_rfq_send" states="draft" string="Send RFQ by Email" type="object" context="{'send_rfq':True}" class="oe_highlight"/>
|
|
<button name="action_rfq_send" states="sent" string="Re-Send RFQ by Email" type="object" context="{'send_rfq':True}"/>
|
|
<button name="print_quotation" string="Print RFQ" type="object" states="draft" class="oe_highlight" groups="base.group_user"/>
|
|
<button name="print_quotation" string="Print RFQ" type="object" states="sent" groups="base.group_user"/>
|
|
<button name="button_confirm" type="object" states="draft" string="Confirm Order" id="draft_confirm"/>
|
|
<button name="button_confirm" type="object" states="sent" string="Confirm Order" class="oe_highlight" id="bid_confirm"/>
|
|
<button name="button_approve" type="object" states='to approve' string="Approve Order" class="oe_highlight" groups="purchase.group_purchase_manager"/>
|
|
<button name="action_rfq_send" states="purchase" string="Send PO by Email" type="object" context="{'send_rfq':False}"/>
|
|
<button name="action_view_picking" string="Receive Products" class="oe_highlight" type="object" attrs="{'invisible': ['|', '|' , ('is_shipped', '=', True), ('state','not in', ('purchase','done')), ('picking_count', '=', 0)]}"/>
|
|
<button name="button_draft" states="cancel" string="Set to Draft" type="object" />
|
|
<button name="button_cancel" states="draft,to approve,sent,purchase" string="Cancel" type="object" />
|
|
<button name="button_done" type="object" string="Lock" states="purchase"/>
|
|
<button name="button_unlock" type="object" string="Unlock" states="done" groups="purchase.group_purchase_manager"/>
|
|
<field name="state" widget="statusbar" statusbar_visible="draft,sent,purchase" readonly="1"/>
|
|
</header>
|
|
<sheet>
|
|
<div class="oe_button_box" name="button_box">
|
|
<button type="object"
|
|
name="action_view_picking"
|
|
class="oe_stat_button"
|
|
icon="fa-truck" attrs="{'invisible':[('state', 'in', ('draft','sent','to approve')),('picking_ids','=',[])]}">
|
|
<field name="picking_count" widget="statinfo" string="Shipment" help="Incoming Shipments"/>
|
|
<field name="picking_ids" invisible="1"/>
|
|
</button>
|
|
<button type="object" name="action_view_invoice"
|
|
class="oe_stat_button"
|
|
icon="fa-pencil-square-o" attrs="{'invisible':[('state', 'in', ('draft','sent','to approve')),('invoice_ids','=',[])]}">
|
|
<field name="invoice_count" widget="statinfo" string="Vendor Bills"/>
|
|
<field name='invoice_ids' invisible="1"/>
|
|
</button>
|
|
</div>
|
|
<div class="oe_title">
|
|
<label string="Request for Quotation " attrs="{'invisible': [('state','not in',('draft','sent','bid'))]}"/>
|
|
<label string="Purchase Order " attrs="{'invisible': [('state','in',('draft','sent','bid'))]}"/>
|
|
<h1>
|
|
<field name="name" readonly="1"/>
|
|
</h1>
|
|
</div>
|
|
<group>
|
|
<group>
|
|
<field name="partner_id" context="{'search_default_supplier':1, 'default_supplier':1, 'default_customer':0}" domain="[('supplier','=',True)]"/>
|
|
<field name="partner_ref"/>
|
|
<field name="currency_id" groups="base.group_multi_currency"/>
|
|
<field name="is_shipped" invisible="1"/>
|
|
</group>
|
|
<group>
|
|
<field name="date_order"/>
|
|
<field name="origin" attrs="{'invisible': [('origin','=',False)]}"/>
|
|
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page string="Products">
|
|
<field name="order_line" attrs="{'readonly': [('state', 'in', ('done', 'cancel'))]}">
|
|
<tree string="Purchase Order Lines" editable="bottom">
|
|
<field name="currency_id" invisible="1"/>
|
|
<field name="state" invisible="1"/>
|
|
<field name="sequence" widget="handle"/>
|
|
<field name="product_id" attrs="{'readonly': [('state', 'in', ('purchase', 'to approve','done', 'cancel'))]}" context="{'partner_id':parent.partner_id, 'quantity':product_qty,'uom':product_uom, 'company_id': parent.company_id}"/>
|
|
<field name="name"/>
|
|
<field name="date_planned"/>
|
|
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
|
<field name="account_analytic_id" context="{'default_partner_id':parent.partner_id}" groups="purchase.group_analytic_accounting"/>
|
|
<field name="analytic_tag_ids" groups="purchase.group_analytic_accounting" widget="many2many_tags"/>
|
|
<field name="product_qty"/>
|
|
<field name="qty_received" invisible="not context.get('show_purchase', False)"/>
|
|
<field name="qty_invoiced" invisible="not context.get('show_purchase', False)"/>
|
|
<field name="product_uom" groups="product.group_uom" attrs="{'readonly': [('state', 'in', ('purchase', 'done', 'cancel'))]}"/>
|
|
<field name="price_unit"/>
|
|
<field name="taxes_id" widget="many2many_tags" domain="[('type_tax_use','=','purchase')]" context="{'default_type_tax_use': 'purchase'}"/>
|
|
<field name="price_subtotal" widget="monetary"/>
|
|
</tree>
|
|
<form string="Purchase Order Line">
|
|
<sheet>
|
|
<group>
|
|
<group>
|
|
<field name="product_id"
|
|
context="{'partner_id': parent.partner_id}"/>
|
|
<label for="product_qty"/>
|
|
<div>
|
|
<field name="product_qty" class="oe_inline"/>
|
|
<span class="oe_inline"> </span>
|
|
<field name="product_uom" groups="product.group_uom" class="oe_inline"/>
|
|
</div>
|
|
<field name="price_unit"/>
|
|
</group>
|
|
<group>
|
|
<field name="taxes_id" widget="many2many_tags" domain="[('type_tax_use', '=', 'purchase')]"/>
|
|
<field name="date_planned" widget="date"/>
|
|
<field name="account_analytic_id" colspan="2" groups="purchase.group_analytic_accounting"/>
|
|
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page string="Notes">
|
|
<field name="name"/>
|
|
</page><page string="Invoices and Incoming Shipments">
|
|
<field name="invoice_lines"/>
|
|
<field name="move_ids"/>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
<group class="oe_subtotal_footer oe_right">
|
|
<field name="amount_untaxed" widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
|
<field name="amount_tax" widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
|
<div class="oe_subtotal_footer_separator oe_inline">
|
|
<label for="amount_total"/>
|
|
</div>
|
|
<field name="amount_total" nolabel="1" class="oe_subtotal_footer_separator" widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
|
</group>
|
|
<field name="notes" class="oe_inline" placeholder="An administrator can set up default Terms and conditions in your Company settings."/>
|
|
<div class="oe_clear"/>
|
|
</page>
|
|
<page string="Deliveries & Invoices">
|
|
<group>
|
|
<group>
|
|
<label for="date_planned"/>
|
|
<div>
|
|
<field name="date_planned" required="1" attrs="{'readonly': [('state', 'not in', ('draft', 'sent'))]}"/>
|
|
<button name="action_set_date_planned" type="object"
|
|
states="draft,sent"
|
|
string="Set date to all order lines"
|
|
help="This changes the scheduled date of all order lines to the given date"
|
|
class="fa fa-calendar o_icon_button oe_edit_only"/>
|
|
</div>
|
|
<field name="picking_type_id" domain="[('code','=','incoming')]" options="{'no_create': True}" groups="stock.group_stock_multi_locations"/>
|
|
<field name="dest_address_id" groups="stock.group_stock_multi_locations" attrs="{'invisible': [('default_location_dest_id_usage', '!=', 'customer')], 'required': [('default_location_dest_id_usage', '=', 'customer')]}"/>
|
|
<field name="default_location_dest_id_usage" invisible="1"/>
|
|
<field name="incoterm_id"/>
|
|
</group>
|
|
<group>
|
|
<field name="invoice_status"/>
|
|
<field name="payment_term_id" options="{'no_open': True, 'no_create': True}" attrs="{'readonly': ['|', ('invoice_status','=', 'invoiced'), ('state', '=', 'done')]}"/>
|
|
<field name="fiscal_position_id" attrs="{'readonly': ['|', ('invoice_status','=', 'invoiced'), ('state', '=', 'done')]}"/>
|
|
<field name="date_approve" groups="base.group_no_one"/>
|
|
</group>
|
|
</group>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
<div class="oe_chatter">
|
|
<field name="message_follower_ids" widget="mail_followers"/>
|
|
<field name="message_ids" widget="mail_thread"/>
|
|
</div>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_purchase_order_filter" model="ir.ui.view">
|
|
<field name="name">request.quotation.select</field>
|
|
<field name="model">purchase.order</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Search Purchase Order">
|
|
<field name="name" string="Reference"/>
|
|
<field name="partner_id" operator="child_of"/>
|
|
<field name="product_id"/>
|
|
<field name="create_uid"/>
|
|
<filter name="draft" string="Quotations" domain="[('state','in',('draft','sent','to approve'))]"/>
|
|
<filter name="approved" string="Purchase Orders" domain="[('state','in',('purchase','done'))]"/>
|
|
<filter name="to_approve" string="To Approve" domain="[('state', '=', 'to approve')]"/>
|
|
<separator/>
|
|
<filter name="not_invoiced" string="Waiting Bills" domain="[('invoice_status','=', 'to invoice')]" help="Purchase orders that include lines not invoiced."/>
|
|
<filter name="invoiced" string="Bills Received" domain="[('invoice_status','=', 'invoiced')]" help="Purchase orders that have been invoiced."/>
|
|
<filter string="Unread Messages" name="message_needaction" domain="[('message_needaction','=',True)]"/>
|
|
<group expand="0" string="Group By">
|
|
<filter string="Vendor" domain="[]" context="{'group_by':'partner_id'}"/>
|
|
<filter string="Order Date" domain="[]" context="{'group_by':'date_order'}"/>
|
|
<filter string="Expected Date" domain="[]" context="{'group_by':'date_planned'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
|
|
<!-- Purchase Orders Kanban View -->
|
|
<record model="ir.ui.view" id="view_purchase_order_kanban">
|
|
<field name="name">purchase.order.kanban</field>
|
|
<field name="model">purchase.order</field>
|
|
<field name="arch" type="xml">
|
|
<kanban class="o_kanban_mobile">
|
|
<field name="name"/>
|
|
<field name="partner_id"/>
|
|
<field name="amount_total"/>
|
|
<field name="state"/>
|
|
<field name="date_order"/>
|
|
<field name="currency_id"/>
|
|
<templates>
|
|
<t t-name="kanban-box">
|
|
<div t-attf-class="oe_kanban_card oe_kanban_global_click">
|
|
<div class="row">
|
|
<div class="col-xs-6">
|
|
<strong><span><t t-esc="record.partner_id.value"/></span></strong>
|
|
</div>
|
|
<div class="col-xs-6 pull-right text-right">
|
|
<strong><field name="amount_total" widget="monetary"/></strong>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-xs-6">
|
|
<span><t t-esc="record.name.value"/> <t t-esc="record.date_order.value and record.date_order.value.split(' ')[0] or False"/></span>
|
|
</div>
|
|
<div class="col-xs-6">
|
|
<span class="pull-right text-right">
|
|
<field name="state" widget="kanban_label_selection" options="{'classes': {'draft': 'default', 'cancel': 'default', 'done': 'success', 'approved': 'warning'}}"/>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
</templates>
|
|
</kanban>
|
|
</field>
|
|
</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="arch" type="xml">
|
|
<tree decoration-bf="message_unread==True" decoration-muted="state=='cancel'" decoration-info="state in ('wait','confirmed')" string="Purchase Order">
|
|
<field name="message_unread" invisible="1"/>
|
|
<field name="name" string="Reference"/>
|
|
<field name="date_order" />
|
|
<field name="partner_id"/>
|
|
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
|
<field name="date_planned" invisible="context.get('quotation_only', False)"/>
|
|
<field name="origin"/>
|
|
<field name="amount_untaxed" sum="Total Untaxed amount" string="Untaxed" widget="monetary"/>
|
|
<field name="amount_total" sum="Total amount" widget="monetary"/>
|
|
<field name="currency_id" invisible="1"/>
|
|
<field name="state"/>
|
|
<field name="invoice_status" invisible="not context.get('show_purchase', False)"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="purchase_order_action_generic" 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="domain">[]</field>
|
|
<field name="view_id" ref="purchase_order_form"/>
|
|
</record>
|
|
|
|
<record id="purchase_rfq" model="ir.actions.act_window">
|
|
<field name="name">Requests for Quotation</field>
|
|
<field name="type">ir.actions.act_window</field>
|
|
<field name="res_model">purchase.order</field>
|
|
<field name="context">{'search_default_todo':1}</field>
|
|
<field name="domain">[('state','in',('draft','sent','bid','cancel', 'confirmed'))]</field>
|
|
<field name="view_mode">tree,kanban,form,pivot,graph,calendar</field>
|
|
<field name="search_view_id" ref="view_purchase_order_filter"/>
|
|
<field name="help" type="html">
|
|
<p class="oe_view_nocontent_create">
|
|
Click to create a request for quotation.
|
|
</p><p>
|
|
The quotation contains the history of the discussion/negotiation
|
|
you had with your vendor. Once confirmed, a request for
|
|
quotation is converted into a purchase order.
|
|
</p><p>
|
|
Most propositions of purchase orders are created automatically
|
|
by Odoo based on inventory needs.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
<menuitem action="purchase_rfq" id="menu_purchase_rfq"
|
|
parent="menu_procurement_management"
|
|
sequence="0"/>
|
|
|
|
<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,kanban,form,pivot,graph,calendar</field>
|
|
<field name="context">{'search_default_todo':1, 'show_purchase': True}</field>
|
|
<field name="domain">[('state','not in',('draft','sent','bid', 'confirmed'))]</field>
|
|
<field name="search_view_id" ref="view_purchase_order_filter"/>
|
|
<field name="help" type="html">
|
|
<p class="oe_view_nocontent_create">
|
|
Click to create a quotation that will be converted into a purchase order.
|
|
</p><p>
|
|
Use this menu to search within your purchase orders by
|
|
references, vendor, products, etc. For each purchase order,
|
|
you can track the related discussion with the vendor, control
|
|
the products received and control the vendor bills.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
<menuitem action="purchase_form_action" id="menu_purchase_form_action" parent="menu_procurement_management" sequence="6"/>
|
|
|
|
<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="arch" type="xml">
|
|
<tree string="Purchase Order Lines" create="false">
|
|
<field name="order_id"/>
|
|
<field name="name"/>
|
|
<field name="partner_id" string="Vendor" />
|
|
<field name="product_id"/>
|
|
<field name="price_unit"/>
|
|
<field name="product_qty"/>
|
|
<field name="product_uom" groups="product.group_uom"/>
|
|
<field name="price_subtotal" widget="monetary"/>
|
|
<field name="date_planned" widget="date"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="purchase_order_line_form2" model="ir.ui.view">
|
|
<field name="name">purchase.order.line.form2</field>
|
|
<field name="model">purchase.order.line</field>
|
|
<field name="priority" eval="20"/>
|
|
<field name="arch" type="xml">
|
|
<form string="Purchase Order Line" create="false">
|
|
<sheet>
|
|
<label for="order_id" class="oe_edit_only"/>
|
|
<h1>
|
|
<field name="order_id" class="oe_inline"/>
|
|
<label string="," attrs="{'invisible':[('date_order','=',False)]}"/>
|
|
<field name="date_order" class="oe_inline"/>
|
|
</h1>
|
|
<label for="partner_id" class="oe_edit_only"/>
|
|
<h2><field name="partner_id"/></h2>
|
|
<group>
|
|
<group>
|
|
<field name="product_id" readonly="1"/>
|
|
<label for="product_qty"/>
|
|
<div>
|
|
<field name="product_qty" readonly="1" class="oe_inline"/>
|
|
<field name="product_uom" readonly="1" groups="product.group_uom" class="oe_inline"/>
|
|
</div>
|
|
<field name="price_unit"/>
|
|
</group>
|
|
<group>
|
|
<field name="taxes_id" widget="many2many_tags"
|
|
domain="[('type_tax_use', '=', 'purchase')]"/>
|
|
<field name="date_planned" widget="date" readonly="1"/>
|
|
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
|
<field name="account_analytic_id" colspan="4" groups="purchase.group_analytic_accounting"/>
|
|
</group>
|
|
</group>
|
|
<field name="name"/>
|
|
<separator string="Manual Invoices"/>
|
|
<field name="invoice_lines"/>
|
|
<separator string="Stock Moves"/>
|
|
<field name="move_ids"/>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
<record id="purchase_order_line_search" model="ir.ui.view">
|
|
<field name="name">purchase.order.line.search</field>
|
|
<field name="model">purchase.order.line</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Search Purchase Order">
|
|
<field name="order_id"/>
|
|
<field name="product_id"/>
|
|
<field name="partner_id" string="Vendor" filter_domain="[('partner_id', 'child_of', self)]"/>
|
|
<filter name="hide_cancelled" string="Hide cancelled lines" domain="[('state', '!=', 'cancel')]"/>
|
|
<group expand="0" string="Group By">
|
|
<filter name="groupby_supplier" string="Vendor" domain="[]" context="{'group_by' : 'partner_id'}" />
|
|
<filter name="groupby_product" string="Product" domain="[]" context="{'group_by' : 'product_id'}" />
|
|
<filter string="Order Reference" domain="[]" context="{'group_by' :'order_id'}"/>
|
|
<filter string="Status" domain="[]" context="{'group_by' : 'state'}" />
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Procurements -->
|
|
|
|
<record id="view_procurement_form_inherit" model="ir.ui.view">
|
|
<field name="name">procurement.order.form.inherit</field>
|
|
<field name="model">procurement.order</field>
|
|
<field name="inherit_id" ref="procurement.procurement_form_view"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='origin']" position="after">
|
|
<field name="purchase_id"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Product Suppliers-->
|
|
|
|
<record id="view_product_supplier_inherit" model="ir.ui.view">
|
|
<field name="name">product.template.supplier.form.inherit</field>
|
|
<field name="model">product.template</field>
|
|
<field name="inherit_id" ref="product.product_template_form_view"/>
|
|
<field name="arch" type="xml">
|
|
<group name="inventory" position="after">
|
|
<separator string="Vendors"/>
|
|
<field name="seller_ids" context="{'default_product_tmpl_id': context.get('product_tmpl_id', active_id)}"/>
|
|
<group name="packaging" string="Packaging"
|
|
colspan="4"
|
|
attrs="{'invisible':[('type', 'not in', ['product', 'consu'])]}"
|
|
groups="product.group_stock_packaging">
|
|
<field name="packaging_ids" nolabel="1"/>
|
|
</group>
|
|
</group>
|
|
<field name="uom_po_id" position="after">
|
|
<field name="purchase_method" widget="radio" groups="purchase.group_purchase_manager"/>
|
|
</field>
|
|
<group name="description" position="after">
|
|
<group string="Warning when Purchasing this Product" colspan="2" groups="purchase.group_warning_purchase">
|
|
<field name="purchase_line_warn" nolabel="1"/>
|
|
<field name="purchase_line_warn_msg" colspan="3" nolabel="1"
|
|
attrs="{'required':[('purchase_line_warn','!=','no-message')],'readonly':[('purchase_line_warn','=','no-message')], 'invisible':[('purchase_line_warn','=','no-message')]}"/>
|
|
</group>
|
|
</group>
|
|
<field name="description_sale" position="after">
|
|
<separator string="Description for Vendors" colspan="4"/>
|
|
<field name="description_purchase" nolabel="1"
|
|
placeholder="This note will be displayed on requests for quotation." colspan="4"/>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_category_property_form" model="ir.ui.view">
|
|
<field name="name">product.category.property.form.inherit.stock</field>
|
|
<field name="model">product.category</field>
|
|
<field name="inherit_id" ref="account.view_category_property_form"/>
|
|
<field name="arch" type="xml">
|
|
<field name="property_account_income_categ_id" position="before">
|
|
<field name="property_account_creditor_price_difference_categ" domain="[('deprecated','=',False)]"/>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.actions.act_window" id="action_purchase_line_product_tree">
|
|
<field name="context">{}</field>
|
|
<field name="domain">[('product_id.product_tmpl_id','in',active_ids), ('state', 'in', ['purchase', 'done'])]</field>
|
|
<field name="name">Purchases</field>
|
|
<field name="res_model">purchase.order.line</field>
|
|
<field name="view_id" ref="purchase_order_line_tree"/>
|
|
</record>
|
|
|
|
<record id="view_product_account_purchase_ok_form" model="ir.ui.view">
|
|
<field name="name">product.template.account.purchase.ok.form.inherit</field>
|
|
<field name="model">product.template</field>
|
|
<field name="inherit_id" ref="account.product_template_form_view"/>
|
|
<field name="arch" type="xml">
|
|
<field name="property_account_expense_id" position="replace" >
|
|
<field name="property_account_expense_id" domain="[('deprecated','=',False)]" attrs="{'readonly': [('purchase_ok', '=', 0)]}" groups="account.group_account_user"/>
|
|
</field>
|
|
<field name='supplier_taxes_id' position="replace" >
|
|
<field name="supplier_taxes_id" colspan="2" widget="many2many_tags" attrs="{'readonly':[('purchase_ok','=',0)]}"/>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_product_template_purchase_buttons_from" model="ir.ui.view">
|
|
<field name="name">product.template.purchase.button.inherit</field>
|
|
<field name="model">product.template</field>
|
|
<field name="inherit_id" ref="product.product_template_only_form_view"/>
|
|
<field name="groups_id" eval="[(4, ref('purchase.group_purchase_user'))]"/>
|
|
<field name="arch" type="xml">
|
|
<div name="button_box" position="inside">
|
|
<button class="oe_stat_button" name="%(purchase.action_purchase_line_product_tree)d"
|
|
type="action" icon="fa-shopping-cart">
|
|
<field string="Purchases" name="purchase_count" widget="statinfo"/>
|
|
</button>
|
|
</div>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="product_template_form_view" model="ir.ui.view">
|
|
<field name="name">product.normal.form.inherit.stock</field>
|
|
<field name="model">product.template</field>
|
|
<field name="inherit_id" ref="account.product_template_form_view"/>
|
|
<field name="arch" type="xml">
|
|
<field name="supplier_taxes_id" position="after">
|
|
<label string="" colspan="2"/>
|
|
<field name="property_account_creditor_price_difference" domain="[('deprecated','=',False)]" attrs="{'readonly':[('purchase_ok', '=', 0)]}" />
|
|
</field>
|
|
</field>
|
|
</record>
|
|
</odoo>
|