diff --git a/account_advanced_reconcile/base_advanced_reconciliation.py b/account_advanced_reconcile/base_advanced_reconciliation.py
index 299ffab2..df26708c 100644
--- a/account_advanced_reconcile/base_advanced_reconciliation.py
+++ b/account_advanced_reconcile/base_advanced_reconciliation.py
@@ -263,11 +263,11 @@ class easy_reconcile_advanced(AbstractModel):
lines_by_id = dict([(l['id'], l) for l in credit_lines + debit_lines])
for reconcile_group_ids in reconcile_groups:
group_lines = [lines_by_id[lid] for lid in reconcile_group_ids]
- reconciled, partial = self._reconcile_lines(
+ reconciled, full = self._reconcile_lines(
cr, uid, rec, group_lines, allow_partial=True, context=context)
- if reconciled and partial:
+ if reconciled and full:
reconciled_ids += reconcile_group_ids
- elif partial:
+ elif reconciled:
partial_reconciled_ids += reconcile_group_ids
return reconciled_ids, partial_reconciled_ids
diff --git a/account_advanced_reconcile/easy_reconcile_view.xml b/account_advanced_reconcile/easy_reconcile_view.xml
index c5e81ebd..961add68 100644
--- a/account_advanced_reconcile/easy_reconcile_view.xml
+++ b/account_advanced_reconcile/easy_reconcile_view.xml
@@ -8,9 +8,11 @@
-
-
diff --git a/account_statement_base_completion/__openerp__.py b/account_statement_base_completion/__openerp__.py
index d9f61447..384f7b73 100644
--- a/account_statement_base_completion/__openerp__.py
+++ b/account_statement_base_completion/__openerp__.py
@@ -59,6 +59,7 @@
'statement_view.xml',
'partner_view.xml',
'data.xml',
+ 'security/ir.model.access.csv',
],
'demo_xml': [],
'test': [],
diff --git a/account_statement_base_completion/security/ir.model.access.csv b/account_statement_base_completion/security/ir.model.access.csv
new file mode 100644
index 00000000..4fb32325
--- /dev/null
+++ b/account_statement_base_completion/security/ir.model.access.csv
@@ -0,0 +1,3 @@
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+access_account_bank_st_cmpl_user,account.statement.completion.rule,model_account_statement_completion_rule,account.group_account_user,1,0,0,0
+access_account_bank_st_cmpl_manager,account.statement.completion.rule,model_account_statement_completion_rule,account.group_account_manager,1,1,1,1
diff --git a/account_statement_base_completion/statement_view.xml b/account_statement_base_completion/statement_view.xml
index 5101a0b0..5153a40b 100644
--- a/account_statement_base_completion/statement_view.xml
+++ b/account_statement_base_completion/statement_view.xml
@@ -10,9 +10,6 @@
form
-
-
-
@@ -36,6 +33,19 @@
+
+ account_bank_statement_import_base.bank_statement.auto_cmpl
+ account.bank.statement
+
+ form
+
+
+
+
+
+
+
+ account.statement.profil.view
diff --git a/account_statement_base_import/statement.py b/account_statement_base_import/statement.py
index c5978dc7..abaceb2a 100644
--- a/account_statement_base_import/statement.py
+++ b/account_statement_base_import/statement.py
@@ -200,7 +200,7 @@ class AccountStatementProfil(Model):
)
# If user ask to launch completion at end of import, do it !
if prof.launch_import_completion:
- self.button_auto_completion(cursor, uid, statement_id, context)
+ statement_obj.button_auto_completion(cursor, uid, [statement_id], context)
# Write the needed log infos on profile
self.write_logs_after_import(cursor, uid, prof.id, statement_id,
diff --git a/account_statement_base_import/statement_view.xml b/account_statement_base_import/statement_view.xml
index 3ca59e4b..b3ced577 100644
--- a/account_statement_base_import/statement_view.xml
+++ b/account_statement_base_import/statement_view.xml
@@ -27,7 +27,7 @@
account_bank_statement.bank_statement.view_formaccount.bank.statement
-
+ form
diff --git a/account_statement_completion_voucher/__init__.py b/account_statement_completion_voucher/__init__.py
new file mode 100644
index 00000000..e5cfb78c
--- /dev/null
+++ b/account_statement_completion_voucher/__init__.py
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# Author: Joel Grand-Guillaume
+# Copyright 2011-2012 Camptocamp SA
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
diff --git a/account_statement_completion_voucher/__openerp__.py b/account_statement_completion_voucher/__openerp__.py
new file mode 100644
index 00000000..d01c2037
--- /dev/null
+++ b/account_statement_completion_voucher/__openerp__.py
@@ -0,0 +1,44 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# Author: Joel Grand-Guillaume
+# Copyright 2011-2012 Camptocamp SA
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
+{'name': "Bank statement extension with voucher",
+ 'version': '1.0',
+ 'author': 'Camptocamp',
+ 'maintainer': 'Camptocamp',
+ 'category': 'Finance',
+ 'complexity': 'normal', #easy, normal, expert
+ 'depends': ['account_statement_base_completion','account_voucher'],
+ 'description': """
+ This module is only needed when using account_statement_base_completion with voucher in order adapt the view correctly.
+ """,
+ 'website': 'http://www.camptocamp.com',
+ 'init_xml': [],
+ 'update_xml': [
+ "statement_view.xml",
+ ],
+ 'demo_xml': [],
+ 'test': [],
+ 'installable': True,
+ 'images': [],
+ 'auto_install': True,
+ 'license': 'AGPL-3',
+ 'active': False,
+}
diff --git a/account_statement_completion_voucher/statement_view.xml b/account_statement_completion_voucher/statement_view.xml
new file mode 100644
index 00000000..5ed68ffd
--- /dev/null
+++ b/account_statement_completion_voucher/statement_view.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+ account_bank_statement_import_base.bank_statement.auto_cmpl
+ account.bank.statement
+
+ form
+
+
+
+
+
+
+
+
+
+
+
diff --git a/account_statement_ext/__openerp__.py b/account_statement_ext/__openerp__.py
index 4e2a5563..a1323044 100644
--- a/account_statement_ext/__openerp__.py
+++ b/account_statement_ext/__openerp__.py
@@ -72,6 +72,7 @@
'statement_view.xml',
'report/bank_statement_webkit_header.xml',
'report.xml',
+ 'security/ir.model.access.csv',
],
'demo_xml': [],
'test': [],
diff --git a/account_statement_ext/security/ir.model.access.csv b/account_statement_ext/security/ir.model.access.csv
new file mode 100644
index 00000000..8164447d
--- /dev/null
+++ b/account_statement_ext/security/ir.model.access.csv
@@ -0,0 +1,3 @@
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+access_account_bank_st_profile_user,account.statement.profil,model_account_statement_profil,account.group_account_user,1,0,0,0
+access_account_bank_st_profile_manager,account.statement.profil,model_account_statement_profil,account.group_account_manager,1,1,1,1
diff --git a/account_statement_ext/statement.py b/account_statement_ext/statement.py
index 7cfe1c85..b35ebc95 100644
--- a/account_statement_ext/statement.py
+++ b/account_statement_ext/statement.py
@@ -515,6 +515,9 @@ class AccountBankSatementLine(Model):
periods = self.pool.get('account.period').find(cursor, user, dt=date)
return periods and periods[0] or False
+ def _get_default_account(self, cursor, user, context=None):
+ return self.get_values_for_line(cursor, user, context = context)['account_id']
+
_columns = {
# Set them as required + 64 char instead of 32
'ref': fields.char('Reference', size=64, required=True),
@@ -522,6 +525,7 @@ class AccountBankSatementLine(Model):
}
_defaults = {
'period_id': _get_period,
+ 'account_id': _get_default_account,
}
def get_values_for_line(self, cr, uid, profile_id = False, partner_id = False, line_type = False, amount = False, context = None):
diff --git a/account_statement_ext/statement_view.xml b/account_statement_ext/statement_view.xml
index 606fd7d4..c9590965 100644
--- a/account_statement_ext/statement_view.xml
+++ b/account_statement_ext/statement_view.xml
@@ -139,12 +139,11 @@
-
-
+
-
+