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

Hi, 

I need to display dynamic values in Selection:



But it seems like the values dont get evaluated in time.


Thank you 

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

Hi Andreas,

task_contact= fields.Selection(
​selection=lambda self: self._get_task_contact_options(),
​string='Task Contact',
​track_visibility='onchange',
​store=True

)

Hope this help!

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

Hey Jason, it says function is not iterable... How would I loop through the options in the xml?

Hi Andreas, you should get self._fields['task_contact'].selection first then pass to qweb

أفضل إجابة

Hi, 

You can follow following link for this:

https://youtu.be/GPhgxxwprA4

Hope it helps,

Thanks

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
أغسطس 25
95
1
أغسطس 25
2045
1
يوليو 25
2573
2
يوليو 25
8010
2
يوليو 25
4458