diff --git a/wms_connector/models/stock_warehouse.py b/wms_connector/models/stock_warehouse.py index ea67c001c14..a388e3b1ba8 100644 --- a/wms_connector/models/stock_warehouse.py +++ b/wms_connector/models/stock_warehouse.py @@ -5,15 +5,15 @@ FILTER_VALS = { "wms_export_product_filter_id": { - "name": "WMS: Default filter for product sync", + "name": "WMS: {} filter for product sync", "model_id": "wms.product.sync", }, "wms_export_picking_in_filter_id": { - "name": "WMS: Default filter for picking in", + "name": "WMS: {} filter for picking in", "model_id": "stock.picking", }, "wms_export_picking_out_filter_id": { - "name": "WMS: Default filter for picking out", + "name": "WMS: {} filter for picking out", "model_id": "stock.picking", }, } @@ -155,6 +155,8 @@ def _activate_filters(self): if ir_filter: ir_filter.active = True else: + vals = vals.copy() + vals["name"] = vals["name"].format(self.name) self[filter_fieldname] = self.env["ir.filters"].create(vals) self.wms_export_product_filter_id.domain = FILTER_DOMAINS[ "wms_export_product_filter_id"