Odoo Help

0
2 Answers
0
Avatar

Mitul Shingala

--Mitul Shingala--

2018
| 5 2 7
Rajkot, India
--Mitul Shingala--

Odoo Developer

Mitul Shingala
3/13/19, 5:11 AM

Hello,

try like below code

@api.multi    
@api.onchange('regulation')
def onchange_get_faileddata(self):
        stud_list = []
        stud_obj = self.env['faileddata.form']
        for rec in self:           
            if rec.regulation:               
                stud_list += [(0, 0, {'subject_code': stu.sub_code,
                                     'subject_name': stu.sub_name,'subject_type':stu.sub_type}) for stu in stud_obj.search([('regulation', '=', rec.regulation.id),])]                    
        rec.supply_data = stud_list

 

Ask a Question
Tag
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