flectra/addons/purchase_indent/views/purchase_indent_view.xml

182 lines
11 KiB
XML
Raw Permalink Normal View History

2018-01-24 07:12:32 +01:00
<?xml version="1.0" encoding="utf-8"?>
<flectra>
<record id="view_flectra_purchase_order_form_inherit" model="ir.ui.view">
<field name="name">Purchase inherited form</field>
<field name="model">purchase.order</field>
<field name="inherit_id" ref="purchase.purchase_order_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='partner_id']" position="after">
<field name="purchase_indent_ids" widget="many2many_tags" readonly="1"/>
</xpath>
<xpath expr="//notebook/page/field/tree/field[@name='product_qty']" position="after">
<field name="purchase_indent_ids" widget="many2many_tags" readonly="1"/>
<field name="purchase_indent_line_id" invisible="1"/>
</xpath>
</field>
</record>
<record id="view_flectra_purchase_requisition_form_inherited" model="ir.ui.view">
<field name="name">Purchase Requisition Inherited Form</field>
<field name="model">purchase.requisition</field>
<field name="inherit_id" ref="purchase_requisition.view_purchase_requisition_form"/>
<field name="arch" type="xml">
2018-01-29 12:35:08 +01:00
<xpath expr="//button[@name='%(purchase_requisition.action_purchase_requisition_to_so)d']" position="replace">
<button name="%(purchase_requisition.action_purchase_requisition_to_so)d" type="action"
string="New Quotation" class="btn-primary" context="{'default_branch_id': branch_id}"
attrs="{'invisible': [('state', 'not in', ['in_progress', 'open'])]}"/>
</xpath>
2018-01-24 07:12:32 +01:00
<xpath expr="//field[@name='vendor_id']" position="after">
<field name="purchase_indent_ids" widget="many2many_tags" readonly="1"/>
2018-01-29 12:35:08 +01:00
<field name='branch_id' readonly="1"/>
2018-01-24 07:12:32 +01:00
</xpath>
<xpath expr="//notebook/page/field/tree/field[@name='product_qty']" position="after">
<field name="purchase_indent_ids" widget="many2many_tags" readonly="1"/>
<field name="purchase_indent_line_id" invisible="1"/>
</xpath>
</field>
</record>
<record id="view_flectra_purchase_indent_tree" model="ir.ui.view">
<field name="name">Purchase indent tree</field>
<field name="model">purchase.indent</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="user_id"/>
<field name="request_date"/>
<field name="category_id"/>
<field name="company_id"/>
2018-01-29 12:35:08 +01:00
<field name="branch_id" groups="base_branch_company.group_multi_branch"/>
2018-01-24 07:12:32 +01:00
<field name="state"/>
</tree>
</field>
</record>
<record id="view_purchase_indent_form" model="ir.ui.view">
<field name="name">purchase.indent.form</field>
<field name="model">purchase.indent</field>
<field name="arch" type="xml">
<form string="Purchase Indent">
<header>
<button name="action_confirm" states="draft" string="Confirm" type="object" class="oe_highlight"/>
2018-01-29 12:35:08 +01:00
<button name="%(action_wiz_requisition_request)d" states="confirm,requisition" string="Create Requisition" type="action" context="{'default_purchase_indent_id': active_id, 'default_category_id': category_id, 'default_branch_id': branch_id}" class="oe_highlight" groups="base.group_system,purchase.group_purchase_manager"/>
2018-01-24 07:12:32 +01:00
<button name="action_cancel" states="confirm" string="Cancel" type="object"/>
<button name="button_draft" states="cancel" string="Set to Draft" type="object"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,requisition,done" readonly="1"/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<button name="get_purchase_order_list" states="requisition,done" class="oe_stat_button" type="object" icon="fa-shopping-cart">
<field name="purchase_order_count" widget="statinfo" string="Purchases"/>
</button>
<button name="get_purchase_agreement_list" icon="fa-list-alt" states="requisition,done" class="oe_stat_button" type="object">
<field name="agreement_count" widget="statinfo" string="Agreement"/>
</button>
</div>
<div class="oe_title">
<h1><field name="name"/></h1>
</div>
<group col="4">
<field name="category_id" options="{'no_create': True}" required="1" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
<field name="request_date" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
2018-01-29 12:35:08 +01:00
<field name="company_id" options="{'no_create': True}" attrs="{'readonly': [('state', '!=', 'draft')]}" required="1"/>
2018-01-24 07:12:32 +01:00
<field name="user_id"/>
2018-01-29 12:35:08 +01:00
<field name="branch_id" groups="base_branch_company.group_multi_branch" options="{'no_create': True}" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
2018-01-24 07:12:32 +01:00
<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"/>
</group>
<notebook>
<page string="Product">
<field name="indent_line" attrs="{'readonly': [('state', '!=', 'draft')]}">
<tree editable="bottom">
<field name="product_id" options="{'no_create': True}" domain="[('purchase_ok', '=', True), ('categ_id', '=', parent.category_id)]"/>
<field name="name"/>
<field name="expected_date"/>
<field name="product_qty"/>
<field name="product_uom" options="{'no_create': True}" groups="product.group_uom"/>
<field name="requisition_qty" readonly="1"/>
<field name="remaining_qty"/>
</tree>
</field>
</page>
<page string="History">
2018-01-29 12:35:08 +01:00
<field name="indent_history_ids" readonly="1">
2018-01-24 07:12:32 +01:00
<tree editable="bottom">
<field name="product_id"/>
<field name="state"/>
<field name="order_id"/>
<field name="purchase_requisition_id"/>
<field name="date"/>
<field name="product_qty"/>
<field name="requisition_qty"/>
<field name="remaining_qty"/>
<button string="Open Record" name="open_form_view" type="object"/>
</tree>
</field>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="activity_ids" widget="mail_activity"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</record>
<record id="view_purchase_indent_search" model="ir.ui.view">
<field name="name">purchase.indent.search</field>
<field name="model">purchase.indent</field>
<field name="arch" type="xml">
<search string="Search Purchase Indent">
<field name="name" string="Name" filter_domain="[('name','ilike',self)]"/>
<field name="category_id" string="Category" filter_domain="[('category_id','ilike',self)]"/>
<field name="user_id" string="Requestd By" filter_domain="[('user_id','ilike',self)]"/>
2018-01-29 12:35:08 +01:00
<field name="branch_id" string="Branch" filter_domain="[('branch_id','ilike',self)]"/>
2018-01-24 07:12:32 +01:00
<field name="state" string="State" filter_domain="[('state','ilike',self)]"/>
<filter name="draft" string="Draft" domain="[('state','=', 'draft')]"/>
<filter name="confirm" string="Confirm" domain="[('state','=','confirm')]"/>
<filter name="requisition" string="Requisition" domain="[('state','=', 'requisition')]"/>
<filter name="done" string="Done" domain="[('state','=','done')]"/>
<filter name="cancel" string="Cancel" domain="[('state', '=', 'cancel')]"/>
<group expand="0" string="Group By">
<filter string="Category" domain="[]" context="{'group_by':'category_id'}"/>
2018-01-29 12:35:08 +01:00
<filter string="Branch" domain="[]" context="{'group_by':'branch_id'}"/>
2018-01-24 07:12:32 +01:00
<filter string="State" domain="[]" context="{'group_by':'state'}"/>
<filter string="Requestd By" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Request Date" domain="[]" context="{'group_by':'request_date'}"/>
</group>
</search>
</field>
</record>
<record id="action_flectra_purchase_indent" model="ir.actions.act_window">
<field name="name">Purchase Indent</field>
<field name="res_model">purchase.indent</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_purchase_indent_search"/>
<field name="context">{'search_default_confirm':1, 'search_default_requisition': 1}</field>
</record>
<menuitem id="menu_flectra_purchase_indent" name="Purchase Indent"
parent="purchase.menu_procurement_management"
action="action_flectra_purchase_indent" sequence="0"/>
<menuitem action="purchase.purchase_rfq" id="purchase.menu_purchase_rfq"
parent="purchase.menu_procurement_management"
sequence="1"/>
<record id="seq_purchase_indent" model="ir.sequence">
<field name="name">Purchase Indent</field>
<field name="code">purchase.indent</field>
<field name="prefix">Indent/</field>
<field name="padding">3</field>
<field name="company_id" eval="False"/>
</record>
</flectra>