Navigation Menu

Skip to content

Commit

Permalink
[FIX]When paying, the OU of the invoice should be considered only whe…
Browse files Browse the repository at this point in the history
…n a single invoice is being paid
  • Loading branch information
AaronHForgeFlow authored and JordiBForgeFlow committed May 31, 2017
1 parent 8fffb5a commit 90641e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion account_operating_unit/models/account_payment.py
Expand Up @@ -22,7 +22,7 @@ def _compute_operating_unit_id(self):
def _get_counterpart_move_line_vals(self, invoice=False):
res = super(AccountPayment,
self)._get_counterpart_move_line_vals(invoice=invoice)
if invoice:
if len(invoice) == 1:
res['operating_unit_id'] = invoice.operating_unit_id.id or False
else:
res['operating_unit_id'] = self.operating_unit_id.id or False
Expand Down

0 comments on commit 90641e1

Please sign in to comment.