[IMP] l10n_nl: add Kvk and OIN to res.company form views
closes odoo/odoo#73615 Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
'data/account_chart_template_data.xml',
|
||||
'data/menuitem.xml',
|
||||
'views/res_partner_views.xml',
|
||||
'views/res_company_views.xml',
|
||||
],
|
||||
'demo': [
|
||||
'demo/demo_company.xml',
|
||||
|
||||
@@ -4,3 +4,4 @@
|
||||
from . import account_journal
|
||||
from . import account_chart_template
|
||||
from . import res_partner
|
||||
from . import res_company
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# coding: utf-8
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class ResCompany(models.Model):
|
||||
_inherit = 'res.company'
|
||||
|
||||
l10n_nl_kvk = fields.Char(related='partner_id.l10n_nl_kvk', readonly=False)
|
||||
l10n_nl_oin = fields.Char(related='partner_id.l10n_nl_oin', readonly=False)
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="res_company_form_inherit_nl" model="ir.ui.view">
|
||||
<field name="name">res.company.form.inherit.l10n.nl</field>
|
||||
<field name="model">res.company</field>
|
||||
<field name="inherit_id" ref="base.view_company_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='vat']" position="after">
|
||||
<field name="l10n_nl_kvk" attrs="{'invisible': [('country_code', '!=', 'NL')]}"/>
|
||||
<field name="l10n_nl_oin" attrs="{'invisible': [('country_code', '!=', 'NL')]}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user