diff --git a/addons/point_of_sale/pos_report.xml b/addons/point_of_sale/pos_report.xml index 9cb5cc39586..bf569ed759f 100644 --- a/addons/point_of_sale/pos_report.xml +++ b/addons/point_of_sale/pos_report.xml @@ -1,53 +1,53 @@ - - + + - + - + - + - + - + diff --git a/addons/point_of_sale/pos_wizard.xml b/addons/point_of_sale/pos_wizard.xml index afef00eb17f..34a4d345637 100644 --- a/addons/point_of_sale/pos_wizard.xml +++ b/addons/point_of_sale/pos_wizard.xml @@ -1,33 +1,33 @@ - + - + - + - + - + - + - + - + - + - + - + diff --git a/addons/point_of_sale/report/pos_invoice.py b/addons/point_of_sale/report/pos_invoice.py index 314e627ab6f..a3ac7b39318 100644 --- a/addons/point_of_sale/report/pos_invoice.py +++ b/addons/point_of_sale/report/pos_invoice.py @@ -22,12 +22,9 @@ import time from report import report_sxw -from osv import osv -from tools.translate import _ class pos_invoice(report_sxw.rml_parse): - def __init__(self, cr, uid, name, context): super(pos_invoice, self).__init__(cr, uid, name, context) self.localcontext.update({ @@ -36,26 +33,19 @@ class pos_invoice(report_sxw.rml_parse): def preprocess(self, objects, data, ids): super(pos_invoice, self).preprocess(objects, data, ids) - iids = [] - nids = [] - for order in objects: - order.write({'nb_print': order.nb_print + 1}) + post_objects = [] + for obj in objects: + if obj.invoice_id: + post_objects.append(obj.invoice_id) - if order.invoice_id and order.invoice_id not in iids: - if not order.invoice_id: - raise osv.except_osv(_('Error !'), _('Please create an invoice for this sale.')) - iids.append(order.invoice_id) - nids.append(order.invoice_id.id) - self.cr.commit() - data['ids'] = nids - self.datas = data - self.ids = nids - self.objects = iids - self.localcontext['data'] = data - self.localcontext['objects'] = iids + #self.localcontext['objects'] = objects + self.localcontext['objects'] = post_objects -report_sxw.report_sxw('report.pos.invoice', 'pos.order', 'addons/libeurop/report/invoice.rml', parser= pos_invoice) -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: +report_sxw.report_sxw( + 'report.pos.invoice', + 'pos.order', + 'addons/point_of_sale/report/pos_invoice.rml', + parser=pos_invoice) diff --git a/addons/point_of_sale/wizard/__init__.py b/addons/point_of_sale/wizard/__init__.py index ecf27f5ceb7..89a8f8eab3e 100644 --- a/addons/point_of_sale/wizard/__init__.py +++ b/addons/point_of_sale/wizard/__init__.py @@ -28,5 +28,6 @@ import wizard_confirm import wizard_discount import wizard_get_sale import wizard_scan_product -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: + +from wizard import except_wizard diff --git a/addons/point_of_sale/wizard/wizard_refund_order.py b/addons/point_of_sale/wizard/wizard_refund_order.py index f8972ce3618..3caaf127486 100644 --- a/addons/point_of_sale/wizard/wizard_refund_order.py +++ b/addons/point_of_sale/wizard/wizard_refund_order.py @@ -91,5 +91,4 @@ class refund_order(wizard.interface): } refund_order('pos.refund_order') -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: