[REMOVE]: mx.Date from trunk
[odoo/odoo.git] / addons / l10n_ch / wizard / create_dta.py
index e792fe1..d3e2856 100644 (file)
@@ -31,7 +31,7 @@
 ##############################################################################
 
 import time
-import mx.DateTime
+from datetime import datetime
 import base64
 
 from osv import osv, fields
@@ -102,7 +102,6 @@ class record:
                 value = self.post[field[0]]
             else :
                 pass
-                #raise Exception(field[0]+' not found !')
             try:
                 res = res + c_ljust(value, field[1])
             except :
@@ -469,12 +468,12 @@ def _create_dta(obj, cr, uid, data, context=None):
                     'for the partner: ' + pline.partner_id.name + '\n' \
                     'on line: ' + pline.name)
 
-        if pline.order_id.date_planned:
-            date_value = mx.DateTime.strptime(pline.order_id.date_planned, '%Y-%m-%d')
+        if pline.order_id.date_scheduled:
+            date_value = datetime.strptime(pline.order_id.date_scheduled, '%Y-%m-%d')
         elif pline.date:
-            date_value = mx.DateTime.strptime(pline.date, '%Y-%m-%d')
+            date_value = datetime.strptime(pline.date, '%Y-%m-%d')
         else:
-            date_value = mx.DateTime.now()
+            date_value = datetime.now()
         v['date_value'] = date_value.strftime("%y%m%d")
 
         # si compte iban -> iban (836)