-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[14.0][ADD] sale_automatic_workflow_periodicity #2504
[14.0][ADD] sale_automatic_workflow_periodicity #2504
Conversation
775defb
to
379aba9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG
sale_automatic_workflow_frequency/models/sale_workflow_process.py
Outdated
Show resolved
Hide resolved
sale_automatic_workflow_frequency/models/sale_workflow_process.py
Outdated
Show resolved
Hide resolved
sale_automatic_workflow_frequency/models/sale_workflow_process.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall, but just nitpicking on the semantics
sale_automatic_workflow_frequency/models/sale_workflow_process.py
Outdated
Show resolved
Hide resolved
sale_workflow.next_execution = datetime.now() + timedelta( | ||
seconds=sale_workflow.periodicity | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to use Odoo API:
sale_workflow.next_execution = datetime.now() + timedelta( | |
seconds=sale_workflow.periodicity | |
) | |
now = fields.Datetime.now() | |
sale_workflow.next_execution = fields.Datetime.add(now, seconds=sale_workflow.periodicity) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason why ?
As fields
is not yet imported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we are in Odoo context
vals["next_execution"] = fields.Datetime.now() + timedelta( | ||
seconds=periodicity | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG. @TDu up to you if you want to followup w/ Seb's comments
This PR has the |
73dde68
to
f81f07b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Code review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review
@TDu Could you just change to fields.Datetime ? |
@rousseldenis I did the change asked for. |
7295344
to
6b8c07e
Compare
Last change reuqested where in a fixup, I just squashed them. |
This module allows to set a frequency at which a workflow is going to be executed. The frequency of execution can be set in seconds in the workflow configuration. The next execution time is displayed below it.
6b8c07e
to
c685176
Compare
/ocabot merge minor |
What a great day to merge this nice PR. Let's do it! |
Congratulations, your PR was merged at d1badc0. Thanks a lot for contributing to OCA. ❤️ |
This module allows to set a frequency at which a workflow is going to be executed.
The frequency of execution can be set in seconds in the workflow configuration. The
next execution time is displayed below it.