From 1d6ab9bd9d61fc12948a30b1872cd7c575457baf Mon Sep 17 00:00:00 2001 From: Albert Cervera i Areny Date: Fri, 19 Mar 2021 23:08:51 +0100 Subject: [PATCH] Remove empty space and __all__. --- purchase.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/purchase.py b/purchase.py index 6be0ed3..25fb77b 100644 --- a/purchase.py +++ b/purchase.py @@ -4,8 +4,6 @@ from trytond.pool import Pool, PoolMeta from trytond.exceptions import UserError from trytond.i18n import gettext -__all__ = ['Purchase'] - class Purchase(metaclass=PoolMeta): __name__ = 'purchase.purchase' @@ -18,7 +16,7 @@ class Purchase(metaclass=PoolMeta): super(Purchase, cls).quote(purchases) for purchase in purchases: for line in purchase.lines: - if (line.product and + if (line.product and line.product.purchase_homologation_required): product_suppliers = PProductSupplier.search([ ('template','=',line.product.template.id), @@ -28,4 +26,4 @@ class Purchase(metaclass=PoolMeta): raise UserError(gettext( 'product_purchase_homologation.cannot_end_purchase', purchase=purchase.id, - line=line.rec_name)) \ No newline at end of file + line=line.rec_name))