Skip to content

[18.0][IMP] removing automatic date_start to today when subscription goes i…#1401

Open
cvinh wants to merge 1 commit intoOCA:18.0from
invitu:18.0-imp-subscription_do_not_force_date_start_today
Open

[18.0][IMP] removing automatic date_start to today when subscription goes i…#1401
cvinh wants to merge 1 commit intoOCA:18.0from
invitu:18.0-imp-subscription_do_not_force_date_start_today

Conversation

@cvinh
Copy link

@cvinh cvinh commented Mar 6, 2026

…n progress. This could be useful when we launch a subscription with a date start different from today

…n progress. This could be useful when we launch a subscription with a date start different from today
Copy link
Contributor

@luisDIXMIT luisDIXMIT left a comment

Choose a reason for hiding this comment

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

LGTM!

@rrebollo
Copy link

@cvinh PR title should be something along [18.0][IMP] subscription_oca: ....

Copy link

@rrebollo rrebollo left a comment

Choose a reason for hiding this comment

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

Technically correct. Would you consider covering the modification with some tests? I'm guessing a small adjustment to one of the existing tests would work. Ping me then.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants