Reviewers: ,
Please review this at http://codereview.tryton.org/335001/ Affected files: M purchase.py Index: purchase.py =================================================================== --- a/purchase.py +++ b/purchase.py @@ -1232,7 +1232,14 @@ res['description'] = line.description res['note'] = line.note if line.type != 'line': - return [res] + if (line.purchase.invoice_method == 'order' + and (all(l.quantity >= 0 for l in line.sale.lines + if l.type == 'line') + or all(l.quantity <= 0 for l in line.sale.lines + if l.type == 'line'))): + return [res] + else: + return [] if (line.purchase.invoice_method == 'order' or not line.product or line.product.type == 'service'): -- [email protected] mailing list
