[FIX] account: duplicate journal should not use the same bank account

There is several override of create and write that assumes that a bank account
is present on only one account (see 4530e5d).
It is very hard to change or remove the account bank once linked to a journal
(see 4a65bc38) so it should not be set in the first place when duplicating a
journal.

opw-676374
This commit is contained in:
Martin Trigaux
2016-05-19 12:14:58 +02:00
parent 80200333fc
commit 1def9911df
+1 -1
View File
@@ -251,7 +251,7 @@ class AccountJournal(models.Model):
loss_account_id = fields.Many2one('account.account', string='Loss Account', domain=[('deprecated', '=', False)], help="Used to register a loss when the ending balance of a cash register differs from what the system computes")
# Bank journals fields
bank_account_id = fields.Many2one('res.partner.bank', string="Bank Account", ondelete='restrict')
bank_account_id = fields.Many2one('res.partner.bank', string="Bank Account", ondelete='restrict', copy=False)
display_on_footer = fields.Boolean("Show in Invoices Footer", help="Display this bank account on the footer of printed documents like invoices and sales orders.")
bank_statements_source = fields.Selection([('manual', 'Record Manually')], string='Bank Feeds')
bank_acc_number = fields.Char(related='bank_account_id.acc_number')