-
Notifications
You must be signed in to change notification settings - Fork 30.3k
[REF] base: remove 'company_type' #211043
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
base: master
Are you sure you want to change the base?
[REF] base: remove 'company_type' #211043
Conversation
f35a33f to
4d2465e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @yagp-odoo 👋 ,
Left some comments
But it feels strange that we sometimes use vat or parent_id in place of is_company(earlier it was easy to distinguish)
It might cause undesirable behaviour to the many flows
Can't we rely on parent_id only?
Thanks
4d2465e to
ab1ae35
Compare
|
Hello @mrsr-odoo 👋
Agreed it might cause unexpected outcome, but we mainly wants to check for VAT, as any registered company must have a VAT.
Yes, but from what I understood, we're now wants to check its subject to VAT or not, not by distinguish its person or company.
In some cases YES, we can like for checking its root contact,..etc. A contact with False parent_id doesn't necessary have to be a Company, so checking VAT in most cases should do I think. Though this can still be change when l10n modules come into play, Accounting Team/s may wants something different 🙃 |
bdf5c9c to
8c6b21a
Compare
|
@qdp-odoo I bet somehow this should interest you at some point. Draft and not finished in any way but hey. |
b85b531 to
a813bc9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @yagp-odoo 👋 ,
Left some comments
Some conflicts to resolves
Thanks
addons/l10n_ec_website_sale/static/tests/tours/website_sale_checkout_address.js
Outdated
Show resolved
Hide resolved
2a54909 to
ba2b5a5
Compare
b39a0a4 to
1ab8f12
Compare
Adapt the util tests. COM PR: odoo/odoo#211043 ENT PR: odoo/enterprise#86089 Upgrade: odoo/upgrade#7724
1ab8f12 to
372a087
Compare
Adapt the util tests. COM PR: odoo/odoo#211043 ENT PR: odoo/enterprise#86089 Upgrade: odoo/upgrade#7724
372a087 to
ccfcbaf
Compare
Adapt the util tests. COM PR: odoo/odoo#211043 ENT PR: odoo/enterprise#86089 Upgrade: odoo/upgrade#7724
9a519e7 to
7629199
Compare
Adapt the util tests. COM PR: odoo/odoo#211043 ENT PR: odoo/enterprise#86089 Upgrade: odoo/upgrade#7724
7629199 to
8426487
Compare
Adapt the util tests. COM PR: odoo/odoo#211043 ENT PR: odoo/enterprise#86089 Upgrade: odoo/upgrade#7724
8426487 to
dba053c
Compare
Adapt the util tests. COM PR: odoo/odoo#211043 ENT PR: odoo/enterprise#86089 Upgrade: odoo/upgrade#7724
dba053c to
4224884
Compare
Adapt the util tests. COM PR: odoo/odoo#211043 ENT PR: odoo/enterprise#86089 Upgrade: odoo/upgrade#7724
9726837 to
fca5a3a
Compare
This commit removes the 'company_type' field, which was previously used to distinguish between 'Person' and 'Company' contacts. We'll now use computed `is_company` based on VAT and Commercial Partner to distinguish Individual/Company. 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. It had a good run — well, not really — but it's dead for good now. Removed fields: base : company_type, company_name crm : commercial_partner_id survey : certifications_company_count website_slides : slide_channel_company_count Task-4714892
This commit removes 'company_name'. Now 'parent_name' will replace 'company_name' in places like website form, crm, portal address etc. Task-4714892
Computed the field 'is_company' to determine if a partner is a
legal entity in Argentina, based on the AFIP identification type
and CUIT prefix.
This replaces reliance on the deprecated 'is_company' field, in line with
contact model simplification.
Logic:
- AFIP code = '80' (CUIT)
- CUIT prefix in ('30', '33', '34', '51', '55') → considered a company
Task-4714892
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. Task-4714892
Turkish electronic invoicing now uses VAT length to determine the schemeID: - 10-digit VAT → company (VKN) - 11-digit VAT → individual (TCKN) Task-4714892
Compute 'is_company' to determine if a Spanish VAT number represents a legal entity based on CIF structure: - Format: 1 letter + 7 digits + checksum (digit or letter) If VAT is not following CIF Format or False, we'll take it as Individual. Task-4714892
Computed field 'is_company' to determine if a partner is a company in Hungary, based on VAT structure. Logic considers a partner a company if: - VAT starts with 'HU' and Followed by 8 digits (European format), or - Matches the Hungarian format: 8 digits - [2/4/5] - 2 digits Task-4714892
For Romanian CIUS RO invoices, set `is_b2b` / Compute `is_company` based on VAT checks: - CNP-like or `9000...` → individual (B2C) - Valid CUI via `stdnum` → company (B2B) Task-4714892
Compute 'is_company' by checking the 'l10n_it_codice_fiscale': - 11 digits → companies/legal entities - 16 digits → individuals Task-4714892
Use the 'vat' field to compute 'is_company' to determine whether a partner is a company or an individual: The Unified Business Number (UBN, 統一編號) is the number assigned to businesses within Taiwan for tax (VAT) purposes. The number consists of 8 digits, the last being a check digit. Task-4714892
Updates demo data and tests across various l10n_* modules to reflect the removal of the 'is_company/company_type' field from the contact model. Task-4714892
fca5a3a to
7e4481d
Compare

This PR removes the
company_typefield, which was previously used to distinguishbetween '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.
Changes in
l10n*modules:l10n_sa*: Use thevatfield instead ofis_companyto determine whether a partneris a company or an 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:l10n_es*: determine if a Spanish VAT number represents a legal entity based onCIF structure:
1 letter + 8 digits (e.g., A12345678)→ legal entityl10n_ar*: determine a partner is a legal entity based on the AFIP identification typeand CUIT prefix.
l10n_hu*: determine if a partner is a company based on VAT structure:l10n_*: general : removedis_company/company_typefrom demo/testsThis change is in line with the broader initiative to remove legacy fields and make the model
more straightforward as possible.
It had a good run — well, not really — but it's dead for good now.
Removed fields:
base :
is_company,company_type,company_namecrm :
commercial_partner_idsurvey :
certifications_company_countwebsite_slides :
slide_channel_company_countTask-4714892