Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2648 Vizualizări

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')



 

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
nov. 24
20124
1
sept. 23
2991
3
mai 23
5591
7
apr. 23
48933
1
dec. 22
7802