Skip to content

Commit 42bba6a

Browse files
committed
[MIG] l10n_it_central_journal_reportlab: Migration to 19.0
1 parent 71ed5d4 commit 42bba6a

6 files changed

Lines changed: 129 additions & 73 deletions

File tree

l10n_it_central_journal_reportlab/README.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ ITA - Libro giornale - Reportlab
2121
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
2222
:alt: License: AGPL-3
2323
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github
24-
:target: https://github.com/OCA/l10n-italy/tree/18.0/l10n_it_central_journal_reportlab
24+
:target: https://github.com/OCA/l10n-italy/tree/19.0/l10n_it_central_journal_reportlab
2525
:alt: OCA/l10n-italy
2626
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27-
:target: https://translation.odoo-community.org/projects/l10n-italy-18-0/l10n-italy-18-0-l10n_it_central_journal_reportlab
27+
:target: https://translation.odoo-community.org/projects/l10n-italy-19-0/l10n-italy-19-0-l10n_it_central_journal_reportlab
2828
:alt: Translate me on Weblate
2929
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
30-
:target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-italy&target_branch=18.0
30+
:target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-italy&target_branch=19.0
3131
:alt: Try me on Runboat
3232

3333
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -51,7 +51,7 @@ Bug Tracker
5151
Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-italy/issues>`_.
5252
In case of trouble, please check there if your issue has already been reported.
5353
If you spotted it first, help us to smash it by providing a detailed and welcomed
54-
`feedback <https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_central_journal_reportlab%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
54+
`feedback <https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_central_journal_reportlab%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
5555

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

@@ -66,13 +66,13 @@ Authors
6666
Contributors
6767
------------
6868

69-
- Gianmarco Conte <gconte@dinamicheaziendali.it>
70-
- Lara Baggio <lbaggio@linkgroup.it>
71-
- Glauco Prina <gprina@linkgroup.it>
72-
- Giuseppe Borruso <gborruso@dinamicheaziendali.it>
73-
- `Aion Tech <https://aiontech.company/>`__:
69+
- Gianmarco Conte <gconte@dinamicheaziendali.it>
70+
- Lara Baggio <lbaggio@linkgroup.it>
71+
- Glauco Prina <gprina@linkgroup.it>
72+
- Giuseppe Borruso <gborruso@dinamicheaziendali.it>
73+
- `Aion Tech <https://aiontech.company/>`__:
7474

75-
- Simone Rubino <simone.rubino@aion-tech.it>
75+
- Simone Rubino <simone.rubino@aion-tech.it>
7676

7777
Maintainers
7878
-----------
@@ -98,6 +98,6 @@ Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
9898

9999
|maintainer-MarcoCalcagni| |maintainer-Borruso|
100100

101-
This module is part of the `OCA/l10n-italy <https://github.com/OCA/l10n-italy/tree/18.0/l10n_it_central_journal_reportlab>`_ project on GitHub.
101+
This module is part of the `OCA/l10n-italy <https://github.com/OCA/l10n-italy/tree/19.0/l10n_it_central_journal_reportlab>`_ project on GitHub.
102102

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

