Sunday, October 13, 2024
1 change · 17.0
Resolved issues and error corrections
This fixes an error that could appear when users expose and edit the Sales Order field on project tasks. The sales order filter now uses available customer information, so users can select relevant orders without the page failing.
Original PR description
Steps to reproduce: - Project > Pick any task > Debug Mode - Studio > View tab > Tick 'Show invisible elements' - Scroll to 'Sales Order' and click it - Untick 'Invisible' then tick and untick readonly - Close > you should have a Sales Order field on the task - Click to change it's value An error occurs because the 'commercial_partner_id' field was removed from task in 17.0 in dcbdb6e690f29bc5327d7067688c93071d9a6b2d. Because of this the domain which filters 'Sales Order' (which contains this field) cannot be evaluated. Since the field is still available on the sale_order model, we can simply invert the child_of relation: from sale_order.partner_id child_of task.commercial_partner_id to sale_order.commercial_partner_id parent_of task.partner_id Which should serve essentially the same purpose. opw-4199947 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr