-
Notifications
You must be signed in to change notification settings - Fork 81
[IMP] base/tests: remove company_name field
#290
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
[IMP] base/tests: remove company_name field
#290
Conversation
619cf7d to
ba833bc
Compare
ba833bc to
e56914c
Compare
|
upgradeci retry with always only base |
e56914c to
5824159
Compare
44b9b0f to
5cb4dbb
Compare
9300fd5 to
dd603cc
Compare
6284f02 to
9e48617
Compare
9e48617 to
45a5b00
Compare
9077aec to
6ab0a1e
Compare
6ab0a1e to
b3813f1
Compare
fafbbab to
6bc54b5
Compare
6bc54b5 to
005e66c
Compare
7e2542d to
dbec6d9
Compare
dbec6d9 to
89a9ec9
Compare
|
@robodoo r+ Validated and needed for https://github.com/odoo/upgrade/pull/7724 that is due tomorrow. |
|
I'm sorry, @tde-banana-odoo. I'm afraid I can't do that. |
|
Actually it is part of the batch, sorry for interrupting. Will need r+ rights quand même (delegate if ok for you ?). |
aj-fuentes
left a comment
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.
@robodoo delegate=tde-banana-odoo
cc: @jjmaksoud I cannot self-r+
|
@aj-fuentes you can't delegate=tde-banana-odoo. |
|
@aj-fuentes seems you cannot do much :D those restrictions are annoying and just make people lose time ... |
|
At least I can do this: |
|
@robodoo r+ delegate=tde-banana-odoo |
|
@aj-fuentes @jjmaksoud linked pull request(s) odoo/enterprise#86089, odoo/odoo#211043, odoo/upgrade#7724 not ready. Linked PRs are not staged until all of them are ready. |
Adapt the util tests. COM PR: odoo/odoo#211043 ENT PR: odoo/enterprise#86089 Upgrade: odoo/upgrade#7724
89a9ec9 to
0714585
Compare
|
@robodoo r+ |
This commit 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 sepcific country. By default we will now rely on VAT and commercial partner to compute `is_company`. Removed fields: base : company_type, company_name crm : commercial_partner_id Task-4714892 Part-of: #211043 Related: odoo/enterprise#86089 Related: odoo/upgrade#7724 Related: odoo/upgrade-util#290 Signed-off-by: Thibault Delavallee (tde) <[email protected]>
This commit removes 'company_name'. Now 'parent_name' will replace 'company_name' in places like website form, crm, portal address etc. A feature exists allowing to create a parent company directly when creating a partner by setting a "company_name". This now uses parent_name instead, that is otherwise managed like a classic related field on parent_id.name. This commit allows to remove some "company/parent name" like fields and try to cleanup a bit the model, being a bit less company specific. Task-4714892 Part-of: #211043 Related: odoo/enterprise#86089 Related: odoo/upgrade#7724 Related: odoo/upgrade-util#290 Signed-off-by: Thibault Delavallee (tde) <[email protected]>
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
Part-of: #211043
Related: odoo/enterprise#86089
Related: odoo/upgrade#7724
Related: odoo/upgrade-util#290
Signed-off-by: Thibault Delavallee (tde) <[email protected]>
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 Part-of: #211043 Related: odoo/enterprise#86089 Related: odoo/upgrade#7724 Related: odoo/upgrade-util#290 Signed-off-by: Thibault Delavallee (tde) <[email protected]>
Turkish electronic invoicing now uses VAT length to determine the schemeID: - 10-digit VAT → company (VKN) - 11-digit VAT → individual (TCKN) Task-4714892 Part-of: #211043 Related: odoo/enterprise#86089 Related: odoo/upgrade#7724 Related: odoo/upgrade-util#290 Signed-off-by: Thibault Delavallee (tde) <[email protected]>
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 Part-of: #211043 Related: odoo/enterprise#86089 Related: odoo/upgrade#7724 Related: odoo/upgrade-util#290 Signed-off-by: Thibault Delavallee (tde) <[email protected]>
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 Part-of: #211043 Related: odoo/enterprise#86089 Related: odoo/upgrade#7724 Related: odoo/upgrade-util#290 Signed-off-by: Thibault Delavallee (tde) <[email protected]>
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 Part-of: #211043 Related: odoo/enterprise#86089 Related: odoo/upgrade#7724 Related: odoo/upgrade-util#290 Signed-off-by: Thibault Delavallee (tde) <[email protected]>
Compute 'is_company' by checking the 'l10n_it_codice_fiscale': - 11 digits → companies/legal entities - 16 digits → individuals Task-4714892 Part-of: #211043 Related: odoo/enterprise#86089 Related: odoo/upgrade#7724 Related: odoo/upgrade-util#290 Signed-off-by: Thibault Delavallee (tde) <[email protected]>
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 Part-of: #211043 Related: odoo/enterprise#86089 Related: odoo/upgrade#7724 Related: odoo/upgrade-util#290 Signed-off-by: Thibault Delavallee (tde) <[email protected]>
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 Part-of: #211043 Related: odoo/enterprise#86089 Related: odoo/upgrade#7724 Related: odoo/upgrade-util#290 Signed-off-by: Thibault Delavallee (tde) <[email protected]>
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. closes #211043 Related: odoo/enterprise#86089 Related: odoo/upgrade#7724 Related: odoo/upgrade-util#290 Signed-off-by: Thibault Delavallee (tde) <[email protected]>

Adapt the util tests.