[FIX] Fixed sidebar padding problem
[odoo/odoo.git] / addons / account_payment / account_invoice.py
index 9a45ae2..fd78786 100644 (file)
@@ -19,7 +19,7 @@
 #
 ##############################################################################
 
-from mx import DateTime
+from datetime import datetime
 
 from osv import fields, osv
 
@@ -36,13 +36,13 @@ class Invoice(osv.osv):
             if invoice.move_id:
                 for line in invoice.move_id.line_id:
                     if not line.date_maturity or \
-                            DateTime.strptime(line.date_maturity, '%Y-%m-%d') \
-                            < DateTime.now():
+                            datetime.strptime(line.date_maturity, '%Y-%m-%d') \
+                            < datetime.today():
                         res[invoice.id] += line.amount_to_pay
         return res
 
     _columns = {
-        'amount_to_pay': fields.function(_amount_to_pay, method=True,
+        'amount_to_pay': fields.function(_amount_to_pay,
             type='float', string='Amount to be paid',
             help='The amount which should be paid at the current date\n' \
                     'minus the amount which is already in payment order'),