You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem?
If so, please provide clear and concise description of what the problem is.
The primary issue is that this module relies on the partner being a commercial partner. However if dealing with a large company with many buyers, often you will use the contact rather than the parent.
The second issue is I don't see why this module is in partner-contact when for example sale_commercial_partner is in sale-workflow but just a minor detail.
Describe the solution you'd like
For me there are 2 solutions
Simply change the domain in the onchange to self.partner_id.commercial_partner_id.id . This has the downside of continuing to use deprecated functionality.
Depend on sale_commercial_partner, and use a domain set on the field declaration. e.g. fields.Many2one(..., domain="[('commercial_partner_id', '=', commercial_partner_id)]", check_company=True) or alternately adding '|', ('company_id', '=', False), ('company_id', '=', company_id)] to the domain. The downside is no inheritance, possible overwrites etc but benefit of removing onchange and deprecated domain return.
Of course 1 and 2 could be combined. Notwithstanding technical considerations, extensions, etc, the functional consequence to people who only use commercial partners on sales is nil in either option, but greatly increases usability for those that use contacts.
Additional context
Honestly, I don't know. I was just looking for something and stumbled on this while browsing and thought it was a good idea but saw that it just wouldn't quite fit any client I have for reasons above. I'm happy to do here if agreement, or just write my own thing.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem?
If so, please provide clear and concise description of what the problem is.
The primary issue is that this module relies on the partner being a commercial partner. However if dealing with a large company with many buyers, often you will use the contact rather than the parent.
The second issue is I don't see why this module is in partner-contact when for example sale_commercial_partner is in sale-workflow but just a minor detail.
Describe the solution you'd like
For me there are 2 solutions
fields.Many2one(..., domain="[('commercial_partner_id', '=', commercial_partner_id)]", check_company=True)
or alternately adding'|', ('company_id', '=', False), ('company_id', '=', company_id)]
to the domain. The downside is no inheritance, possible overwrites etc but benefit of removing onchange and deprecated domain return.Of course 1 and 2 could be combined. Notwithstanding technical considerations, extensions, etc, the functional consequence to people who only use commercial partners on sales is nil in either option, but greatly increases usability for those that use contacts.
Additional context
Honestly, I don't know. I was just looking for something and stumbled on this while browsing and thought it was a good idea but saw that it just wouldn't quite fit any client I have for reasons above. I'm happy to do here if agreement, or just write my own thing.
The text was updated successfully, but these errors were encountered: