Prevent Duplicate Customer PO on Sales Orders in Odoo

Prevent duplicate PO

We’ve added a new feature to help prevent sales teams from accidentally duplicating a customer’s purchase order, a critical need for many of our clients who rely on customer-issued PO references to manage order approvals and payment processing.

This feature introduces automatic checks and interactive warnings when users attempt to reuse the same Customer Reference (PO number) for the same commercial partner.

How It Works

If a user enters a Customer Reference on a Sales Order, the system checks if that reference has already been used on a confirmed order for the same parent-level customer.

Depending on the customer’s configuration, the system will either:

  • Show a warning, allowing the user to proceed
  • Block order confirmation, unless bypassed through a pop-up
  • Or do nothing, if the customer has not enabled duplicate checking
  • Duplicate Detection
    • A yellow warning banner appears if the entered reference already exists for another order.
  • On confirm, the user sees a popup saying:
    • “The Customer PO reference already exists, would you like to proceed anyway?”
  • If confirmed, the system logs:
    • “Acknowledged and Approved Order with Duplicate Customer Reference”
  • Some customers require a PO reference on all orders.

    • If this is enabled, users will not be able to confirm an order without entering a Customer Reference.
    • If a user attempts to confirm without one, a pop-up explains the issue and requires acknowledgement before continuing.

How it’s configured

  • In the Sales app go to Configuration > Settings > Orders and Quotations > Customer PO Ref Warnings. Screenshot 2025-05-28 141242
  • There, you will see configuration options for “Missing customer PO Ref” and “Duplicate customer PO ref”
  • These control both warning visibility and whether order confirmation is allowed or blocked when rules are not met.
  • You can set these options to “Never warn” or “Always warn”.
  • When you select the “Always Warn” option, a “Blocks Confirmation” appears, allowing you to choose whether you want the order confirmation to be blocked when the warning is triggered.
  • Interactive popups (bypass wizards) Two bypass flows guide the user when rules are violated:
  • Missing Reference Warning

    • Displays a message that the customer requires a PO reference
    • Buttons: Cancel, Confirm Anyway (if bypass is allowed)
  • Duplicate Reference Warning
    • Shows the existing conflicting PO
      • Buttons: Cancel, Confirm Anyway (if bypass is allowed)

Each wizard ensures users understand what they’re overriding — and who approved it.

Website behavior
To avoid disrupting customer purchases, duplicate reference checking is disabled on website orders. Orders placed online will still be processed even if the reference already exists.