Skip to content

Commit 9e9f84e

Browse files
committed
add api model
1 parent 9e73c6f commit 9e9f84e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

wms_connector/models/synchronize_exportable_mixin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import datetime
77
from io import StringIO
88

9-
from odoo import fields, models
9+
from odoo import api, fields, models
1010
from odoo.tools import config
1111

1212

@@ -88,6 +88,7 @@ def _format_to_exportfile_csv(self, data):
8888
def _get_export_name(self):
8989
raise NotImplementedError
9090

91+
@api.model
9192
def _schedule_export(self, warehouse, domain=False):
9293
if not domain:
9394
domain = []

wms_connector/models/wms_product_sync.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright 2023 Akretion
22
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
33

4-
from odoo import fields, models
4+
from odoo import api, fields, models
55

66

77
class WmsProductSync(models.Model):
@@ -13,6 +13,7 @@ class WmsProductSync(models.Model):
1313
product_id = fields.Many2one("product.product", required=True)
1414
warehouse_id = fields.Many2one("stock.warehouse", required=True)
1515

16+
@api.model
1617
def _schedule_export(self, warehouse, domain=False):
1718
warehouse.refresh_wms_products()
1819
return super()._schedule_export(warehouse, domain)

0 commit comments

Comments
 (0)