Skip to content

Commit

Permalink
[MIG] l10n_it_vat_statement_split_payment: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Borruso committed Oct 3, 2023
1 parent 5c1fc4f commit 88e08e9
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 40 deletions.
14 changes: 7 additions & 7 deletions l10n_it_vat_statement_split_payment/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ ITA - Liquidazione IVA + Scissione dei pagamenti
: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/14.0/l10n_it_vat_statement_split_payment
:target: https://github.com/OCA/l10n-italy/tree/16.0/l10n_it_vat_statement_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-14-0/l10n-italy-14-0-l10n_it_vat_statement_split_payment
:target: https://translation.odoo-community.org/projects/l10n-italy-16-0/l10n-italy-16-0-l10n_it_vat_statement_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/14.0
:alt: Try me on Runbot
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/l10n-italy&target_branch=16.0
:alt: Try me on Runboat

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

Expand Down Expand Up @@ -78,7 +78,7 @@ 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_statement_split_payment%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_vat_statement_split_payment%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.

Expand Down Expand Up @@ -123,6 +123,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 <https://github.com/OCA/l10n-italy/tree/14.0/l10n_it_vat_statement_split_payment>`_ project on GitHub.
This module is part of the `OCA/l10n-italy <https://github.com/OCA/l10n-italy/tree/16.0/l10n_it_vat_statement_split_payment>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 1 addition & 1 deletion l10n_it_vat_statement_split_payment/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"name": "ITA - Liquidazione IVA + Scissione dei pagamenti",
"summary": "Migliora la liquidazione dell'IVA tenendo in"
" considerazione la scissione dei pagamenti",
"version": "14.0.1.0.2",
"version": "16.0.1.0.0",
"development_status": "Beta",
"category": "Accounting & Finance",
"website": "https://github.com/OCA/l10n-italy",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
<title>ITA - Liquidazione IVA + Scissione dei pagamenti</title>
<style type="text/css">

Expand Down Expand Up @@ -367,7 +367,7 @@ <h1 class="title">ITA - Liquidazione IVA + Scissione dei pagamenti</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/l10n-italy/tree/14.0/l10n_it_vat_statement_split_payment"><img alt="OCA/l10n-italy" src="https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/l10n-italy-14-0/l10n-italy-14-0-l10n_it_vat_statement_split_payment"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/122/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/l10n-italy/tree/16.0/l10n_it_vat_statement_split_payment"><img alt="OCA/l10n-italy" src="https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/l10n-italy-16-0/l10n-italy-16-0-l10n_it_vat_statement_split_payment"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runboat.odoo-community.org/webui/builds.html?repo=OCA/l10n-italy&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><strong>Italiano</strong></p>
<p>Modulo per considerare l’IVA della scissione dei pagamenti in fase di
liquidazione dell’IVA.
Expand Down Expand Up @@ -418,7 +418,7 @@ <h1><a class="toc-backref" href="#id3">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/l10n-italy/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_vat_statement_split_payment%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_vat_statement_split_payment%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand Down Expand Up @@ -457,7 +457,7 @@ <h2><a class="toc-backref" href="#id8">Maintainers</a></h2>
<p>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.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-italy/tree/14.0/l10n_it_vat_statement_split_payment">OCA/l10n-italy</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-italy/tree/16.0/l10n_it_vat_statement_split_payment">OCA/l10n-italy</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ def setUpClass(cls, chart_template_ref=None):
cls.account_model = cls.env["account.account"]
cls.term_line_model = cls.env["account.payment.term.line"]
cls.vat_statement_model = cls.env["account.vat.period.end.statement"]
account_user_type = cls.env.ref("account.data_account_type_receivable")
today = datetime.now().date()

cls.range_type = cls.env["date.range.type"].create(
Expand All @@ -50,9 +49,9 @@ def setUpClass(cls, chart_template_ref=None):
.search(
[
(
"user_type_id",
"account_type",
"=",
cls.env.ref("account.data_account_type_current_assets").id,
"asset_current",
)
],
limit=1,
Expand All @@ -64,9 +63,9 @@ def setUpClass(cls, chart_template_ref=None):
.search(
[
(
"user_type_id",
"account_type",
"=",
cls.env.ref("account.data_account_type_current_liabilities").id,
"liability_current",
)
],
limit=1,
Expand Down Expand Up @@ -129,37 +128,37 @@ def setUpClass(cls, chart_template_ref=None):
cls.company.sp_account_id = cls.env["account.account"].search(
[
(
"user_type_id",
"account_type",
"=",
cls.env.ref("account.data_account_type_current_assets").id,
"asset_current",
)
],
limit=1,
)
cls.a_recv = cls.account_model.create(
dict(
code="cust_acc",
code="cust.acc",
name="customer account",
user_type_id=account_user_type.id,
account_type="asset_receivable",
reconcile=True,
)
)
cls.a_sale = cls.env["account.account"].search(
[
(
"user_type_id",
"account_type",
"=",
cls.env.ref("account.data_account_type_revenue").id,
"income",
)
],
limit=1,
)
cls.vat_authority = cls.account_model.create(
{
"code": "VAT AUTH",
"code": "VAT.AUTH",
"name": "VAT Authority",
"reconcile": True,
"user_type_id": cls.env.ref("account.data_account_type_payable").id,
"account_type": "liability_payable",
}
)

Expand All @@ -173,7 +172,6 @@ def setUpClass(cls, chart_template_ref=None):
{
"value": "balance",
"days": 16,
"option": "after_invoice_month",
"payment_id": cls.account_payment_term.id,
}
)
Expand All @@ -188,7 +186,6 @@ def setUpClass(cls, chart_template_ref=None):
"value": "percent",
"value_amount": 50,
"days": 15,
"sequence": 1,
},
),
(
Expand All @@ -197,7 +194,6 @@ def setUpClass(cls, chart_template_ref=None):
{
"value": "balance",
"days": 30,
"sequence": 2,
},
),
],
Expand Down Expand Up @@ -252,17 +248,6 @@ def test_invoice(self):
self.assertEqual(self.vat_statement.generic_vat_account_line_ids.amount, 22.0)

def test_account_sp_company(self):
account_user_type = self.env.ref("account.data_account_type_receivable")
account_sp = self.account_model.create(
dict(
code="split_payment_acc",
name="Split payment account",
user_type_id=account_user_type.id,
reconcile=True,
)
)
self.company.sp_account_id = account_sp.id

invoice = self.move_model.with_context(default_move_type="out_invoice").create(
{
"invoice_date": self.recent_date,
Expand Down Expand Up @@ -296,5 +281,6 @@ def test_account_sp_company(self):
self.current_period.vat_statement_id = self.vat_statement
self.vat_statement.compute_amounts()
self.assertEqual(
self.vat_statement.generic_vat_account_line_ids.account_id.id, account_sp.id
self.vat_statement.generic_vat_account_line_ids.account_id.id,
self.company.sp_account_id.id,
)

0 comments on commit 88e08e9

Please sign in to comment.