Skip to content

Commit

Permalink
[ADD] account_group_disable_adapt_methods: add new module
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelsavegnago committed Nov 29, 2023
1 parent 0b9fe80 commit 7742c9f
Show file tree
Hide file tree
Showing 12 changed files with 144 additions and 0 deletions.
81 changes: 81 additions & 0 deletions account_group_disable_adapt_methods/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
===================================
Account Group Disable Adapt Methods
===================================
.. |badge1| image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3

|badge1|

Account Group Disable Adapt Methods

**Table of contents**

.. contents::
:local:

Configuration
=============

To Configure...

Usage
=====

To usage...

Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/Escodoo/{project_repo}/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smash it by providing detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Escodoo

Contributors
~~~~~~~~~~~~

* Marcel Savegnago <[email protected]>

Other credits
~~~~~~~~~~~~~

The development of this module has been financially supported by:

* Escodoo - `https://www.escodoo.com.br <https://www.escodoo.com.br>`_

Maintainers
~~~~~~~~~~~

This module is maintained by the Escodoo.

.. |maintainer-escodoo| image:: https://github.com/escodoo.png?size=80px
:target: https://github.com/Escodoo
:alt: escodoo

|maintainer-escodoo|

We at Escodoo are exclusively dedicated to deploying the Odoo Platform and are
focused on providing solutions that make our customers more competitive, lowering
costs, making technology more accessible and ensuring it is used strategically to
add even more value to the business.

.. |maintainer-marcelsavegnago| image:: https://github.com/marcelsavegnago.png?size=40px
:target: https://github.com/marcelsavegnago
:alt: marcelsavegnago

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-marcelsavegnago|

To contribute to this module, please visit https://www.escodoo.com.br.
1 change: 1 addition & 0 deletions account_group_disable_adapt_methods/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
19 changes: 19 additions & 0 deletions account_group_disable_adapt_methods/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2023 - TODAY, Escodoo
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Account Group Disable Adapt Methods",
"summary": """
Account Group Disable Adapt Methods""",
"version": "14.0.1.0.0",
"license": "AGPL-3",
"author": "Escodoo",
"website": "https://github.com/Escodoo/account-addons",
"depends": [
"account",
],
"data": [
"views/account_group.xml",
],
"demo": [],
}
1 change: 1 addition & 0 deletions account_group_disable_adapt_methods/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import account_group
15 changes: 15 additions & 0 deletions account_group_disable_adapt_methods/models/account_group.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2023 - TODAY, Marcel Savegnago <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import models

from odoo.addons.account.models.account_account import (
AccountGroup as AccountGroupInherit,
)


class AccountGroup(models.Model):
_inherit = "account.group"

def write(self, vals):
return super(AccountGroupInherit, self).write(vals)

Check warning on line 15 in account_group_disable_adapt_methods/models/account_group.py

View check run for this annotation

Codecov / codecov/patch

account_group_disable_adapt_methods/models/account_group.py#L15

Added line #L15 was not covered by tests
Empty file.
Empty file.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions account_group_disable_adapt_methods/views/account_group.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2023 - TODAY, Marcel Savegnago <[email protected]>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>

<data>
<record id="action_run_adapt_methods" model="ir.actions.server">
<field name="name">Run Adap Methodst</field>
<field name="model_id" ref="model_account_group" />
<field name="binding_model_id" ref="account.model_account_group" />
<field name="state">code</field>
<field name="code">
if records:
records._adapt_accounts_for_account_groups()
records._adapt_parent_account_group()
</field>
</record>

</data>
</odoo>
6 changes: 6 additions & 0 deletions setup/account_group_disable_adapt_methods/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)

0 comments on commit 7742c9f

Please sign in to comment.