Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TA#70572 [IMP] stock_orderpoint_scheduled_date #205

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading