Odoo Help


set field default value dynamic form

on 11/5/13, 4:40 PM 1,641 views

I generate dynamic form through the fields_view_get method.

I set the fields['arch'] with the form xml content.

The displays form OK, but I would like to give default value to:

  <field context=\"{'some_value':self}\" name='some_value' />

This (some_value) is a char field in osv.osv_memory

If I do this (after setting fields['arch']) to set default value:

result['fields']['some_value']={'string':'Some Value Field','type':'char','required':False,'default':'blah'}

...this doesn't work

Thanks for any suggestions.

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.


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)


Asked: 11/5/13, 4:40 PM
Seen: 1641 times
Last updated: 3/31/15, 11:38 PM