Skip to content

[16.0][IMP] base_usability: Replace company name fetching from parent_id to commercial_partner_id#241

Open
Honeyxilia wants to merge 1 commit into
akretion:16.0from
Honeyxilia:16.0-imp-base_usability-fetch_company_name_from_commercial_partner
Open

[16.0][IMP] base_usability: Replace company name fetching from parent_id to commercial_partner_id#241
Honeyxilia wants to merge 1 commit into
akretion:16.0from
Honeyxilia:16.0-imp-base_usability-fetch_company_name_from_commercial_partner

Conversation

@Honeyxilia

Copy link
Copy Markdown

Some company partners might not be directly related to their company, but have an intermidiary partner. As such, fetching only the parent partner and checking whether they're a company is not sufficiant.

As such, we replace the parent_id field by the commercial_partner_id field, which fetches either the parent, if they're a company, or the grandparent of any given partner.

Since we can deal with cases where the grand-parent is not a company, we still check the 'is_company' field.

… commercial_partner_id

Some company partners might not be directly related to their company, but have an intermidiary partner.
As such, fetching only the parent partner and checking whether they're a company is not sufficiant.

As such, we replace the parent_id field by the commercial_partner_id field, which fetches either the parent, if they're a company,
or the grandparent of any given partner.

Since we can deal with cases where the grand-parent is not a company, we still check the 'is_company' field.
Honeyxilia added a commit to commown/commown-odoo-addons that referenced this pull request Mar 19, 2026
…voice reports

Since the odoo-usability/base_usability module used a partner's parent, rather than their commercial partner
as their company, this can lead to invoices issues to invoicing partners to not contain their company's name,
since they have an intermidiary parent.
As such, for some customers, printed invoices only had the invoice's partner name, and not their company name.

We applied a fix on the base_usability module (see below PR) - however, to insure a clear display of the invoice address,
we now add tests for various invoice use cases, and check the addresses' validity.
=> akretion/odoo-usability#241
Honeyxilia added a commit to commown/commown-odoo-addons that referenced this pull request Mar 19, 2026
…voice reports

Since the odoo-usability/base_usability module used a partner's parent, rather than their commercial partner
as their company, this can lead to invoices issues to invoicing partners to not contain their company's name,
since they have an intermidiary parent.
As such, for some customers, printed invoices only had the invoice's partner name, and not their company name.

We applied a fix on the base_usability module (see below PR) - however, to insure a clear display of the invoice address,
we now add tests for various invoice use cases, and check the addresses' validity.
=> akretion/odoo-usability#241
Honeyxilia added a commit to commown/commown-odoo-addons that referenced this pull request Mar 19, 2026
…voice reports

Since the odoo-usability/base_usability module used a partner's parent, rather than their commercial partner
as their company, this can lead to invoices issues to invoicing partners to not contain their company's name,
since they have an intermidiary parent.
As such, for some customers, printed invoices only had the invoice's partner name, and not their company name.

We applied a fix on the base_usability module (see below PR) - however, to insure a clear display of the invoice address,
we now add tests for various invoice use cases, and check the addresses' validity.
=> akretion/odoo-usability#241
Honeyxilia added a commit to commown/commown-odoo-addons that referenced this pull request Mar 19, 2026
…voice reports

Since the odoo-usability/base_usability module used a partner's parent, rather than their commercial partner
as their company, this can lead to invoices issues to invoicing partners to not contain their company's name,
since they have an intermidiary parent.
As such, for some customers, printed invoices only had the invoice's partner name, and not their company name.

We applied a fix on the base_usability module (see below PR) - however, to insure a clear display of the invoice address,
we now add tests for various invoice use cases, and check the addresses' validity.
=> akretion/odoo-usability#241
Honeyxilia added a commit to commown/commown-odoo-addons that referenced this pull request Mar 24, 2026
…voice reports

Since the odoo-usability/base_usability module used a partner's parent, rather than their commercial partner
as their company, this can lead to invoices issues to invoicing partners to not contain their company's name,
since they have an intermidiary parent.
As such, for some customers, printed invoices only had the invoice's partner name, and not their company name.

We applied a fix on the base_usability module (see below PR) - however, to insure a clear display of the invoice address,
we now add tests for various invoice use cases, and check the addresses' validity.
=> akretion/odoo-usability#241
Honeyxilia added a commit to commown/commown-odoo-addons that referenced this pull request Mar 25, 2026
…voice reports

Since the odoo-usability/base_usability module used a partner's parent, rather than their commercial partner
as their company, this can lead to invoices issues to invoicing partners to not contain their company's name,
since they have an intermidiary parent.
As such, for some customers, printed invoices only had the invoice's partner name, and not their company name.

We applied a fix on the base_usability module (see below PR) - however, to insure a clear display of the invoice address,
we now add tests for various invoice use cases, and check the addresses' validity.
=> akretion/odoo-usability#241
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant