[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
Conversation
… 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.