Skip to content

Commit

Permalink
[IMP] hide fields in product.template tree views for group_portal_dis…
Browse files Browse the repository at this point in the history
…tributor

closes #600

Related: ingadhoc/product#474
Signed-off-by: Joel Zilli <joz@adhoc.com.ar>
  • Loading branch information
vib-adhoc committed Dec 23, 2022
1 parent cc6d3fd commit e85fd79
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion portal_sale_distributor/__manifest__.py
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Portal Distributor Sale',
'version': "15.0.1.0.0",
'version': "15.0.1.1.0",
'category': 'Tools',
'complexity': 'easy',
'author': 'ADHOC SA, Odoo Community Association (OCA)',
Expand Down
6 changes: 6 additions & 0 deletions portal_sale_distributor/views/product_template_views.xml
Expand Up @@ -30,6 +30,9 @@
<field name="virtual_available" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<field name="responsible_id" position="attributes">
<attribute name="invisible">1</attribute>
</field>
</field>
</record>

Expand All @@ -42,6 +45,9 @@
<field name="list_price" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<field name="detailed_type" position="attributes">
<attribute name="invisible">1</attribute>
</field>
</field>
</record>
</odoo>
3 changes: 2 additions & 1 deletion portal_sale_distributor_website_sale/__manifest__.py
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Portal Distributor Website Sale',
'version': "15.0.1.0.0",
'version': "15.0.1.1.0",
'category': 'Tools',
'complexity': 'easy',
'author': 'ADHOC SA, Odoo Community Association (OCA)',
Expand All @@ -34,6 +34,7 @@
'data': [
'views/portal_templates.xml',
'views/templates.xml',
'views/product_template_views.xml',
],
'installable': True,
'auto_install': True,
Expand Down
@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<odoo>
<record id="product_template_tree_view_website_sale_inherit" model="ir.ui.view">
<field name="name">product.template.inherit</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="website_sale.product_template_view_tree"/>
<field name="groups_id" eval="[(4, ref('portal_sale_distributor.group_portal_distributor'))]"/>
<field name="arch" type="xml">
<field name="website_id" position="attributes">
<attribute name="invisible">1</attribute>
</field>
</field>
</record>
</odoo>

0 comments on commit e85fd79

Please sign in to comment.