diff --git a/account_vat_period_end_statement/README.rst b/account_vat_period_end_statement/README.rst
index 22cfe6c3c4b..22d605d40ef 100644
--- a/account_vat_period_end_statement/README.rst
+++ b/account_vat_period_end_statement/README.rst
@@ -17,13 +17,13 @@ ITA - Liquidazione IVA
: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/account_vat_period_end_statement
+ :target: https://github.com/OCA/l10n-italy/tree/18.0/account_vat_period_end_statement
: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-account_vat_period_end_statement
+ :target: https://translation.odoo-community.org/projects/l10n-italy-18-0/l10n-italy-18-0-account_vat_period_end_statement
: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
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-italy&target_branch=18.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -99,14 +99,14 @@ Configuration
Configurazione > Contabilità > Intervalli date > Generazione
intervalli data (visibile solo in modalità debug):
- - prefisso nome intervallo: prefisso identificativo per i periodi da
- generare (tipicamente l'anno)
- - durata: 1 mese
- - numero di intervalli da generare: 12
- - tipo: creare un tipo o utilizzarne uno esistente, non è richiesta
- una configurazione particolare
- - data iniziale: primo giorno del primo periodo che sarà generato
- (tipicamente il primo giorno dell'anno i.e. 01/01/2018)
+ - prefisso nome intervallo: prefisso identificativo per i periodi da
+ generare (tipicamente l'anno)
+ - durata: 1 mese
+ - numero di intervalli da generare: 12
+ - tipo: creare un tipo o utilizzarne uno esistente, non è richiesta
+ una configurazione particolare
+ - data iniziale: primo giorno del primo periodo che sarà generato
+ (tipicamente il primo giorno dell'anno i.e. 01/01/2018)
Per caricare l'importo corretto, un'imposta deve essere associata al
conto utilizzato nella liquidazione:
@@ -127,14 +127,14 @@ Configuration
Configuration > Accounting > Date ranges > Generate Date Ranges
(visible only in debug mode):
- - range name prefix: prefix identifying the periods to be generated
- (usually the year)
- - duration: 1 month
- - number of ranges to generate: 12
- - type: create a type or use an existing one, no specific
- configuration is required
- - date start: first day of the first period to be generated (usually
- the first day of the year e.g. 01/01/2018)
+ - range name prefix: prefix identifying the periods to be generated
+ (usually the year)
+ - duration: 1 month
+ - number of ranges to generate: 12
+ - type: create a type or use an existing one, no specific
+ configuration is required
+ - date start: first day of the first period to be generated (usually
+ the first day of the year e.g. 01/01/2018)
In order to load the correct amount from tax, the tax has to be
associated to the account involved in the statement:
@@ -154,7 +154,7 @@ 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 `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -170,26 +170,26 @@ Authors
Contributors
------------
-- Lorenzo Battistini
-- Elena Carlesso
-- Marco Marchiori
-- Sergio Corato
-- Andrea Gallina
-- Alex Comba
-- Alessandro Camilli
-- Simone Rubino
-- Giacomo Grasso
-- Lara Baggio
-- Gianmarco Conte
-- Michele Rusticucci
-- Salvo Rapisarda
-- `TAKOBI `__:
+- Lorenzo Battistini
+- Elena Carlesso
+- Marco Marchiori
+- Sergio Corato
+- Andrea Gallina
+- Alex Comba
+- Alessandro Camilli
+- Simone Rubino
+- Giacomo Grasso
+- Lara Baggio
+- Gianmarco Conte
+- Michele Rusticucci
+- Salvo Rapisarda
+- `TAKOBI `__:
- - Simone Rubino
+ - Simone Rubino
-- `Aion Tech `__:
+- `Aion Tech `__:
- - Simone Rubino
+ - Simone Rubino
Maintainers
-----------
@@ -204,6 +204,6 @@ 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 `_ project on GitHub.
+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/account_vat_period_end_statement/__manifest__.py b/account_vat_period_end_statement/__manifest__.py
index df62f8d355c..516f34865ac 100644
--- a/account_vat_period_end_statement/__manifest__.py
+++ b/account_vat_period_end_statement/__manifest__.py
@@ -8,7 +8,7 @@
{
"name": "ITA - Liquidazione IVA",
- "version": "16.0.1.2.7",
+ "version": "18.0.1.0.0",
"category": "Localization/Italy",
"summary": "Allow to create the 'VAT Statement'.",
"license": "AGPL-3",
diff --git a/account_vat_period_end_statement/models/account.py b/account_vat_period_end_statement/models/account.py
index 5b61e7ef7b8..b45b4945bce 100644
--- a/account_vat_period_end_statement/models/account.py
+++ b/account_vat_period_end_statement/models/account.py
@@ -129,19 +129,9 @@ def _get_default_interest_percent(self):
"account.account",
"Previous Credits VAT",
help="Credit VAT from previous periods",
- states={
- "confirmed": [("readonly", True)],
- "paid": [("readonly", True)],
- "draft": [("readonly", False)],
- },
)
previous_credit_vat_amount = fields.Float(
"Previous Credits VAT Amount",
- states={
- "confirmed": [("readonly", True)],
- "paid": [("readonly", True)],
- "draft": [("readonly", False)],
- },
digits="Account",
)
previous_year_credit = fields.Boolean("Previous year credits")
@@ -149,74 +139,34 @@ def _get_default_interest_percent(self):
"account.account",
"Previous Debits VAT",
help="Debit VAT from previous periods",
- states={
- "confirmed": [("readonly", True)],
- "paid": [("readonly", True)],
- "draft": [("readonly", False)],
- },
)
previous_debit_vat_amount = fields.Float(
"Previous Debits VAT Amount",
- states={
- "confirmed": [("readonly", True)],
- "paid": [("readonly", True)],
- "draft": [("readonly", False)],
- },
digits="Account",
)
interests_debit_vat_account_id = fields.Many2one(
"account.account",
"Due interests",
help="Due interests for three-monthly statments",
- states={
- "confirmed": [("readonly", True)],
- "paid": [("readonly", True)],
- "draft": [("readonly", False)],
- },
)
interests_debit_vat_amount = fields.Float(
"Due interests Amount",
- states={
- "confirmed": [("readonly", True)],
- "paid": [("readonly", True)],
- "draft": [("readonly", False)],
- },
digits="Account",
)
tax_credit_account_id = fields.Many2one(
"account.account",
"Tax credits",
- states={
- "confirmed": [("readonly", True)],
- "paid": [("readonly", True)],
- "draft": [("readonly", False)],
- },
)
tax_credit_amount = fields.Float(
"Tax credits Amount",
- states={
- "confirmed": [("readonly", True)],
- "paid": [("readonly", True)],
- "draft": [("readonly", False)],
- },
digits="Account",
)
advance_account_id = fields.Many2one(
"account.account",
"Down payment",
- states={
- "confirmed": [("readonly", True)],
- "paid": [("readonly", True)],
- "draft": [("readonly", False)],
- },
)
advance_amount = fields.Float(
"Down payment Amount",
- states={
- "confirmed": [("readonly", True)],
- "paid": [("readonly", True)],
- "draft": [("readonly", False)],
- },
digits="Account",
)
advance_computation_method = fields.Selection(
@@ -227,39 +177,19 @@ def _get_default_interest_percent(self):
("4", '"4" (soggetti particolari)'),
],
string="Down payment computation method",
- states={
- "confirmed": [("readonly", True)],
- "paid": [("readonly", True)],
- "draft": [("readonly", False)],
- },
)
generic_vat_account_line_ids = fields.One2many(
"statement.generic.account.line",
"statement_id",
"Other VAT Credits / Debits or Tax Compensations",
- states={
- "confirmed": [("readonly", True)],
- "paid": [("readonly", True)],
- "draft": [("readonly", False)],
- },
)
authority_partner_id = fields.Many2one(
"res.partner",
"Tax Authority Partner",
- states={
- "confirmed": [("readonly", True)],
- "paid": [("readonly", True)],
- "draft": [("readonly", False)],
- },
)
authority_vat_account_id = fields.Many2one(
"account.account",
"Tax Authority VAT Account",
- states={
- "confirmed": [("readonly", True)],
- "paid": [("readonly", True)],
- "draft": [("readonly", False)],
- },
)
authority_vat_amount = fields.Float(
"Authority VAT Amount",
@@ -276,19 +206,9 @@ def _get_default_interest_percent(self):
"account.journal",
"Journal",
required=True,
- states={
- "confirmed": [("readonly", True)],
- "paid": [("readonly", True)],
- "draft": [("readonly", False)],
- },
)
date = fields.Date(
required=True,
- states={
- "confirmed": [("readonly", True)],
- "paid": [("readonly", True)],
- "draft": [("readonly", False)],
- },
default=fields.Date.context_today,
)
move_id = fields.Many2one("account.move", "VAT statement move", readonly=True)
@@ -304,11 +224,6 @@ def _get_default_interest_percent(self):
payment_term_id = fields.Many2one(
"account.payment.term",
"Payment Term",
- states={
- "confirmed": [("readonly", True)],
- "paid": [("readonly", True)],
- "draft": [("readonly", False)],
- },
)
reconciled = fields.Boolean(
"Paid/Reconciled",
@@ -480,7 +395,7 @@ def _split_vat_data_payment_term(
untaxed_amount_currency,
)
payment_term_lines = []
- for term in due_list:
+ for term in due_list["line_ids"]:
current_line = end_debit_vat_data.copy()
current_line["credit"] = term["company_amount"]
current_line["date_maturity"] = term["date"]
diff --git a/account_vat_period_end_statement/static/description/index.html b/account_vat_period_end_statement/static/description/index.html
index b7cac995237..f686b22cd3b 100644
--- a/account_vat_period_end_statement/static/description/index.html
+++ b/account_vat_period_end_statement/static/description/index.html
@@ -369,7 +369,7 @@ ITA - Liquidazione IVA
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:291d49ba53933717c3fe7a46884b43e9d5cd54e12098f6cf5e5b744611e8e958
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
![Try me on Runboat](https://img.shields.io/badge/runboat-Try%20me-875A7B.png)
+
![Try me on Runboat](https://img.shields.io/badge/runboat-Try%20me-875A7B.png)
Italiano
Per fare la liquidazione IVA, aprire Fatturazione > Contabilità >
@@ -495,7 +495,7 @@
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.
+feedback.
Do not contact contributors directly about support or help with technical issues.
@@ -542,7 +542,7 @@
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 project on GitHub.
+
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/account_vat_period_end_statement/tests/common.py b/account_vat_period_end_statement/tests/common.py
index 5dd0f8f1b5c..9052e9c9d65 100644
--- a/account_vat_period_end_statement/tests/common.py
+++ b/account_vat_period_end_statement/tests/common.py
@@ -7,8 +7,7 @@
from dateutil.rrule import MONTHLY
-from odoo.tests import tagged
-from odoo.tests.common import Form
+from odoo.tests import Form, tagged
from odoo.addons.account.tests.common import AccountTestInvoicingCommon
@@ -26,8 +25,8 @@ def setUpClass(cls, chart_template_ref=None):
current_datetime = datetime(2020, month=6, day=15)
generator = generator.create(
{
- "date_start": "%s-01-01" % current_datetime.year,
- "name_prefix": "%s-" % current_datetime.year,
+ "date_start": f"{current_datetime.year}-01-01",
+ "name_prefix": f"{current_datetime.year}-",
"type_id": cls.range_type.id,
"duration_count": 1,
"unit_of_time": str(MONTHLY),
@@ -37,8 +36,8 @@ def setUpClass(cls, chart_template_ref=None):
generator.action_apply()
prev_year_generator = generator.create(
{
- "date_start": "%s-01-01" % (current_datetime.year - 1),
- "name_prefix": "%s-" % (current_datetime.year - 1),
+ "date_start": f"{current_datetime.year - 1}-01-01",
+ "name_prefix": f"{current_datetime.year - 1}-",
"type_id": cls.range_type.id,
"duration_count": 1,
"unit_of_time": str(MONTHLY),
@@ -130,7 +129,8 @@ def setUpClass(cls, chart_template_ref=None):
)
cls.term_line_model.create(
{
- "value": "balance",
+ "delay_type": "days_after",
+ "value": "fixed",
"days": 16,
"payment_id": cls.account_payment_term.id,
}
diff --git a/account_vat_period_end_statement/views/account_view.xml b/account_vat_period_end_statement/views/account_view.xml
index bad3c18079f..c517dde3f08 100644
--- a/account_vat_period_end_statement/views/account_view.xml
+++ b/account_vat_period_end_statement/views/account_view.xml
@@ -15,7 +15,7 @@
-
-
-
+
+
+
@@ -76,7 +78,7 @@
name="%(action_add_period)d"
string="Add period"
colspan="2"
- attrs="{'invisible': [('state', 'in', ('confirmed', 'paid'))]}"
+ invisible="state in ('confirmed', 'paid')"
icon="fa-plus"
/>
@@ -85,7 +87,7 @@
name="%(action_remove_period)d"
string="Remove period"
colspan="2"
- attrs="{'invisible': [('state', 'in', ('confirmed', 'paid'))]}"
+ invisible="state in ('confirmed', 'paid')"
icon="fa-minus"
/>
@@ -101,11 +103,11 @@
-
+
-
+
-
+
-
+