Invoice Partner credit limit exceeded.
The Customer or Invoice Address has a credit limit.
This sale order, or the customer has an outstanding balance that, exceeds their credit limit.
50
sale.order
partner = sale.partner_invoice_id.commercial_partner_id
partner_balance = partner.credit + sale.amount_total
if partner.credit_limit and partner.credit_limit <= partner_balance:
failed = True
Customer On Credit Hold.
The Customer is on Credit Hold.
Please have the customer contact accounting.
50
sale.order
partner = sale.partner_invoice_id.commercial_partner_id
if partner.credit_hold:
failed = True
Customer has Overdue Invoices.
The Customer has unpaid overdue invoices.
Please have the customer contact accounting.
55
sale.order
partner = sale.partner_invoice_id.commercial_partner_id
if partner.invoice_ids.filtered(lambda i: i.state == 'posted' and i.payment_state != 'paid' and (i.invoice_date_due and str(i.invoice_date_due) < str(datetime.date.today())) and i.move_type == 'out_invoice'):
failed = True