تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3 الردود
3806 أدوات العرض

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


الصورة الرمزية
إهمال
أفضل إجابة

This should work:

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


الصورة الرمزية
إهمال
الكاتب

Great thank You !

Works perfectly

الكاتب أفضل إجابة

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.



الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
فبراير 25
979
2
فبراير 22
8662
1
مارس 15
4026
0
مارس 15
4490
0
أكتوبر 23
1458