Odoo Help


Update field lable using onchange function bug

on 9/1/15, 7:03 AM 1,075 views

Dear Friends,

               I would like to change field label(string) while onchange many2one field. I have configured few items in that object. I could not use fields_view_get. While i onchange i am able to update field string but is not reflected in the view.

def onchange_ini_temp_id(self, cr, uid, ids, initiative_category_id, context=None):

val = {}





res = super(project_project, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu)

fields = res.get('fields', {})

doc = etree.XML(res['arch'])

for node in doc.xpath("//field[@name='release']"):

node.set('invisible', "0")

node.set('string', 'Test Data')

setup_modifiers(node, res['fields']['release'])

res['arch'] = etree.tostring(doc)

self.fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False)

return res

Thank you

Somewhere odoo had limits too. but you can create two view with each unique label and then pass right view on action, but with on_change to fix, forget odoo people support on this. After odoo 7, they left odoo community and users. Now odoo is buggy stable.

on 9/1/15, 8:35 AM

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

1 follower(s)


Asked: 9/1/15, 7:03 AM
Seen: 1075 times
Last updated: 9/1/15, 8:35 AM