issue9032.diff - [account_invoice_stock] Skip sum quantity of cancelled invoices

This commit is contained in:
Raimon Esteve 2020-02-04 12:55:09 +01:00
parent 02261744be
commit cabebf6428
2 changed files with 16 additions and 0 deletions

13
issue9032.diff Normal file
View File

@ -0,0 +1,13 @@
diff --git a/trytond/trytond/modules/account_invoice_stock/stock.py b/trytond/trytond/modules/account_invoice_stock/stock.py
index a741d88..b118326 100644
--- a/trytond/trytond/modules/account_invoice_stock/stock.py
+++ b/trytond/trytond/modules/account_invoice_stock/stock.py
@@ -20,6 +20,8 @@ class StockMove(metaclass=PoolMeta):
Uom = pool.get('product.uom')
quantity = 0
for invoice_line in self.invoice_lines:
+ if invoice_line.invoice and invoice_line.invoice.state == 'cancel':
+ continue
quantity += Uom.compute_qty(invoice_line.unit,
invoice_line.quantity, self.uom)
return quantity

3
series
View File

@ -14,6 +14,9 @@ issue4506.diff # [account_invoice] Add credit invoices keyword from account.invo
issue8479.diff # [account_invoice] missing invoice payment method rule by company
create_invoice_credit_with_refund.diff # [account_invoice] revert the creation of a credit invoice whith refund change. reconcile the 2 invoices, not cancell the origin one.
issue8618.diff # [account_invoice] Allow changing amount in manual invoice taxes
issue9032.diff # [account_invoice_stock] Skip sum quantity of cancelled invoices
issue4030.diff # [analytic_account] Not selected root accounts in analytic account lines
analitic_line_company_rules.diff # [analytic_account] Not selected root accounts in analytic account lines