Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions sale_advance_payment/models/sale.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,10 @@ def _compute_advance_payment(self):
order.payment_line_ids = mls
order.amount_residual = amount_residual
order.advance_payment_status = payment_state

def _has_to_be_paid(self):
# If an order 'has to be paid' it will show the "Accept & Pay" button in the
# portal. This prevents that, as you do't want customers payign for orders that
# are already paid
res = super()._has_to_be_paid()
return res and self.amount_residual > 0
Comment thread
rousseldenis marked this conversation as resolved.
Loading