Skip to content

Conversation

Jay2163
Copy link

@Jay2163 Jay2163 commented Oct 2, 2025

Description of the issue:
When a Sales Order has a Customer Reference (client_order_ref), the Delivery Order origin field includes both the SO name and the customer reference (e.g., "SO00029 - ABC123").
This prevents the Delivery Order from having a clickable link to the originating Sales Order.

Current behavior:

  • Delivery Order origin = "SO00029 - ABC123" (plain text)
  • No clickable link to the SO in the transfer.

Expected behavior:

  • The Delivery Order should maintain a clickable link to the Sales Order via the origin_reference field.
  • The origin field can still show the descriptive text including the customer reference.

Solution implemented:

  • Added a convert_origin method to extract only the SO name from origin.
  • Updated _compute_origin_reference to search for the SO using the extracted name and set origin_reference.
  • Ensures that Delivery Orders now correctly link back to the originating Sales Order without modifying the descriptive origin.

Affected versions:

  • Odoo 18.0

Example:

  • origin = "SO00029 - ABC123"
  • origin_reference = "sale.order,42" (clickable link to SO)

Impact

Restores expected behavior of the Delivery Orders by ensuring the Source Document link (origin_reference) correctly points to the originating Sales Order, even when a Customer Reference is present.

Fixes issue #2116

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant