-
-
Notifications
You must be signed in to change notification settings - Fork 850
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] partner_helper: add strict mode that raise an error if address is too long #1790
Conversation
partner_helper/models/partner.py
Outdated
|
||
|
||
def split_char(char, output_number, size): | ||
words = char.split(" ") | ||
def split_char(char, output_number, size, strict): |
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.
Isn't it better to set strict=False in signature in case some modules use this method directly ?
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.
yes, it avoid to break things
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.
done
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 (minor comment)
Please port this to last version of the module
The name of this module is now https://github.com/OCA/partner-contact/tree/16.0/partner_address_split |
ab4b981
to
62cfa0e
Compare
/ocabot merge patch |
On my way to merge this fine PR! |
@sebastienbeau your merge command was aborted due to failed check(s), which you can inspect on this commit of 14.0-ocabot-merge-pr-1790-by-sebastienbeau-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 |
This PR looks fantastic, let's merge it! |
Congratulations, your PR was merged at ebcd65e. Thanks a lot for contributing to OCA. ❤️ |
Add an optional strict mode, so you can raise an error if the address can not be splitted correctly because it's too long
@bealdav @florian-dacosta