Skip to content

Commit

Permalink
[FIX] Will only add new lines to the invoice if the quantity to invoi…
Browse files Browse the repository at this point in the history
…ce is different than 0
  • Loading branch information
JordiBForgeFlow committed Mar 13, 2017
1 parent 5803d32 commit 2470b84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/purchase/invoice.py
Expand Up @@ -35,8 +35,8 @@ def _prepare_invoice_line_from_po_line(self, line):
qty = line.product_qty - line.qty_invoiced
else:
qty = line.qty_received - line.qty_invoiced
if float_compare(qty, 0.0, precision_rounding=line.product_uom.rounding) <= 0:
# If received quantities or quantities is zero is better not create invoice lines
if float_compare(qty, 0.0,
precision_rounding=line.product_uom.rounding) == 0:
return {}
taxes = line.taxes_id
invoice_line_tax_ids = self.purchase_id.fiscal_position_id.map_tax(taxes)
Expand Down

0 comments on commit 2470b84

Please sign in to comment.