Merge remote-tracking branch 'odoo/7.0' into 7.0 7.0_community
authorOCA git bot <OCA-git-bot@therp.nl>
Tue, 25 Nov 2014 22:42:43 +0000 (23:42 +0100)
committerOCA git bot <OCA-git-bot@therp.nl>
Tue, 25 Nov 2014 22:42:43 +0000 (23:42 +0100)
addons/account/account_invoice.py
addons/project_timesheet/project_timesheet.py

index 0deaee7..f801901 100644 (file)
@@ -1825,10 +1825,10 @@ class res_partner(osv.osv):
             partner = partner.parent_id
         return partner
 
-    def copy(self, cr, uid, id, default=None, context=None):
+    def copy_data(self, cr, uid, id, default=None, context=None):
         default = default or {}
         default.update({'invoice_ids' : []})
-        return super(res_partner, self).copy(cr, uid, id, default, context)
+        return super(res_partner, self).copy_data(cr, uid, id, default=default, context=context)
 
 
 class mail_compose_message(osv.Model):
index ce92ef9..18cef11 100644 (file)
@@ -120,7 +120,9 @@ class project_work(osv.osv):
         vals_line['user_id'] = vals['user_id']
         vals_line['product_id'] = result['product_id']
         if vals.get('date'):
-            vals_line['date' ] = vals['date'][:10]
+            timestamp = datetime.datetime.strptime(vals['date'], tools.DEFAULT_SERVER_DATETIME_FORMAT)
+            ts = fields.datetime.context_timestamp(cr, uid, timestamp, context)
+            vals_line['date'] = ts.strftime(tools.DEFAULT_SERVER_DATE_FORMAT)
 
         # Calculate quantity based on employee's product's uom
         vals_line['unit_amount'] = vals['hours']