Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
3 Antwoorden
3773 Weergaven

Hello, 

I have added a many2many field in the account.invoice model to be able to select a picking and associate it to the invoice. 

My problem is that I would like to be able to see in the picking selection form, only the picking related to the current purchase order of the invoice. 

It seems that the active_id is something that could help, but I can't find how to do this. 


I'm working on Odoo 12 cloud, with Odoo studio. 


Thanks for your help ! 

thomas


Avatar
Annuleer
Beste antwoord

This should work:

domain="[('origin', '=', origin)]


Avatar
Annuleer
Auteur

Great thank You !

Works perfectly

Auteur Beste antwoord

Thanks a lot for your feedback, but unfortunately, this doesn't seems to do the trick. After writing domain="[('purchase_id', '=', purchase_id)]", when I want to select the picking, I have no record showing. 


I also tried : domain="[('origin.id', '=', account_invoice.origin.id)]" but this doesn't work either.



Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
2
feb. 25
914
2
feb. 22
8592
1
mrt. 15
3982
0
mrt. 15
4442
0
okt. 23
1408