-
-
Notifications
You must be signed in to change notification settings - Fork 307
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] new module l10n_it_fatturapa_auto_downpayment
- Loading branch information
Showing
14 changed files
with
691 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
=============================================== | ||
ITA - Fattura PA - select TD02 for downpayments | ||
=============================================== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:62e9ea53b28e2845aa4728960d96554f12afac66d2b7d62c36aca149fd2f13ea | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |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_fatturapa_auto_downpayment | ||
: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_fatturapa_auto_downpayment | ||
: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| | ||
|
||
**Italiano** | ||
|
||
Modulo opzionale per impostare automaticamente TD02 come tipo di | ||
documento fiscale nelle fatture di acconto (necessario per la | ||
fatturazione elettronica). | ||
|
||
**English** | ||
|
||
Additional module to set TD02 as fiscal document type for downpayment | ||
invoices (needed for FatturaPA e-invoice). | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Installation | ||
============ | ||
|
||
|
||
|
||
Configuration | ||
============= | ||
|
||
**Italiano** | ||
|
||
- Alla creazione di una fattura di downpayment, viene settato TD02 come | ||
fiscal document type. | ||
|
||
**English** | ||
|
||
- When creating a downpayment invoice, set TD02 as fiscal document | ||
type. | ||
|
||
Usage | ||
===== | ||
|
||
**Italiano** | ||
|
||
Il modulo funziona automaticamente alla creazione di una fattura di | ||
acconto. | ||
|
||
**English** | ||
|
||
The module sets TD02 for downpayment invoices automatically. | ||
|
||
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 to smash it by providing a detailed and welcomed | ||
`feedback <https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_fatturapa_auto_downpayment%0Aversion:%2016.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 | ||
------- | ||
|
||
* Marco Colombo | ||
|
||
Contributors | ||
------------ | ||
|
||
- `Phi Srl <https://www.phi.technology/>`__: | ||
|
||
- Marco Colombo <https://github.com/TheMule71> | ||
|
||
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/16.0/l10n_it_fatturapa_auto_downpayment>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "ITA - Fattura PA - select TD02 for downpayments", | ||
"version": "16.0.1.0.0", | ||
"sequence": 10, | ||
"summary": "Automatically set TD02 for downpayments", | ||
"category": "Localization/Italy", | ||
"depends": [ | ||
"sale", | ||
"l10n_it_fiscal_document_type", | ||
], | ||
"author": "Marco Colombo, Odoo Community Association (OCA)", | ||
"website": "https://github.com/OCA/l10n-italy", | ||
"license": "AGPL-3", | ||
"installable": True, | ||
"application": False, | ||
"auto_install": True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import account_move |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from odoo import models | ||
|
||
|
||
class AccountMove(models.Model): | ||
_inherit = "account.move" | ||
|
||
def _get_document_fiscal_type( | ||
self, move_type=None, partner=None, fiscal_position=None, journal=None | ||
): | ||
self.ensure_one() | ||
|
||
dt = super()._get_document_fiscal_type( | ||
move_type=move_type, | ||
partner=partner, | ||
fiscal_position=fiscal_position, | ||
journal=journal, | ||
) | ||
if self.is_sale_document() and self._is_downpayment(): | ||
td02 = self.env["fiscal.document.type"].search( | ||
[("code", "=", "TD02")], limit=1 | ||
) | ||
dt.insert(0, td02.id) | ||
return dt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[build-system] | ||
requires = ["whool"] | ||
build-backend = "whool.buildapi" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
**Italiano** | ||
|
||
- Alla creazione di una fattura di downpayment, viene settato | ||
TD02 come fiscal document type. | ||
|
||
**English** | ||
|
||
- When creating a downpayment invoice, set TD02 as fiscal | ||
document type. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- [Phi Srl](https://www.phi.technology/): | ||
- Marco Colombo \<<https://github.com/TheMule71>\> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
**Italiano** | ||
|
||
Modulo opzionale per impostare automaticamente TD02 | ||
come tipo di documento fiscale nelle fatture di | ||
acconto (necessario per la fatturazione elettronica). | ||
|
||
**English** | ||
|
||
Additional module to set TD02 as fiscal document type | ||
for downpayment invoices (needed for FatturaPA e-invoice). |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
**Italiano** | ||
|
||
Il modulo funziona automaticamente alla creazione di una fattura | ||
di acconto. | ||
|
||
**English** | ||
|
||
The module sets TD02 for downpayment invoices automatically. |
Oops, something went wrong.