diff --git a/clog_l10n_br_fiscal_custom/README.rst b/clog_l10n_br_fiscal_custom/README.rst new file mode 100644 index 0000000..16a74af --- /dev/null +++ b/clog_l10n_br_fiscal_custom/README.rst @@ -0,0 +1,54 @@ +================================ +CLOG - Brazilian Fiscal - Custom +================================ + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:5d6ac06873027e0d64fb187beaf9d1103b5bd72cfdced11b03b23f3f07f4417b + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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-Escodoo%2Fclog--addons-lightgray.png?logo=github + :target: https://github.com/Escodoo/clog-addons/tree/14.0/clog_l10n_br_fiscal_custom + :alt: Escodoo/clog-addons + +|badge1| |badge2| |badge3| + + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub 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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Escodoo + +Maintainers +~~~~~~~~~~~ + +This module is part of the `Escodoo/clog-addons `_ project on GitHub. + +You are welcome to contribute. diff --git a/clog_l10n_br_fiscal_custom/__init__.py b/clog_l10n_br_fiscal_custom/__init__.py new file mode 100644 index 0000000..0650744 --- /dev/null +++ b/clog_l10n_br_fiscal_custom/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/clog_l10n_br_fiscal_custom/__manifest__.py b/clog_l10n_br_fiscal_custom/__manifest__.py new file mode 100644 index 0000000..e40b35c --- /dev/null +++ b/clog_l10n_br_fiscal_custom/__manifest__.py @@ -0,0 +1,11 @@ +# Copyright 2025 - TODAY, Escodoo +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + "name": "CLOG - Brazilian Fiscal - Custom", + "version": "14.0.1.0.0", + "license": "AGPL-3", + "author": "Escodoo", + "website": "https://github.com/Escodoo/clog-addons", + "depends": ["l10n_br_fiscal"], +} diff --git a/clog_l10n_br_fiscal_custom/models/__init__.py b/clog_l10n_br_fiscal_custom/models/__init__.py new file mode 100644 index 0000000..0758618 --- /dev/null +++ b/clog_l10n_br_fiscal_custom/models/__init__.py @@ -0,0 +1 @@ +from . import document_line_mixin_methods diff --git a/clog_l10n_br_fiscal_custom/models/document_line_mixin_methods.py b/clog_l10n_br_fiscal_custom/models/document_line_mixin_methods.py new file mode 100644 index 0000000..ec32242 --- /dev/null +++ b/clog_l10n_br_fiscal_custom/models/document_line_mixin_methods.py @@ -0,0 +1,23 @@ +# Copyright 2025 - TODAY, Kaynnan Lemes +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import models + + +class FiscalDocumentLineMixinMethods(models.AbstractModel): + _inherit = "l10n_br_fiscal.document.line.mixin.methods" + + def _get_fiscal_partner(self): + """ + Returns the fiscal partner by searching all many2one fields for a related document + with partner_shipping_id or partner_id. + """ + self.ensure_one() + for field in self._fields.values(): + if field.type == "many2one": + doc = getattr(self, field.name, False) + if doc: + partner = getattr(doc, "partner_shipping_id", False) + if partner: + return partner + return super()._get_fiscal_partner() diff --git a/clog_l10n_br_fiscal_custom/readme/CONTRIBUTORS.rst b/clog_l10n_br_fiscal_custom/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000..e69de29 diff --git a/clog_l10n_br_fiscal_custom/readme/DESCRIPTION.rst b/clog_l10n_br_fiscal_custom/readme/DESCRIPTION.rst new file mode 100644 index 0000000..e69de29 diff --git a/clog_l10n_br_fiscal_custom/readme/USAGE.rst b/clog_l10n_br_fiscal_custom/readme/USAGE.rst new file mode 100644 index 0000000..e69de29 diff --git a/clog_l10n_br_fiscal_custom/static/description/icon.png b/clog_l10n_br_fiscal_custom/static/description/icon.png new file mode 100644 index 0000000..12ab005 Binary files /dev/null and b/clog_l10n_br_fiscal_custom/static/description/icon.png differ diff --git a/clog_l10n_br_fiscal_custom/static/description/index.html b/clog_l10n_br_fiscal_custom/static/description/index.html new file mode 100644 index 0000000..bf342bf --- /dev/null +++ b/clog_l10n_br_fiscal_custom/static/description/index.html @@ -0,0 +1,408 @@ + + + + + +CLOG - Brazilian Fiscal - Custom + + + +
+

CLOG - Brazilian Fiscal - Custom

+ + +

Beta License: AGPL-3 Escodoo/clog-addons

+

Table of contents

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub 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.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Escodoo
  • +
+
+
+

Maintainers

+

This module is part of the Escodoo/clog-addons project on GitHub.

+

You are welcome to contribute.

+
+
+
+ + diff --git a/setup/clog_l10n_br_fiscal_custom/odoo/addons/clog_l10n_br_fiscal_custom b/setup/clog_l10n_br_fiscal_custom/odoo/addons/clog_l10n_br_fiscal_custom new file mode 120000 index 0000000..2f9f56f --- /dev/null +++ b/setup/clog_l10n_br_fiscal_custom/odoo/addons/clog_l10n_br_fiscal_custom @@ -0,0 +1 @@ +../../../../clog_l10n_br_fiscal_custom \ No newline at end of file diff --git a/setup/clog_l10n_br_fiscal_custom/setup.py b/setup/clog_l10n_br_fiscal_custom/setup.py new file mode 100644 index 0000000..28c57bb --- /dev/null +++ b/setup/clog_l10n_br_fiscal_custom/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)