complex domain question

Asked by martin

I want to create a hierarchy in the partners, connecting wholesalers with end-customers.

For that i have created a many2one field connecting res_partner to res_partner.
I have also created a settings field (many2one) in res_company connecting res_partner_category to res_company. With this, i can choose a category to use as wholesalers.

Can someone tell me how to link the two fields now (domain?) so that when I edit a partner, I can choose only from the list of wholesalers? Hardcoding the category_id works, but I need a GUI solution.

Question information

Language:
English Edit question
Status:
Answered
For:
Odoo Addons (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
martin (riess82) said :
#2

No help on linking to (for openerp) unrelated fields or maybe do a true sql query without openerp helping?

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) said :
#3

If I understand your case correctly, you can make the category configured on the company available on the partner form using an invisible fields.related. You can then refer to this field in the domain on the wholesaler field on the same form.

Can you help with this problem?

Provide an answer of your own, or ask martin for more information if necessary.

To post a message you must log in.