-
-
Notifications
You must be signed in to change notification settings - Fork 339
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][IMP] stock_barcodes #668
base: 16.0
Are you sure you want to change the base?
Conversation
40a5fff
to
8db115d
Compare
5b174db
to
ebdc6c8
Compare
626a984
to
ddcf9f7
Compare
@edescalona As the changes in this are quite different than the PR description, could you enhance it to enumerate them? And it is better to add the module name in the commit messages like Thanks! |
Hello @rousseldenis , ok, I'll upload other improvements in a while and with their description, greetings |
15699bc
to
3353c3a
Compare
I really would like to have this :) Thanks for the work |
03c8f1e
to
bbd2046
Compare
Hi @mrsavage @rousseldenis , the PR is ready to be reviewed again, any opinion is welcome, thanks. |
@edescalona Can you check the files changed? There are modules that shouldn't be envolved here |
…tory and Operations scan views
597bc39
to
1559540
Compare
Hi @Christian-RB I have already checked and corrected the changes in other modules that should not be involved. Ready to be reviewed, thanks for your contribution. |
Thanks for this PR.
|
Hello @hitrosol , thank you for your contribution. I will review the details you mentioned. Thank you very much. |
…the one previously validated.
Hello @hitrosol I have already made the change you suggested, thanks for your contribution, it can be reviewed again, greetings |
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.
Your pull requests could have more code documentation from my point of view.
Currently there are only a few doc strings and code comments.
Especially when changing a lot of code (what you did) I highly recommend to document the code well. This helps reviewers to understand the changes.
if len(matched_actions) > len(all_barcode): | ||
raise ValidationError( | ||
_( | ||
f"Barcode has already been assigned to " |
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.
Odoos translation engine (babel) doesn't support F-strings in the used version.
Please use format strings or something similar.
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.
Your comment has been resolved, thank you for your contribution.
|
||
@api.constrains("context") | ||
def _constrains_context(self): | ||
if self.context and not bool( |
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.
Odoos translation engine (babel) doesn't support F-strings in the used version.
Please use format strings or something similar.
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.
Your comment has been resolved, thank you for your contribution.
@@ -396,7 +408,7 @@ def _prepare_stock_moves_domain(self): | |||
] | |||
if self.picking_id: | |||
domain.append(("picking_id", "=", self.picking_id.id)) | |||
return domain | |||
return [] |
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.
This function statically returns [] now. I guess this is not correct.
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.
Your comment has been resolved, thank you for your contribution.
Hi @baguenth I've already reviewed your comments, thanks for your contribution |
Ok, I will add some other indications for better understanding, thanks |
[16.0][IMP] stock_barcodes: Readme
Hi @baguenth , I have already made improvements to the documentation. Please let me know when you can. Thanks for your contribution. |
for action in self: | ||
if not re.match(REGEX.get("barcode", False), action.barcode): | ||
raise ValidationError( | ||
_( |
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.
Tbh I am not sure if we can and should use the format part within the translation bracket. Better use:
_("...").format(...)
matched_actions = self.sudo().search(domain, order="id") | ||
if len(matched_actions) > len(all_barcode): | ||
raise ValidationError( | ||
_( |
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.
Tbh I am not sure if we can and should use the format part within the translation bracket. Better use:
_("...").format(...)
Hi @baguenth , you can now review the changes, thanks for your contribution. |
@BinhexTeam The different views for the barcode have been modified.