Skip to content

Commit c7707a7

Browse files
Merge pull request #9 from Escodoo/14.0-add-clog_l10n_br_fiscal_custom
[14.0][ADD] clog_l10n_br_fiscal_custom: add new module
2 parents 23761b9 + 04c7004 commit c7707a7

File tree

12 files changed

+505
-0
lines changed

12 files changed

+505
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
================================
2+
CLOG - Brazilian Fiscal - Custom
3+
================================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:5d6ac06873027e0d64fb187beaf9d1103b5bd72cfdced11b03b23f3f07f4417b
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-Escodoo%2Fclog--addons-lightgray.png?logo=github
20+
:target: https://github.com/Escodoo/clog-addons/tree/14.0/clog_l10n_br_fiscal_custom
21+
:alt: Escodoo/clog-addons
22+
23+
|badge1| |badge2| |badge3|
24+
25+
26+
**Table of contents**
27+
28+
.. contents::
29+
:local:
30+
31+
Bug Tracker
32+
===========
33+
34+
Bugs are tracked on `GitHub Issues <https://github.com/Escodoo/clog-addons/issues>`_.
35+
In case of trouble, please check there if your issue has already been reported.
36+
If you spotted it first, help us to smash it by providing a detailed and welcomed
37+
`feedback <https://github.com/Escodoo/clog-addons/issues/new?body=module:%20clog_l10n_br_fiscal_custom%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
38+
39+
Do not contact contributors directly about support or help with technical issues.
40+
41+
Credits
42+
=======
43+
44+
Authors
45+
~~~~~~~
46+
47+
* Escodoo
48+
49+
Maintainers
50+
~~~~~~~~~~~
51+
52+
This module is part of the `Escodoo/clog-addons <https://github.com/Escodoo/clog-addons/tree/14.0/clog_l10n_br_fiscal_custom>`_ project on GitHub.
53+
54+
You are welcome to contribute.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Copyright 2025 - TODAY, Escodoo
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
{
5+
"name": "CLOG - Brazilian Fiscal - Custom",
6+
"version": "14.0.1.0.0",
7+
"license": "AGPL-3",
8+
"author": "Escodoo",
9+
"website": "https://github.com/Escodoo/clog-addons",
10+
"depends": ["l10n_br_fiscal"],
11+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import document_line_mixin_methods
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright 2025 - TODAY, Kaynnan Lemes <kaynnan.lemes@escodoo.com.br>
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
from odoo import models
5+
6+
7+
class FiscalDocumentLineMixinMethods(models.AbstractModel):
8+
_inherit = "l10n_br_fiscal.document.line.mixin.methods"
9+
10+
def _get_fiscal_partner(self):
11+
"""
12+
Returns the fiscal partner by searching all many2one fields for a related document
13+
with partner_shipping_id or partner_id.
14+
"""
15+
self.ensure_one()
16+
for field in self._fields.values():
17+
if field.type == "many2one":
18+
doc = getattr(self, field.name, False)
19+
if doc:
20+
partner = getattr(doc, "partner_shipping_id", False)
21+
if partner:
22+
return partner
23+
return super()._get_fiscal_partner()

clog_l10n_br_fiscal_custom/readme/CONTRIBUTORS.rst

Whitespace-only changes.

clog_l10n_br_fiscal_custom/readme/DESCRIPTION.rst

Whitespace-only changes.

clog_l10n_br_fiscal_custom/readme/USAGE.rst

Whitespace-only changes.
2.81 KB
Loading

0 commit comments

Comments
 (0)