Odoo Help

0

Is it possible to pass list or dict in on_change function from xml?

By
Moin
on 4/10/13, 8:03 AM 931 views

I ofcourse tried to pass a dict as follows with no luck:

<field name="continent_id" on_change="onchange_continent({'item1':1, 'item2':2}, continent_id)"/>

.py file:

def onchange_continent(self, cr, uid, id, testDict, continent_id=None, context=None):
    print testDict

but this throws an error:

Error: Could not get field with name '{'item1':1' for onchange 'onchange_continent({'item1':1, 'item2':2}, continent_id)'

where is the code for parsing the on_change function, maybe I can edit that for our module?

Thank You.

0
Francesco OpenCode
On 4/10/13, 8:12 AM

No, you can't do this.

About This Community

This platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)

Stats

Asked: 4/10/13, 8:03 AM
Seen: 931 times
Last updated: 3/16/15, 8:10 AM