From 350cfd98b11acdd6ea3b80d7c6f6edb2299b4fe0 Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Thu, 18 Mar 2010 23:39:22 +0530 Subject: [PATCH] [FIX]: review file bzr revid: mga@mga-20100318180922-yngpo2zhwqjnqz9j --- addons/point_of_sale/wizard/pos_details.py | 34 ++++++++++------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/addons/point_of_sale/wizard/pos_details.py b/addons/point_of_sale/wizard/pos_details.py index bc59954104d..512e4f7b5a7 100644 --- a/addons/point_of_sale/wizard/pos_details.py +++ b/addons/point_of_sale/wizard/pos_details.py @@ -30,32 +30,30 @@ class pos_details(osv.osv_memory): _description = 'Order Details' _columns = { - 'date_start': fields.date('Date Start',), - 'date_end': fields.date('Date End'), + 'date_start': fields.date('Date Start'), + 'date_end': fields.date('Date End'), } - def print_report(self, cr, uid, ids, context=None): - + def print_report(self, cr, uid, ids, context={}): """ - @summary: To get the date and print the report - @param self: The object pointer. - @param cr: A database cursor - @param uid: ID of the user currently logged in - @param context: A standard dictionary - @return : retrun report - """ - datas = {'ids' : context.get('active_ids',[])} - res = self.read(cr, uid, ids, ['date_start','date_end']) + To get the date and print the report + @param self: The object pointer. + @param cr: A database cursor + @param uid: ID of the user currently logged in + @param context: A standard dictionary + @return : retrun report + """ + + datas = {'ids' : context.get('active_ids', [])} + res = self.read(cr, uid, ids, ['date_start','date_end'], context) res = res and res[0] or {} datas['form'] = res return { - 'type' : 'ir.actions.report.xml', - 'report_name':'pos.details', - 'datas' : datas, + 'type':'ir.actions.report.xml', + 'report_name':'pos.details', + 'datas':datas, } - pos_details() - # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: