-
-
Notifications
You must be signed in to change notification settings - Fork 205
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
[IMP] add product options from php serialize strings in sale line #94
Conversation
902089b
to
aabe8c3
Compare
options = [elm['label'] + ': ' + elm['print_value'] | ||
for elm in | ||
record['product_options']['options'].values()] | ||
name += '\nOptions:\n - ' + '\n - '.join(options) |
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.
What about translations?
Thanks for the patch. However, I don't want to add a hard dependency for that since it is not used by many and could be an issue for existing installation. I propose to replace the import by:
And to check if phpserialize is not None before using it. |
Effectively as told 'Guewen', I think that it would be better to have an optionnal dependency on 'phpserialize'. |
HI @guewen, what do you think about @chafique-delli suggestion ? What should be the default behavior ? |
Hi, No point to have an option in the backend. If the library is there, use it, otherwise just ignore the options. |
Hi @guewen, thanks but where I put options from previous mapping in case of none ? |
I noticed that the previous mapping was writing the options in a field |
aabe8c3
to
124a52e
Compare
@guewen I fixed it but with by resetting my commit to keep old code. |
@@ -521,6 +534,18 @@ def _clean_magento_items(self, resource): | |||
|
|||
# Group the childs with their parent | |||
for item in resource['items']: | |||
if phpserialize is None: | |||
_logger.info(PHPSERIALIZE_INFO) |
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 log will be logged at each import, I think it would be better to log it once in the ImportError
.
@guewen I suggest to add an item in 'Technical points' to alert of phpserialize feature |
Yep |
Did you see the error in the tests?
|
This one has conflicts and very old, so I'm closing it. If there's still interest, feel free to reopen it fixing the problems. |
…n_picking [Action #8537] Export Stock-IT picking IN one time
Here is the type of format