Skip to content

Commit

Permalink
[FIX] account_payment_group: proper manage counterpart_aml_dicts (#163)
Browse files Browse the repository at this point in the history
counterpart_aml_dicts is a list of dictionaries, for that reason when we
try to iterate in this value, we need to set as  [{}] when this one does
not came in the context, so when we iterate we can be able to manage
the dict info.
  • Loading branch information
zaoral authored and jjscarafia committed Oct 12, 2019
1 parent dd7b2c5 commit 3fca815
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions account_payment_group/models/account_payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def get_amls(self):
'counterpart_aml_dicts', 'new_aml_dicts', 'payment_aml_rec')
:return: account move line recorset
"""
counterpart_aml_data = self._context.get('counterpart_aml_dicts', [])
counterpart_aml_data = self._context.get('counterpart_aml_dicts', [{}])
new_aml_data = self._context.get('new_aml_dicts', [])
amls = self.env['account.move.line']
if counterpart_aml_data:
Expand Down Expand Up @@ -260,7 +260,7 @@ def create(self, vals):
# Si viene counterpart_aml entonces estamos viniendo de una
# conciliacion desde el wizard
new_aml_dicts = self._context.get('new_aml_dicts', [])
counterpart_aml_data = self._context.get('counterpart_aml_dicts', [])
counterpart_aml_data = self._context.get('counterpart_aml_dicts', [{}])
if counterpart_aml_data or new_aml_dicts:
vals.update(self.infer_partner_info(vals))

Expand Down

0 comments on commit 3fca815

Please sign in to comment.