Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinkhao committed Oct 18, 2023
1 parent c9518f5 commit 8823863
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions wms_connector/models/stock_warehouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,15 @@
"filetype": "export",
"name_fragment": "exports (products, awaiting receptions, preparation orders",
"code": "wh = env['stock.warehouse'].browse({0})\n"
'wh.{1}.scheduler_export("wms.product.sync", wh["wms_product_sync_filter_id"]._get_eval_domain())\n'
'wh.{1}.scheduler_export("stock.picking", wh["wms_export_picking_in_filter_id"]._get_eval_domain())\n'
'wh.{1}.scheduler_export("stock.picking", wh["wms_export_picking_out_filter_id"]._get_eval_domain())',
"wh.{1}.scheduler_export("
'"wms.product.sync", wh["wms_product_sync_filter_id"]._get_eval_domain()'
")\n"
"wh.{1}.scheduler_export("
'"stock.picking", wh["wms_export_picking_in_filter_id"]._get_eval_domain()'
")\n"
"wh.{1}.scheduler_export("
'"stock.picking", wh["wms_export_picking_out_filter_id"]._get_eval_domain()'
")",
},
"reception": {
"fieldname_task": "wms_import_confirm_reception_task_id",
Expand Down Expand Up @@ -76,7 +82,7 @@ def _inverse_active_wms_sync(self):

def _activate_crons_tasks(self):
for rec in self:
for kind, mappings in MAPPINGS.items():
for mappings in MAPPINGS.values():
task_field_name = mappings["fieldname_task"]
task = rec[task_field_name]
if task:
Expand Down Expand Up @@ -128,12 +134,11 @@ def _prepare_wms_cron_vals(self, code="", name_fragment=""):

def _deactivate_crons_tasks(self):
for rec in self:
for _, mappings in MAPPINGS.items():
for mappings in MAPPINGS.values():
rec[mappings["fieldname_task"]].active = False
rec[mappings["fieldname_cron"]].active = False

def action_open_flows(self):
raise NotImplementedError
return {"type": "ir.action"}

def refresh_wms_products(self):
Expand Down

0 comments on commit 8823863

Please sign in to comment.