Skip to content

Commit

Permalink
[IMP] add magento fields on product_template view
Browse files Browse the repository at this point in the history
  • Loading branch information
PierrickBrun committed Mar 12, 2018
1 parent ea9f218 commit c4ffd66
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 7 deletions.
1 change: 1 addition & 0 deletions connector_magento_configurable/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
'data': [
'security/ir.model.access.csv',
'views/magento_backend_views.xml',
'views/product_template.xml',
],
'installable': True,
'auto_install': True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import logging

from odoo import models, fields
from odoo.addons.component.core import Component

_logger = logging.getLogger(__name__)

Expand Down
9 changes: 3 additions & 6 deletions connector_magento_configurable/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_magento_product_configurable","magento_product_configurable connector manager","model_magento_product_configurable","connector.group_connector_manager",1,1,1,1
"access_magento_product_configurable_user","magento_product_configurable user","model_magento_product_configurable","sales_team.group_sale_salesman",1,0,0,0
"access_magento_product_configurable_sale_manager","magento_product_configurable sale manager","model_magento_product_configurable","sales_team.group_sale_manager",1,1,1,1
"access_magento_product_template","magento_product_template connector manager","model_magento_product_template","connector.group_connector_manager",1,1,1,1
"access_magento_product_template_user","magento_product_template user","model_magento_product_template","sales_team.group_sale_salesman",1,0,0,0
"access_magento_product_template_sale_manager","magento_product_template sale manager","model_magento_product_template","sales_team.group_sale_manager",1,1,1,1
"access_magento_product_attribute_sale_manager","magento_product_attribute sale manager","model_magento_product_attribute","sales_team.group_sale_manager",1,1,1,1
"access_magento_product_attribute_user","magento_product_attribute user","model_magento_product_attribute","sales_team.group_sale_salesman",1,0,0,0
"access_magento_product_attribute_sale_manager","magento_product_attribute sale manager","model_magento_product_attribute","sales_team.group_sale_manager",1,1,1,1
"access_magento_product_attribute_value_sale_manager","magento_product_attribute_value sale manager","model_magento_product_attribute_value","sales_team.group_sale_manager",1,1,1,1
"access_magento_product_attribute_value_user","magento_product_attribute_value user","model_magento_product_attribute_value","sales_team.group_sale_salesman",1,0,0,0
"access_magento_product_attribute_value_sale_manager","magento_product_attribute_value sale manager","model_magento_product_attribute_value","sales_team.group_sale_manager",1,1,1,1
"access_magento_product_attribute_line_sale_manager","magento_product_attribute_line sale manager","model_magento_product_attribute_line","sales_team.group_sale_manager",1,1,1,1
"access_magento_product_attribute_line_user","magento_product_attribute_line user","model_magento_product_attribute_line","sales_team.group_sale_salesman",1,0,0,0
"access_magento_product_attribute_line_sale_manager","magento_product_attribute_line sale manager","model_magento_product_attribute_line","sales_team.group_sale_manager",1,1,1,1
"access_magento_product_attribute_price_sale_manager","magento_product_attribute_price sale manager","model_magento_product_attribute_price","sales_team.group_sale_manager",1,1,1,1
"access_magento_product_attribute_price_user","magento_product_attribute_price user","model_magento_product_attribute_price","sales_team.group_sale_salesman",1,0,0,0
"access_magento_product_attribute_price_sale_manager","magento_product_attribute_price sale manager","model_magento_product_attribute_price","sales_team.group_sale_manager",1,1,1,1
36 changes: 36 additions & 0 deletions connector_magento_configurable/views/product_template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>

<record id="product_template_only_form_view" model="ir.ui.view">
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_only_form_view"/>
<field name="arch" type="xml">
<field name="attribute_line_ids" position="before">
<label string="Variants managed by magento" class="oe_inline"/>
<field name="variant_managed_by_magento" class="oe_inline"
nolabel="1" readonly="True"/>
<p class="oe_grey">
<strong>
Warning
</strong>
: this template's variants are manage by magento and cannot
be modified from the ERP. unchecking this box may
cause conflicts between magento and the ERP.
</p>
</field>
<page name="connector" position="attributes">
<attribute name="invisible">0</attribute>
</page>
<page name="connector" position="inside">
<group string="Magento Bindings">
<field name="magento_bind_ids" nolabel="1">
<tree>
<field name="backend_id"/>
</tree>
</field>
</group>
</page>
</field>
</record>

</odoo>

0 comments on commit c4ffd66

Please sign in to comment.