Skip to content

Commit

Permalink
[FIX] account: fix _compute_parent_state() if called on more than 1 r…
Browse files Browse the repository at this point in the history
…ecord

Was PR#20479. Courtesy of Vauxoo
  • Loading branch information
hbto authored and qdp-odoo committed Nov 7, 2017
1 parent e6d4bdf commit 99989ad
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions addons/account/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,8 @@ def _compute_tax_base_amount(self):

@api.depends('move_id')
def _compute_parent_state(self):
for record in self:
if record.move_id:
self.parent_state = self.move_id.state
for record in self.filtered('move_id'):
record.parent_state = record.move_id.state

@api.one
@api.depends('move_id.line_ids')
Expand Down

0 comments on commit 99989ad

Please sign in to comment.