odoo/odoo#211043

Created by Marketing, Thibault Delavallee (tde)
Merged at 3a56f59d466e72b3bf99f241c479cd3130173b41

Statuses:

label
odoo-dev:master-rem-base-sayonara-company-type-yagp
head
cbe08b136ccb7ba8b7e1e3c55aaa5ea2d29751ed
merged
2 weeks ago by Marketing, Thibault Delavallee (tde)
odoo/odoo odoo/enterprise odoo/upgrade odoo/upgrade-util
master #211043 #86089 #7724 #290

[REF] base: make 'is_company' computed, remove company_type

This PR removes the 'company_type' field, which was previously used
to distinguish between 'Person' and 'Company' contacts.

The goal is to simplify the contact form and model by eliminating this
distinction, as part of an effort to streamline and simplify the
contact information structure.

This change is in line with the broader initiative to remove legacy
fields and make the model more straightforward as possible.

is_company becomes a computed stored field, allowing each l10n to
specify how a company is defined in a specific country. By default
we will now rely on VAT and commercial entity to compute is_company.

Changes in l10n* modules:

l10n_sa* : Use the vat field instead of is_company to determine whether a partner
is a company or an individual:

  • VAT filled (15 digits) → Company
  • VAT empty → Individual

The VAT field enforces a minimum length of 15 digits, ensuring only valid
Saudi VAT numbers can be entered.


l10n_tr* : Turkish electronic invoicing now uses VAT length to determine the schemeID:
- 10-digit VAT → company (VKN)
- 11-digit VAT → individual (TCKN)


l10n_es* : determine if a Spanish VAT number represents a legal entity based on
CIF structure: 1 letter + 8 digits (e.g., A12345678) → legal entity


l10n_ar* : determine a partner is a legal entity based on the AFIP identification type
and CUIT prefix.

Logic:
- AFIP code = '80' (CUIT)
- CUIT prefix in ('30', '33', '34', '51', '55') → considered a company

l10n_hu* : determine if a partner is a company based on VAT structure:

- VAT starts with 'HU' and is 10 digits, or
- Matches the Hungarian EU format: 8 digits - [2/4/5] - 2 digits

l10n_* : general : removed is_company / company_type from demo/tests

Removed fields:
base : company_type, company_name
crm : commercial_partner_id

task-4714892