Customising the Customer Filter in the Search View
To enable a sales order search for archived partner records in Odoo, customisation of the sales order's customer filter in the search view is required, as Odoo's standard functionality does not include archived partner records in search results.
Here’s the customisation required for the sales order's customer filter in the search view:
To modify the search view so that archived partner records are included in sales order searches, update the partner_id field with a customised domain filter.
Odoo Code for Sales Order Search View
External ID: sale.view_sales_order
Modify the Search View
Customisation of the partner_id field in the search view to include archived partner records:
Inheriting the Sales Order Search View
Below is a code sample for inheriting the sales order search view to include archived customer records in search results:
With this customisation, Odoo will include archived partner records when performing a sales order search, improving the visibility and accessibility of past customer data.
Need more development tips?
Stay tuned to our blog.