Skip to content

Commit 9753bfa

Browse files
Merge pull request #47 from Escodoo/14.0-add-epa_l10n_br_account_withholding_custom
[14.0][ADD] epa_l10n_br_account_withholding: add new module
2 parents b4fa70b + bc98675 commit 9753bfa

File tree

12 files changed

+605
-0
lines changed

12 files changed

+605
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
======================================
2+
Epa L10n Br Account Withholding 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:7123c799dc6bd21bf9cc86ab8e84ac84acf221315de7431563a6a8c96599f5bb
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%2Fepa--addons-lightgray.png?logo=github
20+
:target: https://github.com/Escodoo/epa-addons/tree/14.0/epa_l10n_br_account_withholding_custom
21+
:alt: Escodoo/epa-addons
22+
23+
|badge1| |badge2| |badge3|
24+
25+
EPA Brazilian Account Withholding Customization
26+
27+
**Table of contents**
28+
29+
.. contents::
30+
:local:
31+
32+
Usage
33+
=====
34+
35+
Just Install.
36+
37+
Bug Tracker
38+
===========
39+
40+
Bugs are tracked on `GitHub Issues <https://github.com/Escodoo/epa-addons/issues>`_.
41+
In case of trouble, please check there if your issue has already been reported.
42+
If you spotted it first, help us to smash it by providing a detailed and welcomed
43+
`feedback <https://github.com/Escodoo/epa-addons/issues/new?body=module:%20epa_l10n_br_account_withholding_custom%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
44+
45+
Do not contact contributors directly about support or help with technical issues.
46+
47+
Credits
48+
=======
49+
50+
Authors
51+
~~~~~~~
52+
53+
* Escodoo
54+
55+
Contributors
56+
~~~~~~~~~~~~
57+
58+
* `Escodoo <https://www.escodoo.com.br>`_:
59+
60+
* Marcel Savegnago <[email protected]>
61+
62+
Maintainers
63+
~~~~~~~~~~~
64+
65+
This module is part of the `Escodoo/epa-addons <https://github.com/Escodoo/epa-addons/tree/14.0/epa_l10n_br_account_withholding_custom>`_ project on GitHub.
66+
67+
You are welcome to contribute.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2024 Escodoo
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
{
5+
"name": "Epa L10n Br Account Withholding Custom",
6+
"summary": """
7+
EPA L10nBr Account Withholding Custom""",
8+
"version": "14.0.1.0.0",
9+
"license": "AGPL-3",
10+
"author": "Escodoo",
11+
"website": "https://github.com/Escodoo/epa-addons",
12+
"depends": [
13+
"l10n_br_account_withholding",
14+
],
15+
"data": [
16+
"views/account_move.xml",
17+
],
18+
"demo": [],
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import account_move
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Copyright 2024 Marcel Savegnago - Escodoo (https://www.escodoo.com.br)
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
from odoo import api, fields, models
5+
6+
7+
class AccountMove(models.Model):
8+
9+
_inherit = "account.move"
10+
11+
wh_move_id = fields.Many2one(
12+
"account.move",
13+
string="WH Vendor Bill",
14+
compute="_compute_wh_move_id",
15+
store=True,
16+
)
17+
wh_move_partner_id = fields.Many2one(
18+
"res.partner", string="WH Partner", compute="_compute_wh_move_id", store=True
19+
)
20+
wh_fiscal_document_id = fields.Many2one(
21+
"l10n_br_fiscal.document",
22+
string="WH Fiscal Document",
23+
compute="_compute_wh_move_id",
24+
store=True,
25+
)
26+
27+
@api.depends("line_ids")
28+
def _compute_wh_move_id(self):
29+
for move in self:
30+
line = move.line_ids.mapped("wh_move_line_id")
31+
if line:
32+
move.wh_move_id = line.move_id
33+
move.wh_move_partner_id = line.move_id.partner_id
34+
move.wh_fiscal_document_id = line.move_id.fiscal_document_id
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* `Escodoo <https://www.escodoo.com.br>`_:
2+
3+
* Marcel Savegnago <[email protected]>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
EPA Brazilian Account Withholding Customization
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Just Install.

0 commit comments

Comments
 (0)