-
-
Notifications
You must be signed in to change notification settings - Fork 758
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
[16.0][FIX] project_sequence: Force generate sequence_code when creating project from list view #1303
base: 16.0
Are you sure you want to change the base?
Conversation
Hi @yajo, @anddago78, |
@@ -72,7 +72,7 @@ def create(self, vals_list): | |||
# It is important to set sequence_code before calling super() because | |||
# other modules such as hr_timesheet expect the name to always have a value | |||
for vals in vals_list: | |||
if "sequence_code" not in vals: | |||
if vals.get("sequence_code", 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.
That's the opposite of the current behavior with no other check.
IMHO, the code should be like this:
if vals.get("sequence_code", False): | |
sequence_code = vals.get("sequence_code", False) | |
if not sequence_code: |
As in views, sequence_code is present but with a "" value.
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.
Thanks @rousseldenis
06d3f96
to
9b61aef
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!
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
@joscanog Could you squash commits that you think can be merged together? |
fad0576
to
9b61aef
Compare
9b61aef
to
606c5a9
Compare
Thanks @rousseldenis. I've just done the squash. |
When creating a project from the list view, the sequence_code was not generated. These changes fix that problem.