odoo/industry#2184
Created by fw-bot
- label
- odoo-dev:master-fix-duplicate-work-item-527548-fw
- head
- 890d90795490fbec121e114ab9344053e15ef0af
- merged
- 5 days ago by Industry, Vallaeys Valentin (vava)
| odoo/industry | |
|---|---|
| 19.0 | #2173 |
| saas-19.1 | #2179 |
| saas-19.2 | #2181 |
| saas-19.3 | #2183 |
| master | #2184 |
[19.0] [FIX] construction_developer: correctly duplicate work items on SO
Fixes #2172.
When a sale.order is duplicated, the Many2one references are copied natively, meaning both the old and new sale.order.line referenced the exact same x_work_item. Modifying the work item on the new duplicate altered the pricing on the original SO.
This uses the Odoo Online compatible XML approach. By adding copied=False to the field definition in Studio (ir_model_fields.xml), the work item reference is appropriately stripped upon duplication. This subsequently triggers the existing standard automation base_automation_sol_on_write to re-instantiate a fresh Work Item directly from the product template.
Forward-Port-Of: #2173