Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Error when saving items from within the notebook view

By
Yakito
on 6/20/13, 6:12 PM 506 views

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.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 6/20/13, 6:12 PM
Seen: 506 times
Last updated: 3/16/15, 8:10 AM