summaryrefslogtreecommitdiff
path: root/base_account_budget/security
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 17:14:58 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 17:14:58 +0700
commit1ca3b3df3421961caec3b747a364071c80f5c7da (patch)
tree6778a1f0f3f9b4c6e26d6d87ccde16e24da6c9d6 /base_account_budget/security
parentb57188be371d36d96caac4b8d65a40745c0e972c (diff)
initial commit
Diffstat (limited to 'base_account_budget/security')
-rw-r--r--base_account_budget/security/account_budget_security.xml30
-rw-r--r--base_account_budget/security/ir.model.access.csv7
2 files changed, 37 insertions, 0 deletions
diff --git a/base_account_budget/security/account_budget_security.xml b/base_account_budget/security/account_budget_security.xml
new file mode 100644
index 0000000..a152523
--- /dev/null
+++ b/base_account_budget/security/account_budget_security.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data noupdate="1">
+ <record id="budget_post_comp_rule" model="ir.rule">
+ <field name="name">Budget post multi-company</field>
+ <field name="model_id" ref="model_account_budget_post"/>
+ <field eval="True" name="global"/>
+ <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
+ </record>
+
+ <record id="budget_comp_rule" model="ir.rule">
+ <field name="name">Budget multi-company</field>
+ <field name="model_id" ref="model_budget_budget"/>
+ <field eval="True" name="global"/>
+ <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
+ </record>
+
+ <record id="budget_lines_comp_rule" model="ir.rule">
+ <field name="name">Budget lines multi-company</field>
+ <field name="model_id" ref="model_budget_lines"/>
+ <field eval="True" name="global"/>
+ <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
+ </record>
+
+ <record model="res.users" id="base.user_root">
+ <field eval="[(4,ref('analytic.group_analytic_accounting'))]" name="groups_id"/>
+ </record>
+
+ </data>
+</odoo>
diff --git a/base_account_budget/security/ir.model.access.csv b/base_account_budget/security/ir.model.access.csv
new file mode 100644
index 0000000..fa665f3
--- /dev/null
+++ b/base_account_budget/security/ir.model.access.csv
@@ -0,0 +1,7 @@
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+access_budget_budget,budget.budget,model_budget_budget,account.group_account_manager,1,1,1,1
+access_account_budget_post,account.budget.post,model_account_budget_post,account.group_account_manager,1,1,1,1
+access_account_budget_post_accountant,account.budget.post accountant,model_account_budget_post,account.group_account_user,1,1,1,1
+access_budget_budget_accountant,budget.budget accountant,model_budget_budget,account.group_account_user,1,1,1,1
+access_budget_lines_accountant,budget.lines accountant,model_budget_lines,account.group_account_user,1,1,1,1
+access_budget,budget.lines manager,model_budget_lines,base.group_user,1,1,1,0