Skip to content

Commit

Permalink
Add line to reconcile payment
Browse files Browse the repository at this point in the history
  • Loading branch information
felipepaloschi committed Sep 12, 2018
1 parent 08b45f3 commit ffbe165
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions br_account_payment/models/account_payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def _create_payment_entry(self, amount):
self.payment_difference, self.currency_id,
self.company_id.currency_id)[2:]

if counterpart_debit > 0:
if counterpart_debit > 0:
debit_wo = abs(self.payment_difference)
credit_wo = 0.0
amount_currency_wo = abs(amount_currency_wo)
Expand Down Expand Up @@ -83,10 +83,11 @@ def _create_payment_entry(self, amount):
liquidity_aml_dict.update(self._get_liquidity_move_line_vals(-amount))
aml_obj.create(liquidity_aml_dict)

(self.move_line_id + counterpart_aml).reconcile()

move.post()
return move


@api.depends('partner_id', 'partner_type')
def _compute_open_moves(self):
for item in self:
Expand Down

0 comments on commit ffbe165

Please sign in to comment.