I have created Many2Many with:
Field type: res.partner
Here is the code inside lead/opportunity
<field name="x_entreprises" domain="[('customer','=',True)]" string=" ">
<tree string="Entreprises" editable="top">
Then I created One2Many with
Object relation: crm.lead
Relation field: x_entreprises
Here is the code inside res.partner
<field name="x_entreprises_ids" string=" " readonly="1" domain="[('id', 'in', x_entreprises)]">
<field name="planned_revenue" sum="total"/>
Inside that Many2Many field i am able to add company that take part on the opportunities. When I access the customer form, I should be able to see the opportunities that the customer is involved in.
The error: when I add more then 1 customer inside that many2many fields and then I go to that Customer form I will have singleton error (Expected singleton: res.partner(52350, 52353)). I believe my domain inside One2Many field is wrong.
Please let me know, how to solve this issue. Thank you so much.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 9/5/15, 3:18 PM|
|Seen: 1026 times|
|Last updated: 9/16/15, 9:09 AM|