summaryrefslogtreecommitdiff
path: root/addons/purchase_requisition/views/product_views.xml
diff options
context:
space:
mode:
Diffstat (limited to 'addons/purchase_requisition/views/product_views.xml')
-rw-r--r--addons/purchase_requisition/views/product_views.xml50
1 files changed, 50 insertions, 0 deletions
diff --git a/addons/purchase_requisition/views/product_views.xml b/addons/purchase_requisition/views/product_views.xml
new file mode 100644
index 00000000..3c003703
--- /dev/null
+++ b/addons/purchase_requisition/views/product_views.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<odoo>
+
+ <record id="product_supplierinfo_tree_view_inherit" model="ir.ui.view">
+ <field name="name">product.template.product.form.inherit</field>
+ <field name="model">product.supplierinfo</field>
+ <field name="inherit_id" ref="product.product_supplierinfo_tree_view"/>
+ <field name="arch" type="xml">
+ <xpath expr="//field[@name='product_id']" position="after">
+ <field name="purchase_requisition_id" readonly="1" optional="hide"/>
+ </xpath>
+ </field>
+ </record>
+
+ <record id="supplier_info_form_inherit" model="ir.ui.view">
+ <field name="name">product.supplierinfo.requisition.view</field>
+ <field name="model">product.supplierinfo</field>
+ <field name="priority">20</field>
+ <field name="inherit_id" ref="product.product_supplierinfo_form_view"/>
+ <field name="arch" type="xml">
+ <field name="product_code" position="after">
+ <field name="purchase_requisition_id"
+ attrs="{'invisible': [('purchase_requisition_id', '=', False)]}"/>
+ </field>
+ </field>
+ </record>
+
+ <record id="product_template_form_view_inherit" model="ir.ui.view">
+ <field name="name">product.template.form.inherit</field>
+ <field name="model">product.template</field>
+ <field name="inherit_id" ref="purchase.view_product_supplier_inherit"/>
+ <field name="arch" type="xml">
+ <group name="bill" position="before">
+ <group string="Reordering" attrs="{'invisible': [('type', '=', 'service')]}">
+ <field name="purchase_requisition" widget="radio"/>
+ </group>
+ </group>
+ </field>
+ </record>
+
+ <record id="act_res_partner_2_purchase_order" model="ir.actions.act_window">
+ <field name="name">Purchase orders</field>
+ <field name="res_model">purchase.order</field>
+ <field name="domain">[('requisition_id', '=', active_id)]</field>
+ <field name="context">{'default_requisition_id': active_id}</field>
+ <field name="binding_model_id" ref="model_purchase_requisition"/>
+ <field name="binding_view_types">form</field>
+ </record>
+
+</odoo>