Skip to content

Commit fb2e032

Browse files
committedDec 2, 2024
TA#70572 [IMP] stock_orderpoint_scheduled_date
1 parent 38fecff commit fb2e032

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed
 

‎stock_orderpoint_scheduled_date/__manifest__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"name": "Stock Orderpoint Scheduled Date",
55
"summary": "Force Scheduled Date in Stock Orderpoint",
6-
"version": "14.0.1.2.0",
6+
"version": "14.0.1.2.1",
77
"category": "stock",
88
"website": "https://bit.ly/numigi-com",
99
"author": "Numigi",

‎stock_orderpoint_scheduled_date/models/stock_rule.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def _get_lead_days(self, product):
1818
)
1919
if scheduled_date:
2020
# Convert the scheduled date from string to UTC datetime
21-
manual_delay = (scheduled_date - fields.Datetime.now()).days
21+
manual_delay = (scheduled_date - fields.Date.today()).days
2222
delay += manual_delay
2323
if not bypass_delay_description:
2424
delay_description += (

‎stock_orderpoint_scheduled_date/models/stock_warehouse_orderpoint.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
class stockWarehouseOrderpoint(models.Model):
99
_inherit = "stock.warehouse.orderpoint"
1010

11-
scheduled_date = fields.Datetime(
11+
scheduled_date = fields.Date(
1212
"Scheduled Date", help="The date when this replenishment should be scheduled."
1313
)
1414

@@ -46,11 +46,11 @@ def _compute_json_popover(self):
4646
@api.model
4747
def action_open_set_schedule_date_wizard(self):
4848
"""Open a wizard to set the scheduled date."""
49-
wizard = self.env['stock.warehouse.orderpoint.schedule.date'].create({})
49+
wizard = self.env["stock.warehouse.orderpoint.schedule.date"].create({})
5050
wizard.orderpoint_ids = self
5151
action = wizard.get_formview_action()
52-
action['target'] = 'new'
53-
action['name'] = _('Set Schedule Date')
52+
action["target"] = "new"
53+
action["name"] = _("Set Schedule Date")
5454
return action
5555

5656
@api.model

‎stock_orderpoint_scheduled_date/views/stock_orderpoint_views.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<field name="inherit_id" ref="stock.view_warehouse_orderpoint_tree_editable"/>
77
<field name="arch" type="xml">
88
<field name="product_uom_name" position="after">
9-
<field name="scheduled_date" widget="Date"/>
9+
<field name="scheduled_date"/>
1010
</field>
1111
</field>
1212
</record>
@@ -16,7 +16,7 @@
1616
<field name="inherit_id" ref="stock.view_warehouse_orderpoint_form"/>
1717
<field name="arch" type="xml">
1818
<field name="qty_multiple" position="after">
19-
<field name="scheduled_date" widget="Date"/>
19+
<field name="scheduled_date"/>
2020
</field>
2121
</field>
2222
</record>

‎stock_orderpoint_scheduled_date/wizard/stock_warehouse_orderpoint_schedule_date.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<sheet>
1010
<group>
1111
<group>
12-
<field name="scheduled_date"/>
12+
<field name="scheduled_date" widget="date"/>
1313
</group>
1414
</group>
1515
</sheet>

0 commit comments

Comments
 (0)