Skip to content

Commit

Permalink
ADD l10n_it_withholding_tax_payment_order: Integrazione Ritenute d'ac…
Browse files Browse the repository at this point in the history
…conto e Ordini di pagamento
  • Loading branch information
eLBati committed Feb 22, 2024
1 parent f966a79 commit 1a225ed
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions l10n_it_withholding_tax_payment_order/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
21 changes: 21 additions & 0 deletions l10n_it_withholding_tax_payment_order/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2024 Lorenzo Battistini
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "ITA - Ritenute d'acconto - Ordini di pagamento",
"summary": "Integrazione Ritenute d'acconto e Ordini di pagamento",
"version": "16.0.1.0.0",
"development_status": "Beta",
"category": "Hidden",
"website": "https://github.com/OCA/l10n-italy",
"author": "Innovyou, Odoo Community Association (OCA)",
"maintainers": ["eLBati"],
"license": "AGPL-3",
"application": False,
"installable": True,
"auto_install": True,
"depends": [
"l10n_it_withholding_tax",
"account_payment_order",
],
"data": [],
}
1 change: 1 addition & 0 deletions l10n_it_withholding_tax_payment_order/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import account_move_line
11 changes: 11 additions & 0 deletions l10n_it_withholding_tax_payment_order/models/account_move_line.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from odoo import models


class MoveLine(models.Model):
_inherit = "account.move.line"

def _prepare_payment_line_vals(self, payment_order):
vals = super()._prepare_payment_line_vals(payment_order)

Check warning on line 8 in l10n_it_withholding_tax_payment_order/models/account_move_line.py

View check run for this annotation

Codecov / codecov/patch

l10n_it_withholding_tax_payment_order/models/account_move_line.py#L8

Added line #L8 was not covered by tests
if self.withholding_tax_amount:
vals["amount_currency"] -= self.withholding_tax_amount
return vals

Check warning on line 11 in l10n_it_withholding_tax_payment_order/models/account_move_line.py

View check run for this annotation

Codecov / codecov/patch

l10n_it_withholding_tax_payment_order/models/account_move_line.py#L10-L11

Added lines #L10 - L11 were not covered by tests
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Lorenzo Battistini https://www.innovyou.co/
2 changes: 2 additions & 0 deletions l10n_it_withholding_tax_payment_order/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Make `l10n_it_withholding_tax` and `account_payment_order` work together, setting the
correct amount (Net To Pay) in payment order lines.
6 changes: 6 additions & 0 deletions setup/l10n_it_withholding_tax_payment_order/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 1a225ed

Please sign in to comment.