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

Hello,

I am new with notebooks inside views. What I am trying to accomplish is the ability to save bank accounts inside a company view.

For that I created a Notebook with a page called Bank as follows

<notebook colspan="4">
<page string="Bank">
<field name="bank" nolabel="1" widget="one2many_list"/>
</page>
<page string="Interests">
<group>
...
</group>
</page>
</notebook>

The bank field has a many2one relationship to the accounts module like this:

'bank': fields.many2one('sim.accounts','Bank Number',ondelete='cascade')

If I create the record from within the sim.accounts module it works fine, but when I create it from the company view I get the following error

ProgrammingError: can't adapt type 'dict'

I am a little bit lost because I don't have anything name dict so I am not sure how to procede from here.

If I save the view without adding any bank information then I don't get any error, so it is clear that there is something with the way I am trying to save the bank information from within the company view.

In the ideal scenario I am trying to make the bank field behave as any many2one field were I can chose existing records or create a new one.

Any kind of tip in the right direction will be much appreciated.

아바타
취소
관련 게시물 답글 화면 활동
1
3월 15
11703
1
6월 17
4763
2
3월 15
8597
3
7월 24
2161
2
9월 23
1786