[FIX] orm: pass context if widget selection in __view_look_dom method
bzr revid: hmo@tinyerp.com-20100209051214-qlsi5ld42y8srtu5
This commit is contained in:
parent
c5a3905c8b
commit
c2ac394eae
|
@ -78,7 +78,7 @@
|
|||
<form string="Users">
|
||||
<notebook colspan="4">
|
||||
<page string="Current Activity">
|
||||
<field name="company_id" widget="selection" readonly="0"/>
|
||||
<field name="company_id" widget="selection" readonly="0" context="{'prefence_company':True}"/>
|
||||
<newline/>
|
||||
<separator colspan="4" string="Preferences"/>
|
||||
</page>
|
||||
|
|
|
@ -1076,6 +1076,7 @@ class orm_template(object):
|
|||
if column._domain and not isinstance(column._domain, (str, unicode)):
|
||||
dom = column._domain
|
||||
dom += eval(node.get('domain','[]'), {'uid':user, 'time':time})
|
||||
context.update(eval(node.get('context','{}')))
|
||||
attrs['selection'] = self.pool.get(relation).name_search(cr, user, '', dom, context=context)
|
||||
if (node.get('required') and not int(node.get('required'))) or not column.required:
|
||||
attrs['selection'].append((False,''))
|
||||
|
|
Loading…
Reference in New Issue