|
|
|
@ -60,7 +60,7 @@ class SaleOrder(models.Model): |
|
|
|
payment_states = posted_invoices.mapped('payment_state') |
|
|
|
status_length = len(payment_states) |
|
|
|
if order.amount_due > 0: |
|
|
|
if 'partial' in payment_states or 'not_paid' in payment_states: |
|
|
|
if 'partial' in payment_states: |
|
|
|
order.payment_status = 'Partially Paid' |
|
|
|
elif 'not_paid' in payment_states and status_length == payment_states.count( |
|
|
|
'not_paid'): |
|
|
|
@ -108,6 +108,7 @@ class SaleOrder(models.Model): |
|
|
|
|
|
|
|
rec.amount_due = total_invoiced - total_paid |
|
|
|
|
|
|
|
|
|
|
|
def action_open_business_doc(self): |
|
|
|
""" This method is intended to be used in the context of an |
|
|
|
account.move record. |
|
|
|
|