diff --git a/account_budget_oca/__manifest__.py b/account_budget_oca/__manifest__.py index d3458127..041ccc98 100644 --- a/account_budget_oca/__manifest__.py +++ b/account_budget_oca/__manifest__.py @@ -2,7 +2,7 @@ { "name": "Budgets Management", - "version": "14.0.1.0.0", + "version": "16.0.1.0.0", "category": "Accounting", "license": "LGPL-3", "author": "Odoo S.A., Odoo Community Association (OCA)", diff --git a/account_budget_oca/security/account_budget_security.xml b/account_budget_oca/security/account_budget_security.xml index 596704d5..5d85240e 100644 --- a/account_budget_oca/security/account_budget_security.xml +++ b/account_budget_oca/security/account_budget_security.xml @@ -1,34 +1,32 @@ - - - - Budget post multi-company - - - ['|',('company_id','=',False),('company_id','in',company_ids)] - - - Budget multi-company - - - ['|',('company_id','=',False),('company_id','in',company_ids)] - - - Budget lines multi-company - - - ['|',('company_id','=',False),('company_id','in',company_ids)] - - - - - + + + Budget post multi-company + + + ['|',('company_id','=',False),('company_id','in',company_ids)] + + + Budget multi-company + + + ['|',('company_id','=',False),('company_id','in',company_ids)] + + + Budget lines multi-company + + + ['|',('company_id','=',False),('company_id','in',company_ids)] + + + + diff --git a/account_budget_oca/tests/common.py b/account_budget_oca/tests/common.py index 55b088bd..852804bc 100644 --- a/account_budget_oca/tests/common.py +++ b/account_budget_oca/tests/common.py @@ -23,7 +23,7 @@ def setUp(self): # Checking if the budgetary positions have accounts or not account_ids = self.account_model.search( [ - ("user_type_id", "=", self.ref("account.data_account_type_revenue")), + ("account_type", "=", "income"), ("tag_ids.name", "in", ["Operating Activities"]), ] ).ids @@ -32,7 +32,7 @@ def setUp(self): { "name": "Product Sales - (test)", "code": "X2020", - "user_type_id": self.ref("account.data_account_type_revenue"), + "account_type": "income", "tag_ids": [(6, 0, [self.ref("account.account_tag_operating")])], } ).ids @@ -159,7 +159,7 @@ def setUp(self): account_ids = self.account_model.search( [ - ("user_type_id.name", "=", "Expenses"), + ("account_type", "=", "expense"), ("tag_ids.name", "in", ["Operating Activities"]), ] ).ids @@ -169,7 +169,7 @@ def setUp(self): { "name": "Expense - (test)", "code": "X2120", - "user_type_id": self.ref("account.data_account_type_expenses"), + "account_type": "expense", "tag_ids": [(6, 0, [self.ref("account.account_tag_operating")])], } ).ids diff --git a/account_budget_oca/tests/test_theoreticalamount.py b/account_budget_oca/tests/test_theoreticalamount.py index a4e2c1d2..41ea7260 100644 --- a/account_budget_oca/tests/test_theoreticalamount.py +++ b/account_budget_oca/tests/test_theoreticalamount.py @@ -26,13 +26,12 @@ def setUp(self): } ) crossovered_budget_line_obj = self.env["crossovered.budget.lines"] - user_type_id = self.ref("account.data_account_type_revenue") tag_id = self.ref("account.account_tag_operating") account_rev = self.env["account.account"].create( { "code": "Y2020", "name": "Budget - Test Revenue Account", - "user_type_id": user_type_id, + "account_type": "income", "tag_ids": [(4, tag_id, 0)], } ) diff --git a/account_budget_oca/views/account_budget_views.xml b/account_budget_oca/views/account_budget_views.xml index c09479e1..8e44b2be 100644 --- a/account_budget_oca/views/account_budget_views.xml +++ b/account_budget_oca/views/account_budget_views.xml @@ -55,6 +55,12 @@ groups="base.group_multi_company" options="{'no_create': True}" /> + @@ -253,7 +259,6 @@