[FIX] point_of_sale: correct call to default value
authorMartin Trigaux <mat@openerp.com>
Wed, 4 Jun 2014 13:19:57 +0000 (15:19 +0200)
committerMartin Trigaux <mat@openerp.com>
Wed, 4 Jun 2014 13:19:57 +0000 (15:19 +0200)
The default value should be called with a lambda otherwise the payment_date is set to the date the server was started (opw 606715)

addons/point_of_sale/wizard/pos_payment.py

index 0a1684c..35e35e2 100644 (file)
@@ -126,7 +126,7 @@ class pos_make_payment(osv.osv_memory):
     }
     _defaults = {
         'journal_id' : _default_journal,
-        'payment_date': time.strftime('%Y-%m-%d %H:%M:%S'),
+        'payment_date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
         'amount': _default_amount,
     }