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 205b61b765
commit 69bafccf2b
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')