Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[15.0][MIG] 10n_be_partner_kbo_bce #179

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
pre-commit autoformatters
  • Loading branch information
sbidoul authored and jdidderen-noviat committed Apr 4, 2023
commit 2df20ef9f83f116c6ef9ac00a63eed6b7b0fcb12
3 changes: 1 addition & 2 deletions l10n_be_partner_kbo_bce/__manifest__.py
Original file line number Diff line number Diff line change
@@ -6,8 +6,7 @@
"category": "Localization",
"version": "13.0.1.0.0",
"license": "AGPL-3",
"author": "Noviat,"
"Odoo Community Association (OCA)",
"author": "Noviat,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/l10n-belgium",
"depends": ["partner_identification", "base_vat_sanitized"],
"data": ["data/res_partner_id_category.xml", "views/res_partner.xml"],
16 changes: 8 additions & 8 deletions l10n_be_partner_kbo_bce/data/res_partner_id_category.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<odoo>

<record id="l10n_be_kbo_bce_number_category" model="res.partner.id_category">
<field name="code">l10n_be_kbo_bce</field>
<field name="name">Belgium KBO/BCE Number</field>
<field name="validation_code">failed = self.validate_l10n_be_partner_kbo_bce(id_number)</field>
</record>

<record id="l10n_be_kbo_bce_number_category" model="res.partner.id_category">
<field name="code">l10n_be_kbo_bce</field>
<field name="name">Belgium KBO/BCE Number</field>
<field
name="validation_code"
>failed = self.validate_l10n_be_partner_kbo_bce(id_number)</field>
</record>
</odoo>
33 changes: 17 additions & 16 deletions l10n_be_partner_kbo_bce/demo/res_partner.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<data noupdate="0">

<record id="res_partner_1" model="res.partner">
<field name="name">Noviat</field>
<field name="category_id" eval="[(6, 0, [ref('base.res_partner_category_8')])]"/>
<field name="is_company">1</field>
<field name="city">Brussel</field>
<field name="zip">1083</field>
<field name="street">Rusatiralaan 1</field>
<field name="email">info@noviat.com</field>
<field name="phone">+32 2 808 86 38</field>
<field name="website">http://www.noviat.com</field>
</record>

</data>
<data noupdate="0">
<record id="res_partner_1" model="res.partner">
<field name="name">Noviat</field>
<field
name="category_id"
eval="[(6, 0, [ref('base.res_partner_category_8')])]"
/>
<field name="is_company">1</field>
<field name="city">Brussel</field>
<field name="zip">1083</field>
<field name="street">Rusatiralaan 1</field>
<field name="email">info@noviat.com</field>
<field name="phone">+32 2 808 86 38</field>
<field name="website">http://www.noviat.com</field>
</record>
</data>
</odoo>
28 changes: 14 additions & 14 deletions l10n_be_partner_kbo_bce/views/res_partner.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<odoo>

<record id="view_partner_form" model="ir.ui.view">
<field name="name">res.partner.form.kbo_bce_number</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<field name="vat" position="after">
<field name="kbo_bce_number"
attrs="{'invisible': [('country_code', '!=', 'BE')]}"/>
<field name="country_code" invisible="1"/>
</field>
</field>
</record>

<record id="view_partner_form" model="ir.ui.view">
<field name="name">res.partner.form.kbo_bce_number</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form" />
<field name="arch" type="xml">
<field name="vat" position="after">
<field
name="kbo_bce_number"
attrs="{'invisible': [('country_code', '!=', 'BE')]}"
/>
<field name="country_code" invisible="1" />
</field>
</field>
</record>
</odoo>