credativ team mailing list archive
-
credativ team
-
Mailing list archive
-
Message #05252
[Merge] lp:~matthieuchoplin/credativ-openerp/ERPSUP-273 into lp:credativ-openerp
Matthieu Choplin has proposed merging lp:~matthieuchoplin/credativ-openerp/ERPSUP-273 into lp:credativ-openerp.
Commit message:
Small fix for checking if the supplier exist on a product before browsing it.
Requested reviews:
credativ (credativ)
For more details, see:
https://code.launchpad.net/~matthieuchoplin/credativ-openerp/ERPSUP-273/+merge/173914
--
https://code.launchpad.net/~matthieuchoplin/credativ-openerp/ERPSUP-273/+merge/173914
Your team credativ is requested to review the proposed merge of lp:~matthieuchoplin/credativ-openerp/ERPSUP-273 into lp:credativ-openerp.
=== modified file 'supplier_from_po/purchase_order.py'
--- supplier_from_po/purchase_order.py 2013-06-28 09:16:33 +0000
+++ supplier_from_po/purchase_order.py 2013-07-10 11:31:45 +0000
@@ -38,7 +38,7 @@
# check if supplier already exists in the supplier list for this product
if partner_id not in [x.name.id for x in product.seller_ids]:
# add supplier to supplierinfo for product
- next_sequence = max([sup.sequence for sup in product.seller_ids]) + 1
+ next_sequence = (product.seller_ids and max([sup.sequence for sup in product.seller_ids]) or 0) + 1
supplier_vals = {'name': partner_id,
'product_id': product.id,
'min_qty': 0,
Follow ups