Skip to content

Commit

Permalink
ADD l10n_it_pos_fiscalcode
Browse files Browse the repository at this point in the history
The module adds fiscal code field to partner form within point of sale interface,
allowing to view and edit it
  • Loading branch information
eLBati committed Nov 21, 2019
1 parent 809797f commit 6c03263
Show file tree
Hide file tree
Showing 7 changed files with 80 additions and 0 deletions.
Empty file.
27 changes: 27 additions & 0 deletions l10n_it_pos_fiscalcode/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright 2019 Lorenzo Battistini
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "ITA - POS - Codice fiscale",
"summary": "Gestione codice fiscale del cliente all'interno "
"dell'interfaccia del POS",
"version": "12.0.1.0.0",
"development_status": "Beta",
"category": "Point Of Sale",
"website": "https://github.com/OCA/l10n-italy",
"author": "Odoo Community Association (OCA)",
"maintainers": ["eLBati"],
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": [
"point_of_sale",
"l10n_it_fiscalcode",
],
'qweb': [
'static/src/xml/pos.xml'
],
'data': [
'views/assets.xml',
],
}
1 change: 1 addition & 0 deletions l10n_it_pos_fiscalcode/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Lorenzo Battistini <https://github.com/eLBati>
9 changes: 9 additions & 0 deletions l10n_it_pos_fiscalcode/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
**Italiano**

Il modulo aggiunge il campo codice fiscale nella schermata del cliente nell'interfaccia del punto vendita,
permettendo di visualizzarlo e modificarlo.

**English**

The module adds fiscal code field to partner form within point of sale interface,
allowing to view and edit it.
7 changes: 7 additions & 0 deletions l10n_it_pos_fiscalcode/static/src/js/models.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
odoo.define('l10n_it_pos_fiscalcode.fiscalcode_field', function (require) {
"use strict";

var pos_models = require('point_of_sale.models');
pos_models.load_fields("res.partner", "fiscalcode");

});
25 changes: 25 additions & 0 deletions l10n_it_pos_fiscalcode/static/src/xml/pos.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">

<t t-extend="ClientDetails">
<t t-jquery=".client-details-right" t-operation="append">
<div class='client-detail'>
<span class='label'>F.C.</span>
<t t-if='partner.fiscalcode'>
<span class='detail fiscalcode'><t t-esc='partner.fiscalcode'/></span>
</t>
<t t-if='!partner.fiscalcode'>
<span class='detail fiscalcode empty'>N/A</span>
</t>
</div>
</t>
</t>
<t t-extend="ClientDetailsEdit">
<t t-jquery=".client-details-right" t-operation="append">
<div class='client-detail'>
<span class='label'>F.C.</span>
<input class='detail fiscalcode' name='fiscalcode' t-att-value='partner.fiscalcode || ""'/>
</div>
</t>
</t>
</templates>
11 changes: 11 additions & 0 deletions l10n_it_pos_fiscalcode/views/assets.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>

<template id="assets" inherit_id="point_of_sale.assets">
<xpath expr="." position="inside">
<script type="text/javascript" src="/l10n_it_pos_fiscalcode/static/src/js/models.js"/>
</xpath>

</template>

</odoo>

0 comments on commit 6c03263

Please sign in to comment.