Last active
September 18, 2018 12:36
-
-
Save meepoSenpai/d6d5dbb43a56e33300e3cf49d16f254d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[unique_partners.update([supplier.name for supplier in supplier_info]) for supplier_info in [line.product_id.seller_ids for line in self.order_lines if line.product_id and line.product_id.seller_ids]] | |
# This small snippet does the exact same task as the following: | |
for line in self.order_lines: | |
if line.product_id and line.product_id.seller_ids: | |
for supplier_info in line.product_id.seller_ids: | |
unique_partners.update([supplier.name for supplier in supplier_info]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment