Skip to content

Commit b83874c

Browse files
committed
[MIG] l10n_it_pos_fiscalcode: Adapt migration to 18.0
1 parent caa40f7 commit b83874c

File tree

15 files changed

+147
-59
lines changed

15 files changed

+147
-59
lines changed

l10n_it_pos_fiscalcode/README.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,13 @@ ITA - POS - Codice fiscale
3030

3131
**Italiano**
3232

33-
Il modulo aggiunge il campo codice fiscale nella schermata del cliente
34-
nell'interfaccia del punto vendita, permettendo di visualizzarlo e
35-
modificarlo.
33+
Il modulo aggiunge il campo codice fiscale nella lista dei clienti
34+
nell'interfaccia del punto vendita, e permette di usarlo nella ricerca.
3635

3736
**English**
3837

39-
The module adds fiscal code field to partner form within point of sale
40-
interface, allowing to view and edit it.
38+
The module adds the fiscal code field to the customer list screen in the
39+
point of sale user interface, and allows it to be used in searches.
4140

4241
**Table of contents**
4342

@@ -60,7 +59,8 @@ Credits
6059
Contributors
6160
------------
6261

63-
- Lorenzo Battistini <https://github.com/eLBati>
62+
- Lorenzo Battistini <https://github.com/eLBati>
63+
- Simone Rubino <simone.rubino88@gmail.com>
6464

6565
Maintainers
6666
-----------

l10n_it_pos_fiscalcode/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
2+
13
from . import models

l10n_it_pos_fiscalcode/__manifest__.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Copyright 2019 Lorenzo Battistini
2+
# Copyright 2026 Simone Rubino
23
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
34

45
{
@@ -12,15 +13,16 @@
1213
"author": "Odoo Community Association (OCA)",
1314
"maintainers": ["eLBati"],
1415
"license": "AGPL-3",
15-
"application": False,
16-
"installable": True,
1716
"depends": [
1817
"point_of_sale",
19-
"l10n_it_edi_extension",
18+
"l10n_it_edi",
2019
],
2120
"assets": {
22-
"point_of_sale.assets": [
23-
"l10n_it_pos_fiscalcode/static/src/xml/pos.xml",
21+
"point_of_sale._assets_pos": [
22+
"l10n_it_pos_fiscalcode/static/src/**/*",
23+
],
24+
"web.assets_tests": [
25+
"l10n_it_pos_fiscalcode/static/tests/tours/**/*",
2426
],
2527
},
2628
}
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
from . import pos_session
1+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
2+
3+
from . import res_partner

l10n_it_pos_fiscalcode/models/pos_session.py

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright 2022 Dinamiche Aziendali srl
2+
# Copyright 2022 Giuseppe Borruso <gborruso@dinamicheaziendali.it>
3+
# Copyright 2026 Simone Rubino
4+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
5+
6+
from odoo import api, models
7+
8+
9+
class ResPartner(models.Model):
10+
_inherit = "res.partner"
11+
12+
@api.model
13+
def _load_pos_data_fields(self, config_id):
14+
pos_data_fields = super()._load_pos_data_fields(config_id)
15+
pos_data_fields.append("l10n_it_codice_fiscale")
16+
return pos_data_fields
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
- Lorenzo Battistini \<<https://github.com/eLBati>\>
2+
- Simone Rubino \<<simone.rubino88@gmail.com>\>
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
**Italiano**
22

3-
Il modulo aggiunge il campo codice fiscale nella schermata del cliente
4-
nell'interfaccia del punto vendita, permettendo di visualizzarlo e
5-
modificarlo.
3+
Il modulo aggiunge il campo codice fiscale nella lista dei clienti
4+
nell'interfaccia del punto vendita, e permette di usarlo nella ricerca.
65

76
**English**
87

9-
The module adds fiscal code field to partner form within point of sale
10-
interface, allowing to view and edit it.
8+
The module adds the fiscal code field to the customer list screen
9+
in the point of sale user interface, and allows it to be used in searches.

l10n_it_pos_fiscalcode/static/description/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -371,12 +371,11 @@ <h1 class="title">ITA - POS - Codice fiscale</h1>
371371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372372
<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/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-italy/tree/18.0/l10n_it_pos_fiscalcode"><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_pos_fiscalcode"><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>
373373
<p><strong>Italiano</strong></p>
374-
<p>Il modulo aggiunge il campo codice fiscale nella schermata del cliente
375-
nell’interfaccia del punto vendita, permettendo di visualizzarlo e
376-
modificarlo.</p>
374+
<p>Il modulo aggiunge il campo codice fiscale nella lista dei clienti
375+
nell’interfaccia del punto vendita, e permette di usarlo nella ricerca.</p>
377376
<p><strong>English</strong></p>
378-
<p>The module adds fiscal code field to partner form within point of sale
379-
interface, allowing to view and edit it.</p>
377+
<p>The module adds the fiscal code field to the customer list screen in the
378+
point of sale user interface, and allows it to be used in searches.</p>
380379
<p><strong>Table of contents</strong></p>
381380
<div class="contents local topic" id="contents">
382381
<ul class="simple">
@@ -402,6 +401,7 @@ <h1><a class="toc-backref" href="#toc-entry-2">Credits</a></h1>
402401
<h2><a class="toc-backref" href="#toc-entry-3">Contributors</a></h2>
403402
<ul class="simple">
404403
<li>Lorenzo Battistini &lt;<a class="reference external" href="https://github.com/eLBati">https://github.com/eLBati</a>&gt;</li>
404+
<li>Simone Rubino &lt;<a class="reference external" href="mailto:simone.rubino88&#64;gmail.com">simone.rubino88&#64;gmail.com</a>&gt;</li>
405405
</ul>
406406
</div>
407407
<div class="section" id="maintainers">
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Copyright 2026 Simone Rubino
3+
* License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
4+
*/
5+
6+
import {ResPartner} from "@point_of_sale/app/models/res_partner";
7+
import {patch} from "@web/core/utils/patch";
8+
9+
patch(ResPartner.prototype, {
10+
get searchString() {
11+
let searchString = super.searchString;
12+
const fiscalCode = this.l10n_it_codice_fiscale;
13+
if (fiscalCode) {
14+
searchString += " " + fiscalCode;
15+
}
16+
return searchString;
17+
},
18+
});

0 commit comments

Comments
 (0)