Skip to content

Commit

Permalink
IMP l10n_it_fiscalcode company view: allow to specify company fiscal …
Browse files Browse the repository at this point in the history
…code (OCA#844)
  • Loading branch information
eLBati authored and michelerusti committed Nov 10, 2022
1 parent a8c5ce7 commit c5632d9
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
3 changes: 2 additions & 1 deletion l10n_it_fiscalcode/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

{
'name': 'Italian Localization - Fiscal Code',
'version': '12.0.1.0.0',
'version': '12.0.1.1.0',
'development_status': 'Production/Stable',
'category': 'Localisation/Italy',
'author': "Link IT s.r.l., "
Expand All @@ -25,6 +25,7 @@
'view/fiscalcode_view.xml',
'view/report_invoice_document.xml',
'wizard/compute_fc_view.xml',
'view/company_view.xml'
],
'installable': True
}
1 change: 1 addition & 0 deletions l10n_it_fiscalcode/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

from . import res_partner
from . import res_city_it_code
from . import res_company
9 changes: 9 additions & 0 deletions l10n_it_fiscalcode/model/res_company.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import models, fields


class ResCompany(models.Model):
_inherit = 'res.company'
fiscalcode = fields.Char(
related='partner_id.fiscalcode', store=True, readonly=False)
13 changes: 13 additions & 0 deletions l10n_it_fiscalcode/view/company_view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" ?>
<odoo>
<record id="view_company_form_fc" model="ir.ui.view">
<field name="name">view_company_form_fc</field>
<field name="model">res.company</field>
<field name="inherit_id" ref="base.view_company_form"/>
<field name="arch" type="xml">
<field name="vat" position="after">
<field name="fiscalcode" />
</field>
</field>
</record>
</odoo>

0 comments on commit c5632d9

Please sign in to comment.