From 07dafa288cf850df31f7761ffc7e1dad0a486f71 Mon Sep 17 00:00:00 2001 From: Sergio Morillo Date: Fri, 7 Aug 2020 13:15:45 +0200 Subject: [PATCH] Do not filter by invoice type. This commit refs #13959 --- invoice.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/invoice.py b/invoice.py index d119392..72e7060 100644 --- a/invoice.py +++ b/invoice.py @@ -30,7 +30,6 @@ class InvoiceLine(metaclass=PoolMeta): query = fromitem.select( line.id, Case(*conditions, _else=Null), - where=(line.invoice_type == 'out'), order_by=Case(*conditions, _else=Null) ) @@ -66,7 +65,6 @@ class InvoiceLine(metaclass=PoolMeta): query = fromitem.select( line.id, Case(*conditions, _else=Literal('')), - where=(line.invoice_type == 'out'), order_by=Case(*conditions, _else=Literal('')), group_by=(line.id, Case(*conditions, _else=Literal(''))) ) @@ -111,7 +109,8 @@ class InvoiceLine(metaclass=PoolMeta): def get_shipment_out_numbers(self, name=None): if self.stock_moves: shipments = set([move.shipment.rec_name - for move in self.stock_moves if move.shipment]) + for move in self.stock_moves if move.shipment and + move.shipment.__name__ == 'stock.shipment.out']) return ','.join(sorted(shipments)) @classmethod