i am trying to do getting the values from one menu item of tree view into another menuitem of tree view.but didnot get that can anybody help me
py file:
@api.multi
@api.onchange('regulation')
def onchange_get_faileddata(self):
stud_list = []
stud_obj = self.env['regulardata.form']
for rec in self:
if rec.regulation:
stud_list = [{'subject_code': stu.sub_code,'subject_name': stu.name,'subject_type':stu.sub_type}
for stu in stud_obj.search([('course_id','=',rec.course_id),('year', '=',rec.year),('semester_id','=', rec.semester_id), ])]
rec.regular_data = stud_list #its not working
class regularregistration(models.Model):
_name='page.regular'
_description='Regular registration'
_inherit = 'regular.single'
subject_code = fields.Char('Subject Code')
subject_name = fields.Char('Subject Name')
subject_type = fields.Char('Subject Type')
regular_data1=fields.Many2one('regular.single','regulardata')