diff --git a/addons/account/wizard/account_statement_from_invoice.py b/addons/account/wizard/account_statement_from_invoice.py index 65657f33787..c576fe2d1fd 100644 --- a/addons/account/wizard/account_statement_from_invoice.py +++ b/addons/account/wizard/account_statement_from_invoice.py @@ -47,8 +47,8 @@ class account_statement_from_invoice_lines(osv.osv_memory): statement_obj = self.pool.get('account.bank.statement') statement_line_obj = self.pool.get('account.bank.statement.line') currency_obj = self.pool.get('res.currency') - 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 7e13a9fa9fb..e71cf71e8a9 100644 --- a/openerp/addons/base/ir/ir_model.py +++ b/openerp/addons/base/ir/ir_model.py @@ -1048,7 +1048,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: @@ -1058,14 +1058,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, @@ -1080,14 +1080,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,