diff --git a/account_statement_base_import/statement.py b/account_statement_base_import/statement.py
index d8d4c9ce..c6914dad 100644
--- a/account_statement_base_import/statement.py
+++ b/account_statement_base_import/statement.py
@@ -43,7 +43,6 @@ class AccountStatementProfil(Model):
help="Tic that box to automatically launch the completion "
"on each imported file using this profile."),
'last_import_date': fields.datetime("Last Import Date"),
- 'rec_log': fields.text('log', readonly=True),
'import_type': fields.selection(
get_import_type_selection,
'Type of import',
@@ -55,29 +54,17 @@ class AccountStatementProfil(Model):
def write_logs_after_import(self, cr, uid, ids, statement_id, num_lines, context):
"""
- Write the log in the logger + in the log field of the profile to report the user about
- what has been done.
+ Write the log in the logger
:param int/long statement_id: ID of the concerned account.bank.statement
:param int/long num_lines: Number of line that have been parsed
:return: True
"""
- if isinstance(ids, (int, long)):
- ids = [ids]
- for id in ids:
- log = self.read(cr, uid, id, ['rec_log'], context=context)['rec_log']
- log_line = log and log.split("\n") or []
- import_date = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
- log_line[0:0] = [import_date + ' : '
- + _("Bank Statement ID %s have been imported with %s lines ") % (statement_id, num_lines)]
- log = "\n".join(log_line)
- self.write(cr, uid, id, {'rec_log': log, 'last_import_date': import_date}, context=context)
- self.message_post(
- cr,
- uid,
- [statement_id],
- body=_('Statement ID %s have been imported with %s lines.') % (statement_id, num_lines),
- context=context)
+ self.message_post(cr,
+ uid,
+ ids,
+ body=_('Statement ID %s have been imported with %s lines.') % (statement_id, num_lines),
+ context=context)
return True
def prepare_global_commission_line_vals(
diff --git a/account_statement_base_import/statement_view.xml b/account_statement_base_import/statement_view.xml
index cd5aadd7..cd139925 100644
--- a/account_statement_base_import/statement_view.xml
+++ b/account_statement_base_import/statement_view.xml
@@ -16,10 +16,9 @@
-
@@ -39,6 +38,6 @@
-
+
diff --git a/account_statement_ext/statement.py b/account_statement_ext/statement.py
index b77e77ca..c1eccf20 100644
--- a/account_statement_ext/statement.py
+++ b/account_statement_ext/statement.py
@@ -31,6 +31,8 @@ class AccountStatementProfil(Model):
journal to use, the partner and commision account and so on.
"""
_name = "account.statement.profile"
+ _inherit = ['mail.thread']
+
_description = "Statement Profil"
_columns = {
diff --git a/account_statement_ext/statement_view.xml b/account_statement_ext/statement_view.xml
index c89d2644..0e1e550c 100644
--- a/account_statement_ext/statement_view.xml
+++ b/account_statement_ext/statement_view.xml
@@ -18,6 +18,7 @@
+
@@ -46,10 +47,10 @@
tree,form
-
+
+
+
-
-
account.bank.statement.search
account.bank.statement
@@ -87,7 +88,7 @@
-
+
account.bank.statement.form
account.bank.statement
@@ -98,7 +99,7 @@
-
+
@@ -109,7 +110,7 @@
-
+
# Make balance visible or not depending on profile
{'invisible':[('balance_check','=',False)]}
@@ -120,11 +121,11 @@
-
+
-
+
@@ -132,7 +133,7 @@
-
+
@@ -142,18 +143,18 @@
-
+
-
+
-
+