How to get wizard id in onchange method? Do you know some trick to do this? I searched for examples in standard modules but without answer.
class some_wizard(osv.osv_memory):
_columns = {
'some_string': fields.char('Some string', size=256),
}
def default_get(self, cr, uid, fields, context=None):
ret = super(some_wizard,self).default_get(cr, uid, fields, context=context)
print 'default_get', ret, context
# 'default_get'
# ret: []
# context: {'lang': 'en_US', 'tz': 'Europe/Brussels', 'uid': 1}
return ret
def onchange_some_string(self, cr, uid, ids, some_string=None, context=None):
print ids, context
# context : {'lang': 'en_US', 'tz': 'Europe/Brussels', 'uid': 1}
# ids: []
return {}
<record id="" model="ir.ui.view">
<field name="name"></field>
<field name="model"></field>
<field name="arch" type="xml">
<form string="some_string" version="7.0">
<group>
<field name="some_string" on_change="onchange_some_string(some_string,context)" />
</group>
<footer>
or
<button string="Cancel" class="oe_link" special="cancel" />
</footer>
</form>
</field>
</record>