summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorHetal Dhanak <hdh@odoo.com>2019-07-18 11:24:07 +0000
committerSimon Lejeune <sle@openerp.com>2019-10-16 09:44:51 +0000
commitca3e898481f4091c420a8e9ed498624a591303e9 (patch)
tree8c73a0dd03aa02f15be4a7aa581e0fd3a6bf6f96 /addons
parentd59b67a91587b4a968cbd9dd053ddfe8beaedd14 (diff)
[IMP] purchase, purchase_requisition: supplier.info tree view
* use an editable tree to edit the supplier info * keep the original forms because they're used in the "vendor pricelist" menuitem * updated tour * change the position of requisition_id Task-2029380 closes odoo/odoo#35972 Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Diffstat (limited to 'addons')
-rw-r--r--addons/product/views/product_views.xml1
-rw-r--r--addons/purchase/views/product_views.xml25
-rw-r--r--addons/purchase_requisition/views/product_views.xml4
3 files changed, 26 insertions, 4 deletions
diff --git a/addons/product/views/product_views.xml b/addons/product/views/product_views.xml
index 6b48a701865..4b43b0eff36 100644
--- a/addons/product/views/product_views.xml
+++ b/addons/product/views/product_views.xml
@@ -671,6 +671,7 @@
<field name="min_qty"/>
<field name="product_uom" groups="uom.group_uom"/>
<field name="price" string="Price"/>
+ <field name="delay" optional="hide"/>
</tree>
</field>
</record>
diff --git a/addons/purchase/views/product_views.xml b/addons/purchase/views/product_views.xml
index a4228b9be3e..3bb683cfa22 100644
--- a/addons/purchase/views/product_views.xml
+++ b/addons/purchase/views/product_views.xml
@@ -2,6 +2,27 @@
<odoo>
<!-- Product Suppliers-->
+ <record id="product_supplierinfo_tree_view2" model="ir.ui.view">
+ <field name="name">product.supplierinfo.tree.view2</field>
+ <field name="model">product.supplierinfo</field>
+ <field name="inherit_id" ref="product.product_supplierinfo_tree_view"/>
+ <field name="mode">primary</field>
+ <field name="priority" eval="1000"/>
+ <field name="arch" type="xml">
+ <xpath expr="//tree" position="attributes">
+ <attribute name="editable">bottom</attribute>
+ </xpath>
+ <xpath expr="//field[@name='company_id']" position="attributes">
+ <attribute name="readonly">0</attribute>
+ </xpath>
+ <xpath expr="//field[@name='name']" position="attributes">
+ <attribute name="readonly">0</attribute>
+ </xpath>
+ <xpath expr="//field[@name='product_id']" position="attributes">
+ <attribute name="readonly">0</attribute>
+ </xpath>
+ </field>
+ </record>
<record id="view_product_supplier_inherit" model="ir.ui.view">
<field name="name">product.template.supplier.form.inherit</field>
@@ -12,8 +33,8 @@
<attribute name="invisible">0</attribute>
</xpath>
<group name="purchase" position="before">
- <field name="seller_ids" context="{'default_product_tmpl_id':context.get('product_tmpl_id',active_id), 'product_template_invisible_variant': True}" nolabel="1" attrs="{'invisible': [('product_variant_count','&gt;',1)]}"/>
- <field name="variant_seller_ids" context="{'default_product_tmpl_id': context.get('product_tmpl_id', active_id)}" nolabel="1" attrs="{'invisible': [('product_variant_count','&lt;=',1)]}"/>
+ <field name="seller_ids" context="{'default_product_tmpl_id':context.get('product_tmpl_id',active_id), 'product_template_invisible_variant': True, 'tree_view_ref':'purchase.product_supplierinfo_tree_view2'}" nolabel="1" attrs="{'invisible': [('product_variant_count','&gt;',1)]}"/>
+ <field name="variant_seller_ids" context="{'default_product_tmpl_id': context.get('product_tmpl_id', active_id), 'tree_view_ref':'purchase.product_supplierinfo_tree_view2'}" nolabel="1" attrs="{'invisible': [('product_variant_count','&lt;=',1)]}"/>
</group>
<group name="bill" position="attributes">
<attribute name="groups">purchase.group_purchase_manager</attribute>
diff --git a/addons/purchase_requisition/views/product_views.xml b/addons/purchase_requisition/views/product_views.xml
index 82f34339745..51fb3d31e9c 100644
--- a/addons/purchase_requisition/views/product_views.xml
+++ b/addons/purchase_requisition/views/product_views.xml
@@ -6,8 +6,8 @@
<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='name']" position="after">
- <field name="purchase_requisition_id" readonly="1"/>
+ <xpath expr="//field[@name='product_id']" position="after">
+ <field name="purchase_requisition_id" readonly="1" optional="hide"/>
</xpath>
</field>
</record>