Odoo Help

0

0
1 Answer
0
Avatar

paulo India

--paulo--

6824
| 6 2 5
India
--paulo--

Odoo developer

paulo India
7/25/19, 1:07 AM

Hi,  

if you want to display the many2one field like selection  you can use  widget="selection" and you can  write a method on onchange of many2one field and return domain in that method based on condition.

@api.onchange('result')
def onchange_result_ids(self):
if self.strs:
domain = {'result': [(condition)]}
return {'domain': domain}

1 Comment
vx2008 China
7/25/19, 2:51 AM

thanks for your reply;

but i think the effect of your code is select some items but what i means is that the select items of 'result' are from 'strs'; for example, 'strs' = 'this is good'; then the select items list of 'result' should be ['this','is','good']

Ask a Question
Writer
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now