From dd95c3c28c589cf32cea7aec068215a22ebf4e3a Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Tue, 5 Jun 2012 17:21:00 +0530 Subject: [PATCH] [IMP]add condition on context if its none for account and project module bzr revid: sgo@tinyerp.com-20120605115100-sk723sr60x7twb53 --- addons/account_check_writing/account_voucher.py | 1 + addons/account_payment/wizard/account_payment_order.py | 1 + addons/project_gtd/project_gtd.py | 1 + 3 files changed, 3 insertions(+) diff --git a/addons/account_check_writing/account_voucher.py b/addons/account_check_writing/account_voucher.py index 33fe09e783d..aa0a29d7845 100644 --- a/addons/account_check_writing/account_voucher.py +++ b/addons/account_check_writing/account_voucher.py @@ -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']") diff --git a/addons/account_payment/wizard/account_payment_order.py b/addons/account_payment/wizard/account_payment_order.py index 613b049a412..713784798fc 100644 --- a/addons/account_payment/wizard/account_payment_order.py +++ b/addons/account_payment/wizard/account_payment_order.py @@ -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']) diff --git a/addons/project_gtd/project_gtd.py b/addons/project_gtd/project_gtd.py index bec70779551..bb61617c9f7 100644 --- a/addons/project_gtd/project_gtd.py +++ b/addons/project_gtd/project_gtd.py @@ -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')