mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[IMP] log code cleanup
This commit is contained in:
@@ -445,15 +445,12 @@ class AccountBankSatement(orm.Model):
|
|||||||
log = self.read(cr, uid, stat_id, ['completion_logs'],
|
log = self.read(cr, uid, stat_id, ['completion_logs'],
|
||||||
context=context)['completion_logs']
|
context=context)['completion_logs']
|
||||||
|
|
||||||
log_line = log and log.split("\n") or []
|
|
||||||
completion_date = datetime.datetime.now().strftime(DEFAULT_SERVER_DATETIME_FORMAT)
|
completion_date = datetime.datetime.now().strftime(DEFAULT_SERVER_DATETIME_FORMAT)
|
||||||
if error_msg:
|
if error_msg:
|
||||||
error_log = error_msg
|
error_log = error_msg
|
||||||
log_line[0:0] = [completion_date + ' : '
|
message = (_(u"%s Bank Statement ID %s has %s lines completed by %s \n%s\n") %
|
||||||
+ _("Bank Statement ID %s has %s lines completed by %s") %
|
(completion_date, stat_id, number_imported, user_name, error_log))
|
||||||
(stat_id, number_imported, user_name)
|
log = message + log
|
||||||
+ "\n" + error_log + "-------------" + "\n"]
|
|
||||||
log = "\n".join(log_line)
|
|
||||||
self.write(cr, uid, [stat_id], {'completion_logs': log}, context=context)
|
self.write(cr, uid, [stat_id], {'completion_logs': log}, context=context)
|
||||||
|
|
||||||
body = (_('Statement ID %s auto-completed for %s lines completed') %
|
body = (_('Statement ID %s auto-completed for %s lines completed') %
|
||||||
|
|||||||
Reference in New Issue
Block a user