From 80ec8ad7f54b982396605d7a332f460060356528 Mon Sep 17 00:00:00 2001 From: eLBati Date: Thu, 22 Feb 2024 16:07:25 +0100 Subject: [PATCH] ADD l10n_it_withholding_tax_payment_order: Integrazione Ritenute d'acconto e Ordini di pagamento --- .../README.rst | 86 ++++ .../__init__.py | 1 + .../__manifest__.py | 21 + .../models/__init__.py | 1 + .../models/account_move_line.py | 11 + .../pyproject.toml | 3 + .../readme/CONTRIBUTORS.md | 1 + .../readme/DESCRIPTION.md | 2 + .../static/description/index.html | 424 ++++++++++++++++++ .../l10n_it_withholding_tax_payment_order | 1 + .../setup.py | 6 + 11 files changed, 557 insertions(+) create mode 100644 l10n_it_withholding_tax_payment_order/README.rst create mode 100644 l10n_it_withholding_tax_payment_order/__init__.py create mode 100644 l10n_it_withholding_tax_payment_order/__manifest__.py create mode 100644 l10n_it_withholding_tax_payment_order/models/__init__.py create mode 100644 l10n_it_withholding_tax_payment_order/models/account_move_line.py create mode 100644 l10n_it_withholding_tax_payment_order/pyproject.toml create mode 100644 l10n_it_withholding_tax_payment_order/readme/CONTRIBUTORS.md create mode 100644 l10n_it_withholding_tax_payment_order/readme/DESCRIPTION.md create mode 100644 l10n_it_withholding_tax_payment_order/static/description/index.html create mode 120000 setup/l10n_it_withholding_tax_payment_order/odoo/addons/l10n_it_withholding_tax_payment_order create mode 100644 setup/l10n_it_withholding_tax_payment_order/setup.py diff --git a/l10n_it_withholding_tax_payment_order/README.rst b/l10n_it_withholding_tax_payment_order/README.rst new file mode 100644 index 000000000000..1ce53a28dd58 --- /dev/null +++ b/l10n_it_withholding_tax_payment_order/README.rst @@ -0,0 +1,86 @@ +============================================== +ITA - Ritenute d'acconto - Ordini di pagamento +============================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:f826d7192b1bb49336c0d30e7b2f3210e25d189baeb2fe4e461942e45aa3e516 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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-OCA%2Fl10n--italy-lightgray.png?logo=github + :target: https://github.com/OCA/l10n-italy/tree/16.0/l10n_it_withholding_tax_payment_order + :alt: OCA/l10n-italy +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/l10n-italy-16-0/l10n-italy-16-0-l10n_it_withholding_tax_payment_order + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-italy&target_branch=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +Make ``l10n_it_withholding_tax`` and ``account_payment_order`` work +together, setting the correct amount (Net To Pay) in payment order +lines. + +**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 +------- + +* Innovyou + +Contributors +------------ + +- Lorenzo Battistini https://www.innovyou.co/ + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +.. |maintainer-eLBati| image:: https://github.com/eLBati.png?size=40px + :target: https://github.com/eLBati + :alt: eLBati + +Current `maintainer `__: + +|maintainer-eLBati| + +This module is part of the `OCA/l10n-italy `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/l10n_it_withholding_tax_payment_order/__init__.py b/l10n_it_withholding_tax_payment_order/__init__.py new file mode 100644 index 000000000000..0650744f6bc6 --- /dev/null +++ b/l10n_it_withholding_tax_payment_order/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/l10n_it_withholding_tax_payment_order/__manifest__.py b/l10n_it_withholding_tax_payment_order/__manifest__.py new file mode 100644 index 000000000000..f32df9d1a0d6 --- /dev/null +++ b/l10n_it_withholding_tax_payment_order/__manifest__.py @@ -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": [], +} diff --git a/l10n_it_withholding_tax_payment_order/models/__init__.py b/l10n_it_withholding_tax_payment_order/models/__init__.py new file mode 100644 index 000000000000..8795b3bea648 --- /dev/null +++ b/l10n_it_withholding_tax_payment_order/models/__init__.py @@ -0,0 +1 @@ +from . import account_move_line diff --git a/l10n_it_withholding_tax_payment_order/models/account_move_line.py b/l10n_it_withholding_tax_payment_order/models/account_move_line.py new file mode 100644 index 000000000000..83d35a9dfb51 --- /dev/null +++ b/l10n_it_withholding_tax_payment_order/models/account_move_line.py @@ -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) + if self.withholding_tax_amount: + vals["amount_currency"] -= self.withholding_tax_amount + return vals diff --git a/l10n_it_withholding_tax_payment_order/pyproject.toml b/l10n_it_withholding_tax_payment_order/pyproject.toml new file mode 100644 index 000000000000..4231d0cccb3d --- /dev/null +++ b/l10n_it_withholding_tax_payment_order/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/l10n_it_withholding_tax_payment_order/readme/CONTRIBUTORS.md b/l10n_it_withholding_tax_payment_order/readme/CONTRIBUTORS.md new file mode 100644 index 000000000000..aec38611cf30 --- /dev/null +++ b/l10n_it_withholding_tax_payment_order/readme/CONTRIBUTORS.md @@ -0,0 +1 @@ +- Lorenzo Battistini https://www.innovyou.co/ diff --git a/l10n_it_withholding_tax_payment_order/readme/DESCRIPTION.md b/l10n_it_withholding_tax_payment_order/readme/DESCRIPTION.md new file mode 100644 index 000000000000..82f4ca0bd733 --- /dev/null +++ b/l10n_it_withholding_tax_payment_order/readme/DESCRIPTION.md @@ -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. diff --git a/l10n_it_withholding_tax_payment_order/static/description/index.html b/l10n_it_withholding_tax_payment_order/static/description/index.html new file mode 100644 index 000000000000..6b820e47306a --- /dev/null +++ b/l10n_it_withholding_tax_payment_order/static/description/index.html @@ -0,0 +1,424 @@ + + + + + +ITA - Ritenute d'acconto - Ordini di pagamento + + + +
+

ITA - Ritenute d’acconto - Ordini di pagamento

+ + +

Beta License: AGPL-3 OCA/l10n-italy Translate me on Weblate Try me on Runboat

+

Make l10n_it_withholding_tax and account_payment_order work +together, setting the correct amount (Net To Pay) in payment order +lines.

+

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

+
    +
  • Innovyou
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

Current maintainer:

+

eLBati

+

This module is part of the OCA/l10n-italy project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

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