Skip to content

Commit

Permalink
[13.0] [IMP] public_budget: In the remit, add, together with the fath…
Browse files Browse the repository at this point in the history
…er, the children of the record that are found at the remit location.
  • Loading branch information
nicomacr authored and jjscarafia committed Mar 27, 2021
1 parent 5efbe79 commit 6016d5a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions public_budget/models/remit.py
Expand Up @@ -148,3 +148,9 @@ def create(self, vals):
ir_sequence_date=vals.get('date', fields.Date.today())).next_by_code(
'public_budget.remit') or '/'
return super().create(vals)

@api.onchange('expedient_ids')
def _onchange_expedient_ids(self):
if self.expedient_ids and self.expedient_ids.mapped('child_ids'):
self.expedient_ids |= self.expedient_ids.mapped('child_ids').filtered(
lambda x: x.current_location_id == self.location_id)

0 comments on commit 6016d5a

Please sign in to comment.