[REPORT] ~pos.receipt: client name and mobile
[burette/bikecoop_l10n_fr.git] / wizard / pos_receipt.py
diff --git a/wizard/pos_receipt.py b/wizard/pos_receipt.py
new file mode 100644 (file)
index 0000000..a1e0fc5
--- /dev/null
@@ -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,
+        }