mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[IMP] Use mapped method
This commit is contained in:
@@ -26,7 +26,6 @@ class AccountBankStatement(models.Model):
|
||||
@api.multi
|
||||
def button_confirm_bank(self):
|
||||
res = super(AccountBankStatement, self).button_confirm_bank()
|
||||
for st in self:
|
||||
for st_line in st.line_ids:
|
||||
st_line.journal_entry_id.state = 'draft'
|
||||
entries = self.mapped('line_ids.journal_entry_id')
|
||||
entries.write({'state': 'draft'})
|
||||
return res
|
||||
|
||||
Reference in New Issue
Block a user