콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2869 화면

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



 

아바타
취소
관련 게시물 답글 화면 활동
1
11월 24
20855
1
9월 23
3659
3
5월 23
6262
7
4월 23
49637
1
12월 22
8330