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

set field default value dynamic form

By
Drew
on 11/5/13, 4:40 PM 1,161 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.

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

0 follower(s)

Stats

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