[IMP]add condition on context if its none for account and project module

bzr revid: sgo@tinyerp.com-20120605115100-sk723sr60x7twb53
This commit is contained in:
Sanjay Gohel (Open ERP) 2012-06-05 17:21:00 +05:30
parent e07d4252eb
commit dd95c3c28c
3 changed files with 3 additions and 0 deletions

View File

@ -86,6 +86,7 @@ class account_voucher(osv.osv):
Add domain 'allow_check_writting = True' on journal_id field and remove 'widget = selection' on the same
field because the dynamic domain is not allowed on such widget
"""
if not context: context = {}
res = super(account_voucher, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu)
doc = etree.XML(res['arch'])
nodes = doc.xpath("//field[@name='journal_id']")

View File

@ -46,6 +46,7 @@ class payment_order_create(osv.osv_memory):
}
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
if not context: context = {}
res = super(payment_order_create, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=False)
if context and 'line_ids' in context:
doc = etree.XML(res['arch'])

View File

@ -101,6 +101,7 @@ class project_task(osv.osv):
return True
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
if not context: context = {}
res = super(project_task,self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
search_extended = False
timebox_obj = self.pool.get('project.gtd.timebox')