[REF] account_id is not anymore mandatory for creating a bank statement line. Still mandatory for the validation

This commit is contained in:
Sebastien Beau
2013-12-04 14:53:03 +01:00
parent e33044d520
commit 33dc39874b
3 changed files with 44 additions and 6 deletions

View File

@@ -103,12 +103,6 @@ class AccountStatementProfil(Model):
statement_obj = self.pool.get('account.bank.statement')
values = parser_vals
values['statement_id'] = statement_id
values['account_id'] = statement_obj.get_account_for_counterpart(cr,
uid,
parser_vals['amount'],
account_receivable,
account_payable)
date = values.get('date')
period_memoizer = context.get('period_memoizer')
if not period_memoizer:
@@ -214,3 +208,12 @@ class AccountStatementProfil(Model):
raise osv.except_osv(_("Statement import error"),
_("The statement cannot be created: %s") % st)
return statement_id
class AccountBankStatementLine(orm.Model):
_inherit = "account.bank.statement.line"
_columns = {
'account_id': fields.many2one('account.account','Account'),
}