-
-
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][FIX] sale workflow job email send before validation #2501
[14.0][FIX] sale workflow job email send before validation #2501
Conversation
ce91f5e
to
722c843
Compare
When using the `sale_automatic_workflow_job` module the validation of the order is done by a job. But the sending of the confirmation is done in line. Causing the email to be sent before the validation of the order.
The function signature has changed in inherited modules
722c843
to
90aa5b4
Compare
@@ -150,6 +151,7 @@ def test_deleted_sale_order(self): | |||
args=( | |||
self.sale, | |||
safe_eval(workflow.order_filter_id.domain) + workflow_domain, | |||
False, |
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.
False, | |
send_order_confirmation=False, |
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.
I didn't ask for this as I feared you would point at me as "nitpicking" 🤣
@@ -45,6 +45,7 @@ def test_validate_sale_order(self): | |||
("state", "=", "draft"), | |||
("workflow_process_id", "=", self.sale.workflow_process_id.id), | |||
], | |||
False, |
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.
False, | |
send_order_confirmation=False, |
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.
I tried but it does not work.
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.
@TDu what do you mean?
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.
def assert_job_delayed(self, delayable_cls, delayable, method_name, args): |
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.
Indeed, args
is a tuple/list here, no way to pass kwargs.
This PR has the |
/ocabot merge patch |
Hey, thanks for contributing! Proceeding to merge this for you. |
@simahawk your merge command was aborted due to failed check(s), which you can inspect on this commit of 14.0-ocabot-merge-pr-2501-by-simahawk-bump-patch. After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red. |
/ocabot merge patch |
What a great day to merge this nice PR. Let's do it! |
@rousseldenis your merge command was aborted due to failed check(s), which you can inspect on this commit of 14.0-ocabot-merge-pr-2501-by-rousseldenis-bump-patch. After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red. |
/ocabot merge patch |
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at 3023105. Thanks a lot for contributing to OCA. ❤️ |
When using the
sale_automatic_workflow_job
module the validation ofthe order is done by a job. But the sending of the confirmation is done
in line. Causing the email to be sent before the validation of the
order.