mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[IMP] Fixes lp:1223834 in case of insert. Batch updates remains error prone. It would be safer to call the update method from the orm for records updating 'complex' fields.
A new completion rule based on the bank account number is also provided by the proposal. About modules dependencies. The module 'account_statement_base_import' depends of 'account_statement_base_completion' but the file statement.py of 'account_statement_base_completion' at line 513 call the method _update_line defined in 'account_statement_base_import'. Since the 'AccountStatementLine' is defined in both addons, I've the feeling that we can merge the two overrides in 'account_statement_base_completion'.
This commit is contained in:
committed by
Joel Grand-Guillaume
commit
3d9296ab35
@@ -571,7 +571,11 @@ class AccountBankSatementLine(Model):
|
||||
if context is None:
|
||||
context = {}
|
||||
date = context.get('date')
|
||||
periods = self.pool.get('account.period').find(cr, uid, dt=date)
|
||||
try:
|
||||
periods = self.pool.get('account.period').find(cr, uid, dt=date)
|
||||
except osv.except_osv:
|
||||
# if no period defined, we are certainly at installation time
|
||||
return False
|
||||
return periods and periods[0] or False
|
||||
|
||||
def _get_default_account(self, cr, uid, context=None):
|
||||
|
||||
Reference in New Issue
Block a user