Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
2095 Vizualizări

hello

i add one object button . i add two field first is partner_id(many2one) and second is sale_ids(many2many) .

now i want this flow 


first i select re.partner and i click on my button so in sale_ids field automatic give me the all sale order in this field 


thank you in advamce


Imagine profil
Abandonează
Cel mai bun răspuns
you can call following method to update sale_ids(m2m) from the button:

def update_m2m(self):
for rec in self:
rec.sale_ids = [(6,0,self.search([('id','!=',rec.id),('partner_id', '=', rec.partner_id.id)]).ids)]

Thanks & Regards,



CandidRoot Solutions Pvt. Ltd.

Mobile: (+91) 8849036209
Email: info@candidroot.com
Skype: live:candidroot
Web: https://www.candidroot.com
Address: 1229-1230, Iconic Shyamal, Near Shyamal Cross Road, Ahmedabad, Gujarat 380015
    

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
0
sept. 22
1839
0
feb. 23
157
3
aug. 22
9218
1
iul. 22
5267
0
iul. 22
2244