Skip to content

Commit

Permalink
[MIG] account_budget_oca 15.0 & dependencies:
Browse files Browse the repository at this point in the history
    - Add analytic dependency
    - Add l10n_generic_coa dependency
    - Fix tags of tests
  • Loading branch information
flachica committed Sep 17, 2022
1 parent 95b0218 commit 2813d4e
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 28 deletions.
4 changes: 2 additions & 2 deletions account_budget_oca/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

{
"name": "Budgets Management",
"version": "14.0.1.0.0",
"version": "15.0.1.0.0",
"category": "Accounting",
"license": "LGPL-3",
"author": "Odoo S.A., Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-budgeting",
"depends": ["account"],
"depends": ["account", "analytic", "l10n_generic_coa"],
"excludes": ["account_budget"],
"data": [
"security/ir.model.access.csv",
Expand Down
2 changes: 2 additions & 0 deletions account_budget_oca/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
* Oihane Crucelaegui <[email protected]>
* Alberto Martín Cortada <[email protected]>
* Freni Patel <[email protected]>
* `Greenice <https://www.greenice.com>`_:
* Fernando La Chica <[email protected]>
22 changes: 10 additions & 12 deletions account_budget_oca/security/account_budget_security.xml
Original file line number Diff line number Diff line change
@@ -1,34 +1,32 @@
<odoo>
<data noupdate="1">
<odoo 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 name="global" eval="True" />
<field
name="domain_force"
>['|',('company_id','=',False),('company_id','in',company_ids)]</field>
name="domain_force"
>['|',('company_id','=',False),('company_id','in',company_ids)]</field>
</record>
<record id="budget_comp_rule" model="ir.rule">
<field name="name">Budget multi-company</field>
<field name="model_id" ref="model_crossovered_budget" />
<field name="global" eval="True" />
<field
name="domain_force"
>['|',('company_id','=',False),('company_id','in',company_ids)]</field>
name="domain_force"
>['|',('company_id','=',False),('company_id','in',company_ids)]</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_crossovered_budget_lines" />
<field name="global" eval="True" />
<field
name="domain_force"
>['|',('company_id','=',False),('company_id','in',company_ids)]</field>
name="domain_force"
>['|',('company_id','=',False),('company_id','in',company_ids)]</field>
</record>
<record id="base.user_root" model="res.users">
<field
name="groups_id"
eval="[(4,ref('analytic.group_analytic_accounting'))]"
/>
name="groups_id"
eval="[(4,ref('analytic.group_analytic_accounting'))]"
/>
</record>
</data>
</odoo>
2 changes: 2 additions & 0 deletions account_budget_oca/tests/test_account_budget.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
import datetime

from odoo.fields import Date
from odoo.tests import tagged

from .common import TestAccountBudgetCommon


# ---------------------------------------------------------
# Tests
# ---------------------------------------------------------
@tagged("post_install", "-at_install")
class TestAccountBudget(TestAccountBudgetCommon):
def test_account_budget(self):
# Creating a crossovered.budget record
Expand Down
2 changes: 2 additions & 0 deletions account_budget_oca/tests/test_theoreticalamount.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.

from odoo.fields import Datetime
from odoo.tests import tagged

from .common import TestAccountBudgetCommon

Expand All @@ -13,6 +14,7 @@
# ---------------------------------------------------------
# Tests
# ---------------------------------------------------------
@tagged("post_install", "-at_install")
class TestTheoreticalAmount(TestAccountBudgetCommon):
def setUp(self):
super().setUp()
Expand Down
1 change: 0 additions & 1 deletion account_budget_oca/views/account_budget_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@
<tree
decoration-info="state == 'draft'"
decoration-muted="state in ('done','cancel')"
string="Budget"
>
<field name="name" colspan="1" />
<field name="date_from" />
Expand Down
26 changes: 13 additions & 13 deletions account_budget_oca/views/res_config_settings_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="account.res_config_settings_view_form" />
<field name="arch" type="xml">
<div id="account_budget" position="replace">
<div class="content-group">
<div class="mt16">
<button
name="%(account_budget_oca.open_budget_post_form)d"
icon="fa-arrow-right"
type="action"
string="Budgetary Positions"
class="btn-link"
/>
</div>
</div>
</div>
<xpath
expr="//div[@id='analytic']/div/div[@class='o_setting_right_pane']"
position="inside"
>
<button
name="%(account_budget_oca.open_budget_post_form)d"
icon="fa-arrow-right"
type="action"
string="Budgetary Positions"
class="btn-link"
attrs="{'invisible': [('group_analytic_accounting','=',False)]}"
/>
</xpath>
</field>
</record>
</odoo>

0 comments on commit 2813d4e

Please sign in to comment.