Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2565 Visualizzazioni

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



 

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
nov 24
19856
1
set 23
2726
3
mag 23
5381
7
apr 23
48664
1
dic 22
7561