diff --git a/stock_orderpoint_scheduled_date/__manifest__.py b/stock_orderpoint_scheduled_date/__manifest__.py
index 0398a33..5aa912f 100755
--- a/stock_orderpoint_scheduled_date/__manifest__.py
+++ b/stock_orderpoint_scheduled_date/__manifest__.py
@@ -3,7 +3,7 @@
{
"name": "Stock Orderpoint Scheduled Date",
"summary": "Force Scheduled Date in Stock Orderpoint",
- "version": "14.0.1.2.0",
+ "version": "14.0.1.2.1",
"category": "stock",
"website": "https://bit.ly/numigi-com",
"author": "Numigi",
diff --git a/stock_orderpoint_scheduled_date/models/stock_rule.py b/stock_orderpoint_scheduled_date/models/stock_rule.py
index 9d348fc..8e69dea 100755
--- a/stock_orderpoint_scheduled_date/models/stock_rule.py
+++ b/stock_orderpoint_scheduled_date/models/stock_rule.py
@@ -18,7 +18,7 @@ def _get_lead_days(self, product):
)
if scheduled_date:
# Convert the scheduled date from string to UTC datetime
- manual_delay = (scheduled_date - fields.Datetime.now()).days
+ manual_delay = (scheduled_date - fields.Date.today()).days
delay += manual_delay
if not bypass_delay_description:
delay_description += (
diff --git a/stock_orderpoint_scheduled_date/models/stock_warehouse_orderpoint.py b/stock_orderpoint_scheduled_date/models/stock_warehouse_orderpoint.py
index 1e44b6b..77908cf 100755
--- a/stock_orderpoint_scheduled_date/models/stock_warehouse_orderpoint.py
+++ b/stock_orderpoint_scheduled_date/models/stock_warehouse_orderpoint.py
@@ -8,7 +8,7 @@
class stockWarehouseOrderpoint(models.Model):
_inherit = "stock.warehouse.orderpoint"
- scheduled_date = fields.Datetime(
+ scheduled_date = fields.Date(
"Scheduled Date", help="The date when this replenishment should be scheduled."
)
@@ -46,11 +46,11 @@ def _compute_json_popover(self):
@api.model
def action_open_set_schedule_date_wizard(self):
"""Open a wizard to set the scheduled date."""
- wizard = self.env['stock.warehouse.orderpoint.schedule.date'].create({})
+ wizard = self.env["stock.warehouse.orderpoint.schedule.date"].create({})
wizard.orderpoint_ids = self
action = wizard.get_formview_action()
- action['target'] = 'new'
- action['name'] = _('Set Schedule Date')
+ action["target"] = "new"
+ action["name"] = _("Set Schedule Date")
return action
@api.model
diff --git a/stock_orderpoint_scheduled_date/views/stock_orderpoint_views.xml b/stock_orderpoint_scheduled_date/views/stock_orderpoint_views.xml
index 81f3833..4023310 100644
--- a/stock_orderpoint_scheduled_date/views/stock_orderpoint_views.xml
+++ b/stock_orderpoint_scheduled_date/views/stock_orderpoint_views.xml
@@ -6,7 +6,7 @@
-
+
@@ -16,7 +16,7 @@
-
+
diff --git a/stock_orderpoint_scheduled_date/wizard/stock_warehouse_orderpoint_schedule_date.xml b/stock_orderpoint_scheduled_date/wizard/stock_warehouse_orderpoint_schedule_date.xml
index e6e6747..ee277d8 100644
--- a/stock_orderpoint_scheduled_date/wizard/stock_warehouse_orderpoint_schedule_date.xml
+++ b/stock_orderpoint_scheduled_date/wizard/stock_warehouse_orderpoint_schedule_date.xml
@@ -9,7 +9,7 @@
-
+