Do not crash if purchase module is not activated.

This commit is contained in:
Albert Cervera i Areny 2021-04-09 17:01:07 +02:00
parent 6b01be0d29
commit 28b4516849
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ class InvoiceLine(metaclass=PoolMeta):
PurchaseLine = pool.get('purchase.line')
Purchase = pool.get('purchase.purchase')
except:
pass
Purchase = None
invoice_type = Transaction().context.get('invoice_type', 'both')