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

Hello Team

I new in development OpenERP and I have an issue with onchange in view Form. Version OpenERP 7.0

  1. I create a new table/model -> "x_ref.interna" with some fields and I link with sale.order object.
  2. I modify sale.order.form with: ... .... <field name="x_name" on_change="onchange_cirugia_id(x_name, context)" widget="selection"/>
    .... ....
  3. I modify sale.py in addons/sale with the following code:

    def onchange_cirugia_id(self, cr, uid, ids, x_name_id, context=None): val = {} if x_name_id: cirugia = self.pool.get('x_ref.interna').browse(cr, uid, x_name_id, context=context) val['x_paciente'] = cirugia.x_paciente return {'value': val}

  4. I restart openerp server and when I try to create a new sales order I receive the following error in sale.order.form

File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 187, in execute_cr return getattr(object, method)(cr, uid, args, *kw) File "/usr/lib/pymodules/python2.7/openerp/addons/sale/sale.py", line 342, in onchange_cirugia_id

TypeError: cannot concatenate 'str' and 'int' objects

Can you help me about this problem?

Thanks in advance

아바타
취소
관련 게시물 답글 화면 활동
1
6월 23
2604
1
4월 23
11767
1
1월 23
2630
1
6월 22
2977
2
8월 20
9642