odoo-addon-l10n-it-account-stamp 16.0.1.1.0__py3-none-any.whl → 18.0.1.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of odoo-addon-l10n-it-account-stamp might be problematic. Click here for more details.
- odoo/addons/l10n_it_account_stamp/README.rst +69 -43
- odoo/addons/l10n_it_account_stamp/__manifest__.py +2 -2
- odoo/addons/l10n_it_account_stamp/data/data.xml +5 -7
- odoo/addons/l10n_it_account_stamp/i18n/it.po +108 -143
- odoo/addons/l10n_it_account_stamp/i18n/l10n_it_account_stamp.pot +68 -95
- odoo/addons/l10n_it_account_stamp/migrations/18.0.1.0.0/noupdate_changes.xml +12 -0
- odoo/addons/l10n_it_account_stamp/migrations/18.0.1.0.0/post-migration.py +14 -0
- odoo/addons/l10n_it_account_stamp/migrations/18.0.1.0.0/pre-migration.py +77 -0
- odoo/addons/l10n_it_account_stamp/migrations/18.0.1.1.0/post-migration.py +17 -0
- odoo/addons/l10n_it_account_stamp/models/account_move.py +82 -46
- odoo/addons/l10n_it_account_stamp/models/company.py +8 -8
- odoo/addons/l10n_it_account_stamp/models/product.py +22 -11
- odoo/addons/l10n_it_account_stamp/readme/CONFIGURE.md +5 -5
- odoo/addons/l10n_it_account_stamp/readme/CONTRIBUTORS.md +1 -0
- odoo/addons/l10n_it_account_stamp/readme/DESCRIPTION.md +4 -3
- odoo/addons/l10n_it_account_stamp/readme/ROADMAP.md +7 -0
- odoo/addons/l10n_it_account_stamp/readme/USAGE.md +3 -3
- odoo/addons/l10n_it_account_stamp/static/description/index.html +57 -33
- odoo/addons/l10n_it_account_stamp/tests/test_account_stamp_invoicing.py +115 -27
- odoo/addons/l10n_it_account_stamp/views/account_move_report.xml +8 -6
- odoo/addons/l10n_it_account_stamp/views/account_move_view.xml +26 -18
- odoo/addons/l10n_it_account_stamp/views/company_view.xml +8 -33
- odoo/addons/l10n_it_account_stamp/views/product_view.xml +12 -16
- {odoo_addon_l10n_it_account_stamp-16.0.1.1.0.dist-info → odoo_addon_l10n_it_account_stamp-18.0.1.2.0.dist-info}/METADATA +73 -46
- odoo_addon_l10n_it_account_stamp-18.0.1.2.0.dist-info/RECORD +31 -0
- {odoo_addon_l10n_it_account_stamp-16.0.1.1.0.dist-info → odoo_addon_l10n_it_account_stamp-18.0.1.2.0.dist-info}/WHEEL +1 -1
- odoo_addon_l10n_it_account_stamp-16.0.1.1.0.dist-info/RECORD +0 -26
- {odoo_addon_l10n_it_account_stamp-16.0.1.1.0.dist-info → odoo_addon_l10n_it_account_stamp-18.0.1.2.0.dist-info}/top_level.txt +0 -0
|
@@ -6,19 +6,19 @@ from odoo import fields, models
|
|
|
6
6
|
class ResCompany(models.Model):
|
|
7
7
|
_inherit = "res.company"
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
"product.product",
|
|
11
|
-
"
|
|
12
|
-
help="Product used as
|
|
9
|
+
l10n_it_account_stamp_stamp_duty_product_id = fields.Many2one(
|
|
10
|
+
comodel_name="product.product",
|
|
11
|
+
string="Stamp Duty Product",
|
|
12
|
+
help="Product used as stamp duty in customer invoices.",
|
|
13
13
|
)
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
class AccountConfigSettings(models.TransientModel):
|
|
17
17
|
_inherit = "res.config.settings"
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
related="company_id.
|
|
21
|
-
string="
|
|
22
|
-
help="Product used as
|
|
19
|
+
l10n_it_account_stamp_stamp_duty_product_id = fields.Many2one(
|
|
20
|
+
related="company_id.l10n_it_account_stamp_stamp_duty_product_id",
|
|
21
|
+
string="Stamp Duty Product",
|
|
22
|
+
help="Product used as stamp duty in customer invoices.",
|
|
23
23
|
readonly=False,
|
|
24
24
|
)
|
|
@@ -6,24 +6,35 @@ from odoo import _, api, exceptions, fields, models
|
|
|
6
6
|
class ProductTemplate(models.Model):
|
|
7
7
|
_inherit = "product.template"
|
|
8
8
|
|
|
9
|
-
@api.constrains(
|
|
9
|
+
@api.constrains(
|
|
10
|
+
"l10n_it_account_stamp_stamp_duty_apply_tax_ids",
|
|
11
|
+
"l10n_it_account_stamp_is_stamp",
|
|
12
|
+
)
|
|
10
13
|
def _check_stamp_apply_tax(self):
|
|
11
14
|
for template in self:
|
|
12
|
-
if
|
|
15
|
+
if (
|
|
16
|
+
template.l10n_it_account_stamp_stamp_duty_apply_tax_ids
|
|
17
|
+
and not template.l10n_it_account_stamp_is_stamp
|
|
18
|
+
):
|
|
13
19
|
raise exceptions.ValidationError(
|
|
14
20
|
_("The product %s must be a stamp to apply set taxes!")
|
|
15
21
|
% template.name
|
|
16
22
|
)
|
|
17
23
|
|
|
18
|
-
|
|
19
|
-
"account.tax",
|
|
20
|
-
"
|
|
21
|
-
"product_id",
|
|
22
|
-
"tax_id",
|
|
24
|
+
l10n_it_account_stamp_stamp_duty_apply_tax_ids = fields.Many2many(
|
|
25
|
+
comodel_name="account.tax",
|
|
26
|
+
relation="l10n_it_account_stamp_product_tax_account_tax_rel",
|
|
27
|
+
column1="product_id",
|
|
28
|
+
column2="tax_id",
|
|
23
29
|
string="Stamp taxes",
|
|
24
30
|
)
|
|
25
|
-
|
|
26
|
-
"Stamp applicability min total base",
|
|
31
|
+
l10n_it_account_stamp_tax_apply_min_total_base = fields.Float(
|
|
32
|
+
string="Stamp applicability min total base",
|
|
33
|
+
digits="Account",
|
|
34
|
+
)
|
|
35
|
+
l10n_it_account_stamp_is_stamp = fields.Boolean(
|
|
36
|
+
string="Is a stamp",
|
|
37
|
+
)
|
|
38
|
+
l10n_it_account_stamp_auto_compute = fields.Boolean(
|
|
39
|
+
string="Auto-compute",
|
|
27
40
|
)
|
|
28
|
-
is_stamp = fields.Boolean("Is a stamp")
|
|
29
|
-
auto_compute = fields.Boolean("Auto-compute")
|
|
@@ -11,7 +11,7 @@ necessario abilitare le funzioni complete per la contabilità:
|
|
|
11
11
|
Modalità automatica:
|
|
12
12
|
|
|
13
13
|
- andare sul prodotto "Imposta di bollo 2 euro" e configurare "Imposte
|
|
14
|
-
|
|
14
|
+
per bollo" (Imposte in esenzione).
|
|
15
15
|
- per ciascuna fattura o ricevuta, l'applicabilità dell'imposta di bollo
|
|
16
16
|
verrà calcolata in modo automatico in base alla somma degli imponibili
|
|
17
17
|
relativi alle imposte selezionate.
|
|
@@ -30,7 +30,7 @@ generalmente ricavo="Debiti per bolli" e costo="Valori bollati".
|
|
|
30
30
|
|
|
31
31
|
**English**
|
|
32
32
|
|
|
33
|
-
In order to change
|
|
33
|
+
In order to change 'Stamp duty 2 euro' product settings, enable full
|
|
34
34
|
accounting features:
|
|
35
35
|
|
|
36
36
|
1. Settings -\> Users & Companies -\> Groups
|
|
@@ -39,7 +39,7 @@ accounting features:
|
|
|
39
39
|
|
|
40
40
|
Automatic mode:
|
|
41
41
|
|
|
42
|
-
- Go to '
|
|
42
|
+
- Go to 'Stamp duty 2 euro' product and configure 'Stamp taxes'
|
|
43
43
|
(exemption taxes).
|
|
44
44
|
- For each invoice or receipt, the base amount for each selected tax
|
|
45
45
|
will be added up and used to determine the application of the account
|
|
@@ -47,8 +47,8 @@ Automatic mode:
|
|
|
47
47
|
|
|
48
48
|
Manual mode:
|
|
49
49
|
|
|
50
|
-
- Go to '
|
|
51
|
-
- For each invoice or receipt, manually enable '
|
|
50
|
+
- Go to 'Stamp duty 2 euro' product and deselect 'Auto-compute' checkbox.
|
|
51
|
+
- For each invoice or receipt, manually enable 'Stamp Duty' checkbox.
|
|
52
52
|
|
|
53
53
|
Also set income/expense accounts, typically income = 'Debiti per bolli'
|
|
54
54
|
and expense = 'Valori bollati'.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
**Italiano**
|
|
2
2
|
|
|
3
|
-
Questo modulo
|
|
4
|
-
|
|
3
|
+
Questo modulo permette di calcolare automaticamente ed addebitare al cliente l'imposta di bollo italiana nelle fatture e nelle ricevute mantenendo la sincronizzazione con il campo "Dati Bollo" (`l10n_it_stamp_duty`) di `l10n_it_edi`.
|
|
4
|
+
In questo modo l'elemento XML `<DatiBollo>` verrà valorizzato correttamente.
|
|
5
5
|
|
|
6
6
|
**English**
|
|
7
7
|
|
|
8
|
-
This module
|
|
8
|
+
This module allows to automatically compute and charge the Italian stamp duty to customers in invoices and receipts while maintaining synchronization with the "Stamp Duty Data" field (`l10n_it_stamp_duty`) of `l10n_it_edi`.
|
|
9
|
+
In this way XML tag `<DatiBollo>` will be correctly set.
|
|
@@ -9,8 +9,8 @@ verrà addebitata al cliente.
|
|
|
9
9
|
|
|
10
10
|
**English**
|
|
11
11
|
|
|
12
|
-
In invoice or receipt form, when applicable, click 'Add
|
|
13
|
-
button to add
|
|
12
|
+
In invoice or receipt form, when applicable, click 'Add stamp duty line'
|
|
13
|
+
button to add stamp duty as invoice line, thus charging customer.
|
|
14
14
|
|
|
15
|
-
Otherwise,
|
|
15
|
+
Otherwise, stamp duty will be anyway accounted, without charging
|
|
16
16
|
customer.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
5
5
|
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
|
|
6
|
-
<title>
|
|
6
|
+
<title>README.rst</title>
|
|
7
7
|
<style type="text/css">
|
|
8
8
|
|
|
9
9
|
/*
|
|
@@ -360,37 +360,50 @@ ul.auto-toc {
|
|
|
360
360
|
</style>
|
|
361
361
|
</head>
|
|
362
362
|
<body>
|
|
363
|
-
<div class="document"
|
|
364
|
-
<h1 class="title">ITA - Imposta di bollo</h1>
|
|
363
|
+
<div class="document">
|
|
365
364
|
|
|
365
|
+
|
|
366
|
+
<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
|
|
367
|
+
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
|
|
368
|
+
</a>
|
|
369
|
+
<div class="section" id="ita-imposta-di-bollo">
|
|
370
|
+
<h1>ITA - Imposta di bollo</h1>
|
|
366
371
|
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
367
372
|
!! This file is generated by oca-gen-addon-readme !!
|
|
368
373
|
!! changes will be overwritten. !!
|
|
369
374
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
370
|
-
!! source digest: sha256:
|
|
375
|
+
!! source digest: sha256:d29741720c8c8b6a1ad2db28a9979cf34a4cf2868852f58103fe19eaf7c4bd74
|
|
371
376
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
|
372
|
-
<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/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/
|
|
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/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/license-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-italy/tree/18.0/l10n_it_account_stamp"><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_account_stamp"><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&target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
|
373
378
|
<p><strong>Italiano</strong></p>
|
|
374
|
-
<p>Questo modulo
|
|
375
|
-
fatture e nelle ricevute
|
|
379
|
+
<p>Questo modulo permette di calcolare automaticamente ed addebitare al
|
|
380
|
+
cliente l’imposta di bollo italiana nelle fatture e nelle ricevute
|
|
381
|
+
mantenendo la sincronizzazione con il campo “Dati Bollo”
|
|
382
|
+
(<tt class="docutils literal">l10n_it_stamp_duty</tt>) di <tt class="docutils literal">l10n_it_edi</tt>. In questo modo l’elemento
|
|
383
|
+
XML <tt class="docutils literal"><DatiBollo></tt> verrà valorizzato correttamente.</p>
|
|
376
384
|
<p><strong>English</strong></p>
|
|
377
|
-
<p>This module
|
|
385
|
+
<p>This module allows to automatically compute and charge the Italian stamp
|
|
386
|
+
duty to customers in invoices and receipts while maintaining
|
|
387
|
+
synchronization with the “Stamp Duty Data” field
|
|
388
|
+
(<tt class="docutils literal">l10n_it_stamp_duty</tt>) of <tt class="docutils literal">l10n_it_edi</tt>. In this way XML tag
|
|
389
|
+
<tt class="docutils literal"><DatiBollo></tt> will be correctly set.</p>
|
|
378
390
|
<p><strong>Table of contents</strong></p>
|
|
379
391
|
<div class="contents local topic" id="contents">
|
|
380
392
|
<ul class="simple">
|
|
381
393
|
<li><a class="reference internal" href="#configuration" id="toc-entry-1">Configuration</a></li>
|
|
382
394
|
<li><a class="reference internal" href="#usage" id="toc-entry-2">Usage</a></li>
|
|
383
|
-
<li><a class="reference internal" href="#
|
|
384
|
-
<li><a class="reference internal" href="#
|
|
385
|
-
<li><a class="reference internal" href="#
|
|
386
|
-
<li><a class="reference internal" href="#
|
|
387
|
-
<li><a class="reference internal" href="#
|
|
395
|
+
<li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-3">Known issues / Roadmap</a></li>
|
|
396
|
+
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-4">Bug Tracker</a></li>
|
|
397
|
+
<li><a class="reference internal" href="#credits" id="toc-entry-5">Credits</a><ul>
|
|
398
|
+
<li><a class="reference internal" href="#authors" id="toc-entry-6">Authors</a></li>
|
|
399
|
+
<li><a class="reference internal" href="#contributors" id="toc-entry-7">Contributors</a></li>
|
|
400
|
+
<li><a class="reference internal" href="#maintainers" id="toc-entry-8">Maintainers</a></li>
|
|
388
401
|
</ul>
|
|
389
402
|
</li>
|
|
390
403
|
</ul>
|
|
391
404
|
</div>
|
|
392
405
|
<div class="section" id="configuration">
|
|
393
|
-
<
|
|
406
|
+
<h2><a class="toc-backref" href="#toc-entry-1">Configuration</a></h2>
|
|
394
407
|
<p><strong>Italiano</strong></p>
|
|
395
408
|
<p>Per modificare le impostazioni sul prodotto “Imposta di bollo 2 euro” è
|
|
396
409
|
necessario abilitare le funzioni complete per la contabilità:</p>
|
|
@@ -403,10 +416,10 @@ selezionarlo</li>
|
|
|
403
416
|
<p>Modalità automatica:</p>
|
|
404
417
|
<ul class="simple">
|
|
405
418
|
<li>andare sul prodotto “Imposta di bollo 2 euro” e configurare “Imposte
|
|
406
|
-
|
|
407
|
-
<li>per ciascuna fattura o ricevuta, l’applicabilità dell’imposta di
|
|
408
|
-
|
|
409
|
-
|
|
419
|
+
per bollo” (Imposte in esenzione).</li>
|
|
420
|
+
<li>per ciascuna fattura o ricevuta, l’applicabilità dell’imposta di bollo
|
|
421
|
+
verrà calcolata in modo automatico in base alla somma degli imponibili
|
|
422
|
+
relativi alle imposte selezionate.</li>
|
|
410
423
|
</ul>
|
|
411
424
|
<p>Modalità manuale:</p>
|
|
412
425
|
<ul class="simple">
|
|
@@ -420,7 +433,7 @@ imposte selezionate.</li>
|
|
|
420
433
|
<p>Impostare i conti di ricavo/costo nella scheda “Contabilità”,
|
|
421
434
|
generalmente ricavo=”Debiti per bolli” e costo=”Valori bollati”.</p>
|
|
422
435
|
<p><strong>English</strong></p>
|
|
423
|
-
<p>In order to change
|
|
436
|
+
<p>In order to change ‘Stamp duty 2 euro’ product settings, enable full
|
|
424
437
|
accounting features:</p>
|
|
425
438
|
<ol class="arabic simple">
|
|
426
439
|
<li>Settings -> Users & Companies -> Groups</li>
|
|
@@ -429,7 +442,7 @@ accounting features:</p>
|
|
|
429
442
|
</ol>
|
|
430
443
|
<p>Automatic mode:</p>
|
|
431
444
|
<ul class="simple">
|
|
432
|
-
<li>Go to ‘
|
|
445
|
+
<li>Go to ‘Stamp duty 2 euro’ product and configure ‘Stamp taxes’
|
|
433
446
|
(exemption taxes).</li>
|
|
434
447
|
<li>For each invoice or receipt, the base amount for each selected tax
|
|
435
448
|
will be added up and used to determine the application of the account
|
|
@@ -437,15 +450,15 @@ stamp.</li>
|
|
|
437
450
|
</ul>
|
|
438
451
|
<p>Manual mode:</p>
|
|
439
452
|
<ul class="simple">
|
|
440
|
-
<li>Go to ‘
|
|
453
|
+
<li>Go to ‘Stamp duty 2 euro’ product and deselect ‘Auto-compute’
|
|
441
454
|
checkbox.</li>
|
|
442
|
-
<li>For each invoice or receipt, manually enable ‘
|
|
455
|
+
<li>For each invoice or receipt, manually enable ‘Stamp Duty’ checkbox.</li>
|
|
443
456
|
</ul>
|
|
444
457
|
<p>Also set income/expense accounts, typically income = ‘Debiti per bolli’
|
|
445
458
|
and expense = ‘Valori bollati’.</p>
|
|
446
459
|
</div>
|
|
447
460
|
<div class="section" id="usage">
|
|
448
|
-
<
|
|
461
|
+
<h2><a class="toc-backref" href="#toc-entry-2">Usage</a></h2>
|
|
449
462
|
<p><strong>Italiano</strong></p>
|
|
450
463
|
<p>Se nella fattura o ricevuta è previsto l’addebito dell’imposta di bollo
|
|
451
464
|
al cliente, fare clic sul pulsante “Aggiungi riga bollo” per aggiungere
|
|
@@ -453,23 +466,32 @@ una riga relativa all’imposta di bollo.</p>
|
|
|
453
466
|
<p>In caso contrario, l’imposta di bollo verrà comunque considerata ma non
|
|
454
467
|
verrà addebitata al cliente.</p>
|
|
455
468
|
<p><strong>English</strong></p>
|
|
456
|
-
<p>In invoice or receipt form, when applicable, click ‘Add
|
|
457
|
-
button to add
|
|
458
|
-
<p>Otherwise,
|
|
469
|
+
<p>In invoice or receipt form, when applicable, click ‘Add stamp duty line’
|
|
470
|
+
button to add stamp duty as invoice line, thus charging customer.</p>
|
|
471
|
+
<p>Otherwise, stamp duty will be anyway accounted, without charging
|
|
459
472
|
customer.</p>
|
|
460
473
|
</div>
|
|
474
|
+
<div class="section" id="known-issues-roadmap">
|
|
475
|
+
<h2><a class="toc-backref" href="#toc-entry-3">Known issues / Roadmap</a></h2>
|
|
476
|
+
<p>** Italiano **</p>
|
|
477
|
+
<p>Sono stati aggiunti gli script di migrazione, da provare quando saranno
|
|
478
|
+
rilasciati quelli relativi ad <tt class="docutils literal">account</tt>.</p>
|
|
479
|
+
<p>** English **</p>
|
|
480
|
+
<p>Migration scripts have been added, to be tested when <tt class="docutils literal">account</tt> related
|
|
481
|
+
ones will be released.</p>
|
|
482
|
+
</div>
|
|
461
483
|
<div class="section" id="bug-tracker">
|
|
462
|
-
<
|
|
484
|
+
<h2><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h2>
|
|
463
485
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/l10n-italy/issues">GitHub Issues</a>.
|
|
464
486
|
In case of trouble, please check there if your issue has already been reported.
|
|
465
487
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
466
|
-
<a class="reference external" href="https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_account_stamp%0Aversion:%
|
|
488
|
+
<a class="reference external" href="https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_account_stamp%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
|
467
489
|
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
|
468
490
|
</div>
|
|
469
491
|
<div class="section" id="credits">
|
|
470
|
-
<
|
|
492
|
+
<h2><a class="toc-backref" href="#toc-entry-5">Credits</a></h2>
|
|
471
493
|
<div class="section" id="authors">
|
|
472
|
-
<
|
|
494
|
+
<h3><a class="toc-backref" href="#toc-entry-6">Authors</a></h3>
|
|
473
495
|
<ul class="simple">
|
|
474
496
|
<li>Ermanno Gnan</li>
|
|
475
497
|
<li>Sergio Corato</li>
|
|
@@ -477,7 +499,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
|
477
499
|
</ul>
|
|
478
500
|
</div>
|
|
479
501
|
<div class="section" id="contributors">
|
|
480
|
-
<
|
|
502
|
+
<h3><a class="toc-backref" href="#toc-entry-7">Contributors</a></h3>
|
|
481
503
|
<ul class="simple">
|
|
482
504
|
<li>Lorenzo Battistini <<a class="reference external" href="https://github.com/eLBati">https://github.com/eLBati</a>></li>
|
|
483
505
|
<li>Sergio Corato</li>
|
|
@@ -491,10 +513,11 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
|
491
513
|
<li>Simone Rubino <<a class="reference external" href="mailto:simone.rubino@aion-tech.it">simone.rubino@aion-tech.it</a>></li>
|
|
492
514
|
</ul>
|
|
493
515
|
</li>
|
|
516
|
+
<li><a class="reference external" href="https://www.nextev.it">Nextev Srl</a></li>
|
|
494
517
|
</ul>
|
|
495
518
|
</div>
|
|
496
519
|
<div class="section" id="maintainers">
|
|
497
|
-
<
|
|
520
|
+
<h3><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h3>
|
|
498
521
|
<p>This module is maintained by the OCA.</p>
|
|
499
522
|
<a class="reference external image-reference" href="https://odoo-community.org">
|
|
500
523
|
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
|
|
@@ -502,10 +525,11 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
|
502
525
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
503
526
|
mission is to support the collaborative development of Odoo features and
|
|
504
527
|
promote its widespread use.</p>
|
|
505
|
-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-italy/tree/
|
|
528
|
+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-italy/tree/18.0/l10n_it_account_stamp">OCA/l10n-italy</a> project on GitHub.</p>
|
|
506
529
|
<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>
|
|
507
530
|
</div>
|
|
508
531
|
</div>
|
|
509
532
|
</div>
|
|
533
|
+
</div>
|
|
510
534
|
</body>
|
|
511
535
|
</html>
|
|
@@ -18,7 +18,7 @@ class InvoicingTest(TestAccountInvoiceReport):
|
|
|
18
18
|
|
|
19
19
|
account_revenue_id = self.env["account.account"].search(
|
|
20
20
|
[
|
|
21
|
-
("
|
|
21
|
+
("company_ids", "child_of", self.env.company.id),
|
|
22
22
|
(
|
|
23
23
|
"account_type",
|
|
24
24
|
"=",
|
|
@@ -29,7 +29,7 @@ class InvoicingTest(TestAccountInvoiceReport):
|
|
|
29
29
|
)
|
|
30
30
|
account_expense_id = self.env["account.account"].search(
|
|
31
31
|
[
|
|
32
|
-
("
|
|
32
|
+
("company_ids", "child_of", self.env.company.id),
|
|
33
33
|
(
|
|
34
34
|
"account_type",
|
|
35
35
|
"=",
|
|
@@ -40,12 +40,14 @@ class InvoicingTest(TestAccountInvoiceReport):
|
|
|
40
40
|
)
|
|
41
41
|
stamp_product_id.write(
|
|
42
42
|
{
|
|
43
|
-
"
|
|
43
|
+
"l10n_it_account_stamp_stamp_duty_apply_tax_ids": [
|
|
44
|
+
(6, 0, [self.tax_id.id])
|
|
45
|
+
],
|
|
44
46
|
"property_account_income_id": account_revenue_id.id,
|
|
45
47
|
"property_account_expense_id": account_expense_id.id,
|
|
46
48
|
}
|
|
47
49
|
)
|
|
48
|
-
self.env.company.
|
|
50
|
+
self.env.company.l10n_it_account_stamp_stamp_duty_product_id = stamp_product_id
|
|
49
51
|
|
|
50
52
|
def test_post_invoicing(self):
|
|
51
53
|
invoice = first(
|
|
@@ -59,7 +61,7 @@ class InvoicingTest(TestAccountInvoiceReport):
|
|
|
59
61
|
self.assertEqual(
|
|
60
62
|
len(invoice.line_ids.filtered(lambda line: line.is_stamp_line)), 0
|
|
61
63
|
)
|
|
62
|
-
self.assertTrue(invoice.
|
|
64
|
+
self.assertTrue(invoice.l10n_it_account_stamp_is_stamp_duty_applied)
|
|
63
65
|
invoice.action_post()
|
|
64
66
|
|
|
65
67
|
self.assertEqual(
|
|
@@ -84,45 +86,131 @@ class InvoicingTest(TestAccountInvoiceReport):
|
|
|
84
86
|
invoice.action_post()
|
|
85
87
|
|
|
86
88
|
# Add stamp and check that edited description is kept
|
|
87
|
-
invoice.
|
|
89
|
+
invoice.button_draft()
|
|
90
|
+
invoice.add_stamp_duty_invoice_line()
|
|
88
91
|
self.assertEqual(invoice.invoice_line_ids[0].name, edited_descr)
|
|
89
92
|
|
|
90
93
|
def test_amount_total_changing_currency(self):
|
|
91
94
|
"""Modify invoice currency and check that amount_total does not change after
|
|
92
95
|
action_post"""
|
|
93
|
-
|
|
96
|
+
stamp_duty_product = (
|
|
97
|
+
self.env.company.l10n_it_account_stamp_stamp_duty_product_id
|
|
98
|
+
)
|
|
99
|
+
stamp_duty_product.l10n_it_account_stamp_auto_compute = False
|
|
94
100
|
invoice = first(
|
|
95
101
|
self.invoices.filtered(lambda inv: inv.move_type == "out_invoice")
|
|
96
102
|
)
|
|
97
103
|
invoice_form = Form(invoice)
|
|
98
|
-
invoice_form.
|
|
104
|
+
invoice_form.l10n_it_account_stamp_manually_apply_stamp_duty = False
|
|
99
105
|
invoice_form.currency_id = self.env.ref("base.USD")
|
|
100
106
|
invoice = invoice_form.save()
|
|
101
107
|
total = invoice.amount_total
|
|
102
108
|
invoice.action_post()
|
|
103
109
|
self.assertEqual(total, invoice.amount_total)
|
|
104
110
|
|
|
105
|
-
def
|
|
106
|
-
"""
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
"out_invoice",
|
|
111
|
-
taxes=stamp_tax,
|
|
112
|
-
amounts=[
|
|
113
|
-
100,
|
|
114
|
-
],
|
|
111
|
+
def test_reset_invoice_to_draft(self):
|
|
112
|
+
"""Reset an invoice to draft and check that relative tax stamp accounting lines
|
|
113
|
+
has been deleted."""
|
|
114
|
+
invoice = first(
|
|
115
|
+
self.invoices.filtered(lambda inv: inv.move_type == "out_invoice")
|
|
115
116
|
)
|
|
116
|
-
# pre-condition
|
|
117
|
-
self.assertTrue(invoice.tax_stamp)
|
|
118
|
-
self.assertFalse(invoice.tax_stamp_line_present)
|
|
119
117
|
|
|
120
|
-
|
|
121
|
-
invoice.
|
|
118
|
+
self.assertEqual(len(invoice), 1)
|
|
119
|
+
self.assertEqual(len(invoice.invoice_line_ids), 2)
|
|
122
120
|
|
|
123
|
-
|
|
124
|
-
|
|
121
|
+
invoice.invoice_line_ids[0].write({"tax_ids": [(6, 0, [self.tax_id.id])]})
|
|
122
|
+
invoice.action_post()
|
|
123
|
+
|
|
124
|
+
self.assertEqual(
|
|
125
|
+
len(invoice.line_ids.filtered(lambda line: line.is_stamp_line)), 2
|
|
126
|
+
)
|
|
125
127
|
|
|
126
|
-
# Resetting to draft removes the stamp
|
|
127
128
|
invoice.button_draft()
|
|
128
|
-
|
|
129
|
+
|
|
130
|
+
self.assertEqual(
|
|
131
|
+
len(invoice.line_ids.filtered(lambda line: line.is_stamp_line)), 0
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
def test_compute_l10n_it_stamp_duty(self):
|
|
135
|
+
"""Test that l10n_it_stamp_duty is correctly computed based on stamp
|
|
136
|
+
application and product price."""
|
|
137
|
+
stamp_product = self.env.company.l10n_it_account_stamp_stamp_duty_product_id
|
|
138
|
+
stamp_price = stamp_product.list_price
|
|
139
|
+
|
|
140
|
+
# Test 1: Invoice in draft with stamp duty applied
|
|
141
|
+
invoice = first(
|
|
142
|
+
self.invoices.filtered(lambda inv: inv.move_type == "out_invoice")
|
|
143
|
+
)
|
|
144
|
+
invoice.invoice_line_ids[0].write({"tax_ids": [(6, 0, [self.tax_id.id])]})
|
|
145
|
+
self.assertTrue(invoice.l10n_it_account_stamp_is_stamp_duty_applied)
|
|
146
|
+
self.assertEqual(invoice.state, "draft")
|
|
147
|
+
self.assertEqual(
|
|
148
|
+
invoice.l10n_it_stamp_duty,
|
|
149
|
+
stamp_price,
|
|
150
|
+
"Stamp duty should equal product price when applied in draft",
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
# Test 2: Invoice in draft without stamp duty applied
|
|
154
|
+
invoice2 = self.env["account.move"].create(
|
|
155
|
+
{
|
|
156
|
+
"move_type": "out_invoice",
|
|
157
|
+
"partner_id": self.partner_a.id,
|
|
158
|
+
"invoice_date": "2024-01-01",
|
|
159
|
+
"invoice_line_ids": [
|
|
160
|
+
(
|
|
161
|
+
0,
|
|
162
|
+
0,
|
|
163
|
+
{
|
|
164
|
+
"name": "Test Product Without Stamp",
|
|
165
|
+
"price_unit": 100.0,
|
|
166
|
+
"quantity": 1,
|
|
167
|
+
},
|
|
168
|
+
)
|
|
169
|
+
],
|
|
170
|
+
}
|
|
171
|
+
)
|
|
172
|
+
self.assertFalse(invoice2.l10n_it_account_stamp_is_stamp_duty_applied)
|
|
173
|
+
self.assertEqual(invoice2.state, "draft")
|
|
174
|
+
self.assertEqual(
|
|
175
|
+
invoice2.l10n_it_stamp_duty,
|
|
176
|
+
0,
|
|
177
|
+
"Stamp duty should be 0 when not applied",
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
# Test 3: Posted invoice should keep value from draft
|
|
181
|
+
invoice.action_post()
|
|
182
|
+
self.assertEqual(invoice.state, "posted")
|
|
183
|
+
self.assertEqual(
|
|
184
|
+
invoice.l10n_it_stamp_duty,
|
|
185
|
+
stamp_price,
|
|
186
|
+
"Stamp duty should be preserved after posting",
|
|
187
|
+
)
|
|
188
|
+
|
|
189
|
+
# Test 4: Change stamp product price and verify recomputation
|
|
190
|
+
new_price = 5.0
|
|
191
|
+
stamp_product.list_price = new_price
|
|
192
|
+
invoice3 = self.env["account.move"].create(
|
|
193
|
+
{
|
|
194
|
+
"move_type": "out_invoice",
|
|
195
|
+
"partner_id": self.partner_a.id,
|
|
196
|
+
"invoice_date": "2024-01-01",
|
|
197
|
+
"invoice_line_ids": [
|
|
198
|
+
(
|
|
199
|
+
0,
|
|
200
|
+
0,
|
|
201
|
+
{
|
|
202
|
+
"name": "Test Product",
|
|
203
|
+
"price_unit": 100.0,
|
|
204
|
+
"quantity": 1,
|
|
205
|
+
"tax_ids": [(6, 0, [self.tax_id.id])],
|
|
206
|
+
},
|
|
207
|
+
)
|
|
208
|
+
],
|
|
209
|
+
}
|
|
210
|
+
)
|
|
211
|
+
self.assertTrue(invoice3.l10n_it_account_stamp_is_stamp_duty_applied)
|
|
212
|
+
self.assertEqual(
|
|
213
|
+
invoice3.l10n_it_stamp_duty,
|
|
214
|
+
new_price,
|
|
215
|
+
"Stamp duty should reflect updated product price",
|
|
216
|
+
)
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8" ?>
|
|
2
2
|
<odoo>
|
|
3
|
-
|
|
4
3
|
<template
|
|
5
4
|
id="report_invoice_document_custom_fields_ext"
|
|
6
5
|
inherit_id="account.report_invoice_document"
|
|
7
6
|
>
|
|
8
|
-
<xpath expr="//
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
<xpath expr="//div[@name='incoterm_id']" position="before">
|
|
8
|
+
<div
|
|
9
|
+
t-if="o.l10n_it_account_stamp_is_stamp_duty_applied"
|
|
10
|
+
name="l10n_it_account_stamp_is_stamp_duty_applied"
|
|
11
|
+
class="col"
|
|
12
|
+
>
|
|
13
|
+
Imposta di bollo assolta in modo virtuale ai sensi dell'articolo 15 del DPR 642/1972 e del DM 17/06/2014
|
|
14
|
+
</div>
|
|
13
15
|
</xpath>
|
|
14
16
|
</template>
|
|
15
17
|
</odoo>
|