From 911ae2548fe81af9058cc15d5645ec53c1ee87a0 Mon Sep 17 00:00:00 2001 From: Andreas Osim Date: Wed, 7 Jul 2021 15:35:43 +0200 Subject: [PATCH] add signature to delivery_sheet --- ext/custom-addons/dp_custom/models/stock.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ext/custom-addons/dp_custom/models/stock.py b/ext/custom-addons/dp_custom/models/stock.py index 9120acfe..dbbf7fb7 100644 --- a/ext/custom-addons/dp_custom/models/stock.py +++ b/ext/custom-addons/dp_custom/models/stock.py @@ -77,7 +77,10 @@ class StockPicking(models.Model): if msg != '': # signature2attach = [] - ps = prime_signature.encode('ascii') + if isinstance(prime_signature,bytes): + ps = prime_signature + else: + ps = prime_signature.encode('ascii') signature2attach = { "filename": r'Signature.jpg', "binary" : ps