From 62378a293a3d694f7d366ef6b060e383933efe4a Mon Sep 17 00:00:00 2001 From: Kevin Khao Date: Tue, 17 Oct 2023 18:23:36 +0300 Subject: [PATCH] wip --- wms_connector/data/ir_filters.xml | 4 +--- wms_connector/models/stock_warehouse.py | 7 +++++-- wms_connector/views/stock_warehouse.xml | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/wms_connector/data/ir_filters.xml b/wms_connector/data/ir_filters.xml index 1734570e406..e903439308a 100644 --- a/wms_connector/data/ir_filters.xml +++ b/wms_connector/data/ir_filters.xml @@ -6,9 +6,7 @@ WMS: Default filter for products product.product - [ - ("wms_export_date", "=", False) - ] + [] WMS: Default filter for picking in diff --git a/wms_connector/models/stock_warehouse.py b/wms_connector/models/stock_warehouse.py index e6378eae46c..2b9a97ed2e0 100644 --- a/wms_connector/models/stock_warehouse.py +++ b/wms_connector/models/stock_warehouse.py @@ -52,6 +52,9 @@ class StockWarehouse(models.Model): wms_export_cron_id = fields.Many2one("ir.cron", readonly=True) wms_import_confirm_reception_cron_id = fields.Many2one("ir.cron", readonly=True) wms_import_confirm_delivery_cron_id = fields.Many2one("ir.cron", readonly=True) + wms_product_sync_filter_id = fields.Many2one( + "ir.filters", + ) wms_export_product_filter_id = fields.Many2one( "ir.filters", ) @@ -136,8 +139,8 @@ def refresh_wms_products(self): for rec in self: rec.wms_product_sync_ids.unlink() for prd in self.env["product.product"].search( - rec.wms_export_product_filter_id - and rec.wms_export_product_filter_id._get_eval_domain() + rec.wms_product_sync_filter_id + and rec.wms_product_sync_filter_id._get_eval_domain() or [] ): self.env["wms.product.sync"].create( diff --git a/wms_connector/views/stock_warehouse.xml b/wms_connector/views/stock_warehouse.xml index f2b0d6a6ecd..3654bc8830e 100644 --- a/wms_connector/views/stock_warehouse.xml +++ b/wms_connector/views/stock_warehouse.xml @@ -25,6 +25,7 @@ +