Skip to content

Commit

Permalink
[FIX] base_custom_attributes: Add access rights on attribute.location.
Browse files Browse the repository at this point in the history
[IMP] product_custom_attributes: Add a menu to access to attribute.group objects in 'Sales > Configuration > Products > Attributes'
  • Loading branch information
mathieuvatel authored and Pedro M. Baeza committed Oct 16, 2013
2 parents 612eb8a + 805a09b commit ca0299f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 10 deletions.
23 changes: 13 additions & 10 deletions base_custom_attributes/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_base_custom_attributes_attribute_group_salemanager","base_custom_attributes_attribute_group","base_custom_attributes.model_attribute_group","base.group_sale_manager",1,1,1,1
"access_base_custom_attributes_attribute_attribute_salemanager","base_custom_attributes_product_attribute","base_custom_attributes.model_attribute_attribute","base.group_sale_manager",1,1,1,1
"access_base_custom_attributes_attribute_option_salemanager","base_custom_attributes_attribute_option","base_custom_attributes.model_attribute_option","base.group_sale_manager",1,1,1,1
"access_base_custom_attributes_attribute_group_manager","base_custom_attributes_attribute_group","base_custom_attributes.model_attribute_group","base.group_no_one",1,1,1,1
"access_base_custom_attributes_attribute_attribute_manager","base_custom_attributes_attribute_attribute","base_custom_attributes.model_attribute_attribute","base.group_no_one",1,1,1,1
"access_base_custom_attributes_attribute_option_manager","base_custom_attributes_attribute_option","base_custom_attributes.model_attribute_option","base.group_no_one",1,1,1,1
"access_base_custom_attributes_attribute_group_user","base_custom_attributes_attribute_group","base_custom_attributes.model_attribute_group","base.group_user",1,0,0,0
"access_base_custom_attributes_attribute_attribute_user","base_custom_attributes_attribute_attribute","base_custom_attributes.model_attribute_attribute","base.group_user",1,0,0,0
"access_base_custom_attributes_attribute_option_user","base_custom_attributes_attribute_option","base_custom_attributes.model_attribute_option","base.group_user",1,0,0,0
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_base_custom_attributes_attribute_group_salemanager,base_custom_attributes_attribute_group,base_custom_attributes.model_attribute_group,base.group_sale_manager,1,1,1,1
access_base_custom_attributes_attribute_attribute_salemanager,base_custom_attributes_product_attribute,base_custom_attributes.model_attribute_attribute,base.group_sale_manager,1,1,1,1
access_base_custom_attributes_attribute_option_salemanager,base_custom_attributes_attribute_option,base_custom_attributes.model_attribute_option,base.group_sale_manager,1,1,1,1
access_base_custom_attributes_attribute_location_salemanager,base_custom_attributes_attribute_location,base_custom_attributes.model_attribute_location,base.group_sale_manager,1,1,1,1
access_base_custom_attributes_attribute_group_manager,base_custom_attributes_attribute_group,base_custom_attributes.model_attribute_group,base.group_no_one,1,1,1,1
access_base_custom_attributes_attribute_attribute_manager,base_custom_attributes_attribute_attribute,base_custom_attributes.model_attribute_attribute,base.group_no_one,1,1,1,1
access_base_custom_attributes_attribute_option_manager,base_custom_attributes_attribute_option,base_custom_attributes.model_attribute_option,base.group_no_one,1,1,1,1
access_base_custom_attributes_attribute_location_manager,base_custom_attributes_attribute_location,base_custom_attributes.model_attribute_location,base.group_no_one,1,1,1,1
access_base_custom_attributes_attribute_group_user,base_custom_attributes_attribute_group,base_custom_attributes.model_attribute_group,base.group_user,1,0,0,0
access_base_custom_attributes_attribute_attribute_user,base_custom_attributes_attribute_attribute,base_custom_attributes.model_attribute_attribute,base.group_user,1,0,0,0
access_base_custom_attributes_attribute_option_user,base_custom_attributes_attribute_option,base_custom_attributes.model_attribute_option,base.group_user,1,0,0,0
access_base_custom_attributes_attribute_location_user,base_custom_attributes_attribute_location,base_custom_attributes.model_attribute_location,base.group_user,1,1,1,0
13 changes: 13 additions & 0 deletions product_custom_attributes/custom_attributes_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@
<field name="help"></field>
</record>

<record id="attribute_group_form_action" model="ir.actions.act_window">
<field name="name">Attribute Groups</field>
<field name="res_model">attribute.group</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="base_custom_attributes.view_attribute_attribute_search"/>
<field name="context">{"force_model": 'product.product'}</field>
<field name="help"></field>
</record>

<record id="attribute_attribute_form_action" model="ir.actions.act_window">
<field name="name">Product Attribute</field>
<field name="res_model">attribute.attribute</field>
Expand All @@ -36,6 +46,9 @@
<menuitem
action="attribute_set_form_action" id="menu_attribute_set_action"
parent="product_custom_attributes.menu_attribute_in_config_product" sequence="1"/>
<menuitem
action="attribute_group_form_action" id="menu_attribute_group_action"
parent="product_custom_attributes.menu_attribute_in_config_product" sequence="2"/>
<menuitem
action="attribute_attribute_form_action" id="menu_attribute_attribute_action"
parent="product_custom_attributes.menu_attribute_in_config_product" sequence="4"/>
Expand Down

0 comments on commit ca0299f

Please sign in to comment.