l10n_it_central_journal_reportlab/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
{
55
"name": "ITA - Libro giornale - Reportlab",
6-
"version": "18.0.1.2.0",
6+
"version": "19.0.1.0.0",
77
"development_status": "Beta",
88
"category": "Localization/Italy",
99
"author": "Gianmarco Conte - Dinamiche Aziendali srl, "

l10n_it_central_journal_reportlab/static/description/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ <h1>ITA - Libro giornale - Reportlab</h1>
374374
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375375
!! source digest: sha256:bd14a78a89961799ba3394d7ff409df15327e8d809335bbe84fa92b7e63ccd80
376376
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377-
<p><a class="reference external image-reference" 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 image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-italy/tree/18.0/l10n_it_central_journal_reportlab"><img alt="OCA/l10n-italy" src="https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/l10n-italy-18-0/l10n-italy-18-0-l10n_it_central_journal_reportlab"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/l10n-italy&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
377+
<p><a class="reference external image-reference" 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 image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-italy/tree/19.0/l10n_it_central_journal_reportlab"><img alt="OCA/l10n-italy" src="https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/l10n-italy-19-0/l10n-italy-19-0-l10n_it_central_journal_reportlab"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/l10n-italy&amp;target_branch=19.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
378378
<p><strong>Italiano</strong></p>
379379
<p>Modulo per la stampa del libro giornale con reportlab</p>
380380
<p><strong>English</strong></p>
@@ -396,7 +396,7 @@ <h2><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h2>
396396
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/l10n-italy/issues">GitHub Issues</a>.
397397
In case of trouble, please check there if your issue has already been reported.
398398
If you spotted it first, help us to smash it by providing a detailed and welcomed
399-
<a class="reference external" href="https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_central_journal_reportlab%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
399+
<a class="reference external" href="https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_central_journal_reportlab%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
400400
<p>Do not contact contributors directly about support or help with technical issues.</p>
401401
</div>
402402
<div class="section" id="credits">
@@ -431,7 +431,7 @@ <h3><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h3>
431431
promote its widespread use.</p>
432432
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
433433
<p><a class="reference external image-reference" href="https://github.com/MarcoCalcagni"><img alt="MarcoCalcagni" src="https://github.com/MarcoCalcagni.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/Borruso"><img alt="Borruso" src="https://github.com/Borruso.png?size=40px" /></a></p>
434-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-italy/tree/18.0/l10n_it_central_journal_reportlab">OCA/l10n-italy</a> project on GitHub.</p>
434+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-italy/tree/19.0/l10n_it_central_journal_reportlab">OCA/l10n-italy</a> project on GitHub.</p>
435435
<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>
436436
</div>
437437
</div>

l10n_it_central_journal_reportlab/tests/test_central_journal_reportlab.py

Lines changed: 50 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,36 @@
88

99
from dateutil.rrule import MONTHLY
1010

11-
from odoo.tests import Form
12-
from odoo.tests.common import TransactionCase
11+
from odoo.tests import Form, tagged
1312
from odoo.tools import pdf
1413

14+
from odoo.addons.account.tests.common import AccountTestInvoicingCommon
1515

16-
class TestCentralJournalReportlab(TransactionCase):
16+
17+
@tagged("post_install", "-at_install")
18+
class TestCentralJournalReportlab(AccountTestInvoicingCommon):
1719
def setUp(self):
1820
super().setUp()
1921

2022
self.today = datetime.now()
21-
self.range_type = self.env["date.range.type"].create({"name": "Fiscal year"})
23+
self.data_it_company = self.setup_other_company(
24+
name="IT Company2",
25+
vat="IT01234560157",
26+
phone="0266766700",
27+
email="test@test.it",
28+
street="1234 Test Street",
29+
zip="12345",
30+
city="Prova",
31+
)
32+
self.it_company = self.data_it_company["company"]
33+
self.env.user.company_ids |= self.it_company
34+
self.env.user.company_id = self.it_company
35+
# Now that current user can access the company,
36+
# log the user *only* in this company so that
37+
# searching, reading and other operations behave as expected
38+
self.env.user.company_ids = self.it_company
39+
40+
self.range_type = self.env["date.range.type"].create({"name": "Fiscal Year"})
2241
self.env["date.range.generator"].create(
2342
{
2443
"date_start": f"{self.today.year}-01-01",
@@ -33,14 +52,39 @@ def setUp(self):
3352
[
3453
("date_start", "<=", self.today.date()),
3554
("date_end", ">=", self.today.date()),
36-
]
55+
],
56+
limit=1,
3757
)
3858
self.wizard_model = self.env["wizard.giornale.reportlab"]
3959
self.report_model = self.env["ir.actions.report"]
4060
self.report_name = "central_journal_reportlab.report_giornale_reportlab"
4161
self.journals = self.env["account.journal"].search([])
62+
self.partner = self.env["res.partner"].create(
63+
{
64+
"name": "Wood Corner",
65+
"is_company": True,
66+
"street": "1839 Arbor Way",
67+
"city": "Turlock",
68+
"state_id": self.env.ref("base.state_us_5").id,
69+
"zip": "95380",
70+
"email": "wood.corner26@example.com",
71+
"phone": "(623)-853-7197",
72+
"vat": "US12345672",
73+
}
74+
)
4275

4376
def test_wizard_reportlab(self):
77+
out_invoice = Form(
78+
self.env["account.move"].with_context(default_move_type="out_invoice")
79+
)
80+
out_invoice.partner_id = self.partner
81+
out_invoice.invoice_date = self.today
82+
with out_invoice.invoice_line_ids.new() as line:
83+
line.name = "Test line"
84+
line.price_unit = 100
85+
out_invoice = out_invoice.save()
86+
out_invoice.action_post()
87+
4488
wizard_form = Form(self.wizard_model)
4589
wizard_form.daterange_id = self.current_period
4690
wizard = wizard_form.save()
@@ -68,7 +112,7 @@ def test_grouped_move_line_no_account(self):
68112
out_invoice = Form(
69113
self.env["account.move"].with_context(default_move_type="out_invoice")
70114
)
71-
out_invoice.partner_id = self.env.ref("base.res_partner_1")
115+
out_invoice.partner_id = self.partner
72116
out_invoice.invoice_date = self.today
73117
with out_invoice.invoice_line_ids.new() as note_line:
74118
note_line.display_type = "line_note"

0 commit comments

Comments
 (0)