Skip to content

Commit

Permalink
[FIX] Adding PO lines in the PR lines view
Browse files Browse the repository at this point in the history
  • Loading branch information
MiquelRForgeFlow authored and LoisRForgeFlow committed May 31, 2017
1 parent e553a2f commit 4d7be5c
Showing 1 changed file with 84 additions and 3 deletions.
87 changes: 84 additions & 3 deletions purchase_request_to_rfq/views/purchase_request_view.xml
Expand Up @@ -57,13 +57,94 @@
<field name="purchased_qty"/>
<field name="purchase_state"/>
</group>
<field name="purchase_lines" mode="tree"
attrs="{'readonly': [('purchase_state', 'in', ('cancel'))]}"
domain="[('product_id', '=', product_id)]"
context="{'form_view_ref' : 'purchase_request_to_rfq.purchase_order_line_form2_sub',
'tree_view_ref' : 'purchase_request_to_rfq.purchase_order_line_tree_sub',
'search_view_ref' : 'purchase_request_to_rfq.purchase_order_line_search_sub'}"/>
</page>
</notebook>
</field>
</record>

<record id="purchase_order_line_form2_sub" model="ir.ui.view">
<field name="name">purchase.order.line.form2</field>
<field name="model">purchase.order.line</field>
<field name="arch" type="xml">
<form string="Purchase Order Lines" create="false" readonly="1">
<sheet>
<label for="order_id" readonly="1" class="oe_edit_only"/>
<h1>
<field name="order_id" readonly="1" class="oe_inline"/>
<label string="," readonly="1" attrs="{'invisible':[('date_order','=',False)]}"/>
<field name="date_order" readonly="1" class="oe_inline"/>
</h1>
<label for="partner_id" readonly="1" class="oe_edit_only"/>
<h2><field name="partner_id" readonly="1"/></h2>
<group>
<group>
<field name="purchase_lines" nolabel="1"/>
<field name="product_id" readonly="1"/>
<label for="product_qty" readonly="1"/>
<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" widget="monetary" readonly="1"/>
</group>
<group>
<field name="taxes_id" widget="many2many_tags"
domain="[('type_tax_use', '=', 'purchase')]" readonly="1"/>
<field name="date_planned" widget="date" readonly="1"/>
<field name="company_id" readonly="1" groups="base.group_multi_company" options="{'no_create': True}"/>
<field name="account_analytic_id" readonly="1" colspan="4" groups="purchase.group_analytic_accounting"/>
</group>
</group>
</page>
</notebook>
<field name="name" readonly="1"/>
<separator string="Manual Invoices"/>
<field name="invoice_lines" readonly="1"/>
<separator string="Stock Moves"/>
<field name="move_ids" readonly="1"/>
<separator string="Purchase Request Lines"/>
<field name="purchase_request_lines" readonly="1"/>
</sheet>
</form>
</field>
</record>

<record id="purchase_order_line_tree_sub" 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="true">
<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"/>
<field name="purchase_request_lines" invisible="1"/>
</tree>
</field>
</record>

<record id="purchase_order_line_search_sub" 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 Line" create="false">
<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 string="Order Reference" domain="[]" context="{'group_by': 'order_id'}"/>
<filter name="groupby_supplier" string="Vendor" domain="[]" context="{'group_by': 'partner_id'}"/>
</group>
</search>
</field>
</record>

Expand Down

0 comments on commit 4d7be5c

Please sign in to comment.