Skip to content

Commit

Permalink
[MIG] eng_l10n_br_account_tax_engine_disable: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
CristianoMafraJunior committed Feb 3, 2025
1 parent ad0137a commit b6c94df
Show file tree
Hide file tree
Showing 7 changed files with 470 additions and 6 deletions.
55 changes: 55 additions & 0 deletions eng_l10n_br_account_tax_engine_disable/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
======================================
Eng L10n Br Account Tax Engine Disable
======================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:f0bb8b159a1e78a6fd684dc4f877f8a2813368ac81d8eb03982d0cd1265fb6bb
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-Engenere%2Fengenere--addons-lightgray.png?logo=github
:target: https://github.com/Engenere/engenere-addons/tree/16.0/eng_l10n_br_account_tax_engine_disable
:alt: Engenere/engenere-addons

|badge1| |badge2| |badge3|



**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/Engenere/engenere-addons/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/Engenere/engenere-addons/issues/new?body=module:%20eng_l10n_br_account_tax_engine_disable%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
-------

* Engenere

Maintainers
-----------

This module is part of the `Engenere/engenere-addons <https://github.com/Engenere/engenere-addons/tree/16.0/eng_l10n_br_account_tax_engine_disable>`_ project on GitHub.

You are welcome to contribute.
4 changes: 2 additions & 2 deletions eng_l10n_br_account_tax_engine_disable/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

{
"name": "Eng L10n Br Account Tax Engine Disable",
"version": "14.0.1.0.0",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"author": "Engenere",
"website": "https://engenere.one",
"website": "https://github.com/Engenere/engenere-addons",
"depends": [
"l10n_br_account",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,4 @@
class L10nBrFiscalDocument(models.Model):
_inherit = "l10n_br_fiscal.document"

fiscal_tax_engine_disabled = fields.Boolean(
string="Fiscal Tax Engine Disabled", default=False
)
fiscal_tax_engine_disabled = fields.Boolean(default=False)
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ def _is_fiscal_tax_engine_disabled(self):
)

def _update_fiscal_taxes(self):
super()._update_fiscal_taxes()
res = super()._update_fiscal_taxes()

Check warning on line 34 in eng_l10n_br_account_tax_engine_disable/models/l10n_br_fiscal_document_line_mixin_methods.py

View check run for this annotation

Codecov / codecov/patch

eng_l10n_br_account_tax_engine_disable/models/l10n_br_fiscal_document_line_mixin_methods.py#L34

Added line #L34 was not covered by tests
if self._is_fiscal_tax_engine_disabled():
self._update_fiscal_taxes_when_disabled()
return res

Check warning on line 37 in eng_l10n_br_account_tax_engine_disable/models/l10n_br_fiscal_document_line_mixin_methods.py

View check run for this annotation

Codecov / codecov/patch

eng_l10n_br_account_tax_engine_disable/models/l10n_br_fiscal_document_line_mixin_methods.py#L36-L37

Added lines #L36 - L37 were not covered by tests

def _update_fiscal_taxes_when_disabled(self):
tax_groups = self.env["l10n_br_fiscal.tax.group"].search([])

Check warning on line 40 in eng_l10n_br_account_tax_engine_disable/models/l10n_br_fiscal_document_line_mixin_methods.py

View check run for this annotation

Codecov / codecov/patch

eng_l10n_br_account_tax_engine_disable/models/l10n_br_fiscal_document_line_mixin_methods.py#L40

Added line #L40 was not covered by tests
Expand Down
3 changes: 3 additions & 0 deletions eng_l10n_br_account_tax_engine_disable/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
Empty file.
Loading

0 comments on commit b6c94df

Please sign in to comment.