[MERGE]:lp:~openerp-dev/openobject-addons/trunk-form-fp-changes-sgo

bzr revid: apa@tinyerp.com-20120605121833-yixeouvnti1kv3f4
This commit is contained in:
Amit Patel (OpenERP) 2012-06-05 17:48:33 +05:30
commit f2477d9471
4 changed files with 4 additions and 1 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')

View File

@ -53,7 +53,7 @@ class report_webkit_actions(osv.osv_memory):
@param context: A standard dictionary
@return: New arch of view.
"""
if context is None:context={}
if not context: context = {}
res = super(report_webkit_actions, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False)
record_id = context and context.get('active_id', False) or False
active_model = context.get('active_model')