Skip to content

Commit

Permalink
TA#70572 [IMP] stock_orderpoint_scheduled_date
Browse files Browse the repository at this point in the history
  • Loading branch information
majouda committed Dec 2, 2024
1 parent 38fecff commit fb2e032
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion stock_orderpoint_scheduled_date/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion stock_orderpoint_scheduled_date/models/stock_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 += (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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."
)

Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<field name="inherit_id" ref="stock.view_warehouse_orderpoint_tree_editable"/>
<field name="arch" type="xml">
<field name="product_uom_name" position="after">
<field name="scheduled_date" widget="Date"/>
<field name="scheduled_date"/>
</field>
</field>
</record>
Expand All @@ -16,7 +16,7 @@
<field name="inherit_id" ref="stock.view_warehouse_orderpoint_form"/>
<field name="arch" type="xml">
<field name="qty_multiple" position="after">
<field name="scheduled_date" widget="Date"/>
<field name="scheduled_date"/>
</field>
</field>
</record>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<sheet>
<group>
<group>
<field name="scheduled_date"/>
<field name="scheduled_date" widget="date"/>
</group>
</group>
</sheet>
Expand Down

0 comments on commit fb2e032

Please sign in to comment.