[FIX] mrp: add domain in copy existing operation action

Currently, when a BOM is archived via the ECO mechanism, its operations are
still selectable via the `copy existing operation` action on the BOM.

In this commit, we have added domain in `copy existing operation` action.

TaskID - 2845022

closes odoo/odoo#95548

X-original-commit: 272cd5358e8b78bc273d4aa72b8c42649f1f5171
Signed-off-by: Tiffany Chang <tic@odoo.com>
This commit is contained in:
kado-odoo
2022-07-07 17:31:13 +02:00
parent c3036694b3
commit 37d30e7c40
@@ -60,6 +60,7 @@ var MrpFieldOne2ManyWithCopy = FieldOne2Many.extend({
type: 'ir.actions.act_window',
res_model: 'mrp.routing.workcenter',
views: [[false, 'list'], [false, 'form']],
domain: ['|', ['bom_id', '=', false], ['bom_id.active', '=', true]],
context: {
tree_view_ref: 'mrp.mrp_routing_workcenter_copy_to_bom_tree_view',
bom_id: this.recordData.id,