diff --git a/addons/account_voucher/wizard/account_statement_from_invoice.py b/addons/account_voucher/wizard/account_statement_from_invoice.py index ebbc12d28d6..4851c994288 100644 --- a/addons/account_voucher/wizard/account_statement_from_invoice.py +++ b/addons/account_voucher/wizard/account_statement_from_invoice.py @@ -51,8 +51,8 @@ class account_statement_from_invoice_lines(osv.osv_memory): currency_obj = self.pool.get('res.currency') voucher_obj = self.pool.get('account.voucher') voucher_line_obj = self.pool.get('account.voucher.line') - line_date = time.strftime('%Y-%m-%d') statement = statement_obj.browse(cr, uid, statement_id, context=context) + line_date = statement.date # for each selected move lines for line in line_obj.browse(cr, uid, line_ids, context=context): diff --git a/openerp/addons/base/ir/ir_model.py b/openerp/addons/base/ir/ir_model.py index 25529d648d1..10cb7d210ce 100644 --- a/openerp/addons/base/ir/ir_model.py +++ b/openerp/addons/base/ir/ir_model.py @@ -998,7 +998,7 @@ class ir_model_data(osv.osv): if action_id and res_id: model_obj.write(cr, uid, [res_id], values, context=context) - self.write(cr, uid, [action_id], { + self.write(cr, SUPERUSER_ID, [action_id], { 'date_update': time.strftime('%Y-%m-%d %H:%M:%S'), },context=context) elif res_id: @@ -1008,14 +1008,14 @@ class ir_model_data(osv.osv): for table in model_obj._inherits: inherit_id = model_obj.browse(cr, uid, res_id,context=context)[model_obj._inherits[table]] - self.create(cr, uid, { + self.create(cr, SUPERUSER_ID, { 'name': xml_id + '_' + table.replace('.', '_'), 'model': table, 'module': module, 'res_id': inherit_id.id, 'noupdate': noupdate, },context=context) - self.create(cr, uid, { + self.create(cr, SUPERUSER_ID, { 'name': xml_id, 'model': model, 'module':module, @@ -1030,14 +1030,14 @@ class ir_model_data(osv.osv): for table in model_obj._inherits: inherit_id = model_obj.browse(cr, uid, res_id,context=context)[model_obj._inherits[table]] - self.create(cr, uid, { + self.create(cr, SUPERUSER_ID, { 'name': xml_id + '_' + table.replace('.', '_'), 'model': table, 'module': module, 'res_id': inherit_id.id, 'noupdate': noupdate, },context=context) - self.create(cr, uid, { + self.create(cr, SUPERUSER_ID, { 'name': xml_id, 'model': model, 'module': module,