X-Git-Url: https://git.cyclocoop.org/?p=burette%2Fbikecoop_l10n_fr.git;a=blobdiff_plain;f=wizard%2Fpos_receipt.py;fp=wizard%2Fpos_receipt.py;h=a1e0fc5c547aebad688d14709c4130a23091ddbf;hp=0000000000000000000000000000000000000000;hb=e3a28836abc2a8203f8a5b3bf70ce41c32c7b65a;hpb=ed4edcf88d99b21586818116c84c915cdc68c21c diff --git a/wizard/pos_receipt.py b/wizard/pos_receipt.py new file mode 100644 index 0000000..a1e0fc5 --- /dev/null +++ b/wizard/pos_receipt.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- + +from openerp.osv import orm + + +class print_report(orm.Model): + _inherit = 'pos.receipt' + + def print_report(self, cr, uid, ids, context=None): + """ + 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 + """ + if context is None: + context = {} + datas = {'ids': context.get('active_ids', [])} + return { + 'type': 'ir.actions.report.xml', + 'report_name': 'bikecoop_l10n_fr.receipt', + 'datas': datas, + }