Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinkhao committed Oct 17, 2023
1 parent 70ee4bc commit 62378a2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 1 addition & 3 deletions wms_connector/data/ir_filters.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
<record model="ir.filters" id="default_wms_export_product_filter">
<field name="name">WMS: Default filter for products</field>
<field name="model_id">product.product</field>
<field name="domain">[
("wms_export_date", "=", False)
]</field>
<field name="domain">[]</field>
</record>
<record model="ir.filters" id="default_wms_export_picking_in_filter">
<field name="name">WMS: Default filter for picking in</field>
Expand Down
7 changes: 5 additions & 2 deletions wms_connector/models/stock_warehouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
Expand Down Expand Up @@ -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(
Expand Down
1 change: 1 addition & 0 deletions wms_connector/views/stock_warehouse.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<field name="wms_import_confirm_reception_cron_id"/>
</group>
<group>
<field name="wms_product_sync_filter_id"/>
<field name="wms_export_product_filter_id"/>
<field name="wms_export_picking_in_filter_id"/>
<field name="wms_export_picking_out_filter_id"/>
Expand Down

0 comments on commit 62378a2

Please sign in to comment.