diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/product/security | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/product/security')
| -rw-r--r-- | addons/product/security/ir.model.access.csv | 28 | ||||
| -rw-r--r-- | addons/product/security/product_security.xml | 65 |
2 files changed, 93 insertions, 0 deletions
diff --git a/addons/product/security/ir.model.access.csv b/addons/product/security/ir.model.access.csv new file mode 100644 index 00000000..a342bfe5 --- /dev/null +++ b/addons/product/security/ir.model.access.csv @@ -0,0 +1,28 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+access_product_category_user,product.category.user,model_product_category,base.group_user,1,0,0,0
+access_product_template_user,product.template.user,model_product_template,base.group_user,1,0,0,0
+access_product_packaging_user,product.packaging.user,model_product_packaging,base.group_user,1,0,0,0
+access_product_supplierinfo_user,product.supplierinfo.user,model_product_supplierinfo,base.group_user,1,0,0,0
+access_product_pricelist_user,product.pricelist.user,model_product_pricelist,base.group_user,1,0,0,0
+access_product_pricelist_item_user,product.pricelist.item.user,model_product_pricelist_item,base.group_user,1,0,0,0
+access_product_pricelist_partner_manager,product.pricelist partner manager,model_product_pricelist,base.group_partner_manager,1,0,0,0
+access_product_product_employee,product.product employee,model_product_product,base.group_user,1,0,0,0
+access_product_attribute,product.attribute,model_product_attribute,base.group_user,1,0,0,0
+access_product_attribute_value,product.attribute value,model_product_attribute_value,base.group_user,1,0,0,0
+access_product_attribute_custom_value_user,product.attribute.custom value manager,model_product_attribute_custom_value,base.group_user,1,0,0,0
+access_product_product_attribute,product.template.attribute value,model_product_template_attribute_value,base.group_user,1,0,0,0
+access_product_template_attribute_exclusion,product..template.attribute exclusion,model_product_template_attribute_exclusion,base.group_user,1,0,0,0
+access_product_template_attribute_line,product.template.attribute line,model_product_template_attribute_line,base.group_user,1,0,0,0
+access_product_category_manager,product.category.manager,model_product_category,base.group_system,1,1,1,1
+access_product_template_manager,product.template.manager,model_product_template,base.group_system,1,1,1,1
+access_product_packaging_manager,product.packaging.manager,model_product_packaging,base.group_system,1,1,1,1
+access_product_supplierinfo_manager,product.supplierinfo.manager,model_product_supplierinfo,base.group_system,1,1,1,1
+access_product_pricelist_manager,product.pricelist.manager,model_product_pricelist,base.group_system,1,1,1,1
+access_product_pricelist_item_manager,product.pricelist.item.manager,model_product_pricelist_item,base.group_system,1,1,1,1
+access_product_product_manager,product.product manager,model_product_product,base.group_system,1,1,1,1
+access_product_attribute_manager,product.attribute manager,model_product_attribute,base.group_system,1,1,1,1
+access_product_attribute_value_manager,product.attribute value manager,model_product_attribute_value,base.group_system,1,1,1,1
+access_product_attribute_custom_value_manager,product.attribute.custom value manager,model_product_attribute_custom_value,base.group_system,1,1,1,1
+access_product_product_attribute_manager,product.template.attribute value manager,model_product_template_attribute_value,base.group_system,1,1,1,1
+access_product_template_attribute_exclusion_manager,product.template.attribute exclusion manager,model_product_template_attribute_exclusion,base.group_system,1,1,1,1
+access_product_template_attribute_line_manager,product.template.attribute line manager,model_product_template_attribute_line,base.group_system,1,1,1,1
diff --git a/addons/product/security/product_security.xml b/addons/product/security/product_security.xml new file mode 100644 index 00000000..4cbff24b --- /dev/null +++ b/addons/product/security/product_security.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> +<data noupdate="0"> + + <record id="group_product_pricelist" model="res.groups"> + <field name="name">Basic Pricelists</field> + <field name="category_id" ref="base.module_category_hidden"/> + </record> + + <record id="group_sale_pricelist" model="res.groups"> + <field name="name">Advanced Pricelists</field> + <field name="category_id" ref="base.module_category_hidden"/> + <field name="implied_ids" eval="[(4, ref('product.group_product_pricelist'))]"/> + </record> + + <record id="group_stock_packaging" model="res.groups"> + <field name="name">Manage Product Packaging</field> + <field name="category_id" ref="base.module_category_hidden"/> + </record> + + <record id="group_product_variant" model="res.groups"> + <field name="name">Manage Product Variants</field> + <field name="category_id" ref="base.module_category_hidden"/> + </record> + + <record id="group_discount_per_so_line" model="res.groups"> + <field name="name">Discount on lines</field> + <field name="category_id" ref="base.module_category_hidden"/> + </record> + +</data> +<data noupdate="1"> + + <record id="product_comp_rule" model="ir.rule"> + <field name="name" >Product multi-company</field> + <field name="model_id" ref="model_product_template"/> + <field name="domain_force"> ['|', ('company_id', 'in', company_ids), ('company_id', '=', False)]</field> + </record> + + <record model="ir.rule" id="product_pricelist_comp_rule"> + <field name="name">product pricelist company rule</field> + <field name="model_id" ref="model_product_pricelist"/> + <field name="domain_force"> ['|', ('company_id', 'in', company_ids), ('company_id', '=', False)]</field> + </record> + + <record model="ir.rule" id="product_pricelist_item_comp_rule"> + <field name="name">product pricelist item company rule</field> + <field name="model_id" ref="model_product_pricelist_item"/> + <field name="domain_force"> ['|', ('company_id', 'in', company_ids), ('company_id', '=', False)]</field> + </record> + + <record model="ir.rule" id="product_supplierinfo_comp_rule"> + <field name="name">product supplierinfo company rule</field> + <field name="model_id" ref="model_product_supplierinfo"/> + <field name="domain_force">['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]</field> + </record> + + <record model="ir.rule" id="product_packaging_comp_rule"> + <field name="name">product packaging company rule</field> + <field name="model_id" ref="model_product_packaging"/> + <field name="domain_force">['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]</field> + </record> + +</data> +</odoo> |
