Skip to content

Commit

Permalink
ADD l10n_it_vat_registries_split_payment to fix the following case: (O…
Browse files Browse the repository at this point in the history
…CA#570)

- Configure Split Payment fiscal position and tax
 - Make a customer invoice with SP
 - Print VAT register

Split Payment VAT must not appear as deductible VAT
  • Loading branch information
eLBati authored and Borruso committed Oct 5, 2023
1 parent c623e85 commit 02368a5
Show file tree
Hide file tree
Showing 12 changed files with 663 additions and 0 deletions.
73 changes: 73 additions & 0 deletions l10n_it_vat_registries_split_payment/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
==============================
VAT registries + Split Payment
==============================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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/10.0/l10n_it_vat_registries_split_payment
: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-10-0/l10n-italy-10-0-l10n_it_vat_registries_split_payment
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/122/10.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

Bridge module to make VAT registries module work along with Split Payment module

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-italy/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_vat_registries_split_payment%0Aversion:%2010.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
~~~~~~~

* Agile Business Group

Contributors
~~~~~~~~~~~~

* Lorenzo Battistini <[email protected]>

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.

This module is part of the `OCA/l10n-italy <https://github.com/OCA/l10n-italy/tree/10.0/l10n_it_vat_registries_split_payment>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions l10n_it_vat_registries_split_payment/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
21 changes: 21 additions & 0 deletions l10n_it_vat_registries_split_payment/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Lorenzo Battistini
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "VAT registries + Split Payment",
"summary": "Bridge module to make VAT registries work with Split Payment",
"version": "10.0.1.0.0",
"development_status": "Beta",
"category": "Hidden",
"website": "https://github.com/OCA/l10n-italy/",
"author": "Agile Business Group, Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
"auto_install": True,
"depends": [
"l10n_it_vat_registries",
"l10n_it_split_payment"
],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_it_vat_registries_split_payment
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: l10n_it_vat_registries_split_payment
#: model:ir.model,name:l10n_it_vat_registries_split_payment.model_account_tax
msgid "Tax"
msgstr ""

4 changes: 4 additions & 0 deletions l10n_it_vat_registries_split_payment/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import account_tax
16 changes: 16 additions & 0 deletions l10n_it_vat_registries_split_payment/models/account_tax.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import models


class AccountTax(models.Model):
_inherit = 'account.tax'

def _compute_totals_tax(self, data):
res = super(AccountTax, self)._compute_totals_tax(data)
if self.is_split_payment:
# res is (tax_name, base, tax, deductible, undeductible)
# so, in case of SP, SP VAT must not appear as deductible
return (res[0], res[1], res[2], 0.0, res[4])
return res
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Lorenzo Battistini <[email protected]>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Bridge module to make VAT registries module work along with Split Payment module
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 02368a5

Please sign in to comment.