POS Order: make payment doesn't register 'payment date'

Asked by charlee.papah

OpenERP v6 - POS Module

When making payment of POS order the 'payment date' is not registered.

Question information

Language:
English Edit question
Status:
Answered
For:
Odoo Addons (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
charlee.papah (n-hartmann) said :
#1

This is always true (even for admin). Any clues?

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) said :
#2

Hello Charlee.papah,

This is a bug, I fixed it. please see below code.

Thanks,
Bipin Rathod,
SerpentCS.
______________________________________________________________________________________
=== modified file 'point_of_sale/point_of_sale.py'
--- point_of_sale/point_of_sale.py 2011-06-02 05:14:55 +0000
+++ point_of_sale/point_of_sale.py 2013-05-17 14:17:28 +0000
@@ -252,9 +252,11 @@
                                            method=True,
                                            string='Validation Date',
                                            type='date', select=True, store=True),
- 'date_payment': fields.function(_get_date_payment2, method=True,
- string='Payment Date',
- type='date', select=True, store=True),
+# 'date_payment': fields.function(_get_date_payment2,
+# method=True,
+# string='Payment Date',
+# type='date', select=True, store=True),
+ 'date_payment': fields.date('Payment Date', readonly=True),
         'date_validity': fields.date('Validity Date', required=True),
         'user_id': fields.many2one('res.users', 'Connected Salesman', help="Person who uses the the cash register. It could be a reliever, a student or an interim employee."),
         'user_salesman_id': fields.many2one('res.users', 'Cashier', required=True, help="User who is logged into the system."),

=== modified file 'point_of_sale/wizard/pos_payment.py'
--- point_of_sale/wizard/pos_payment.py 2011-01-20 13:59:52 +0000
+++ point_of_sale/wizard/pos_payment.py 2013-05-17 14:17:02 +0000
@@ -170,7 +170,7 @@
                 if context.get('return', False):
                     order_obj.write(cr, uid, [active_id], {'state':'done'}, context=context)
                 else:
- order_obj.write(cr, uid, [active_id], {'state':'paid'}, context=context)
+ order_obj.write(cr, uid, [active_id], {'state':'paid','date_payment':data['payment_date']}, context=context)
                 return self.print_report(cr, uid, ids, context=context)

         context.update({'flag': True})

Can you help with this problem?

Provide an answer of your own, or ask charlee.papah for more information if necessary.

To post a message you must log in.