Skip to content
Open
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
1 change: 0 additions & 1 deletion subscription_oca/models/sale_subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,6 @@ def write(self, values):
if record.stage_id.type == "in_progress":
record.in_progress = True
today = date.today()
record.date_start = today

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My concern is: what if record.date_start is not set? I checked and it's not a required field.

Maybe you could remove the assignment only for records that already have a value set for the date_start field. Though it's possible the scenario I'm describing isn't a valid one.

record.calculate_recurring_next_date(today)
elif record.stage_id.type == "post":
record.close_reason_id = values.get("close_reason_id", False)
Expand Down