From e318b5c6f9066e3af68ba55e5d5fb140c703b961 Mon Sep 17 00:00:00 2001 From: marite Date: Fri, 24 Sep 2021 09:10:12 +0200 Subject: [PATCH] Fix context when None --- som_generationkwh/giscedata_facturacio.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/som_generationkwh/giscedata_facturacio.py b/som_generationkwh/giscedata_facturacio.py index 8923f295..fdaef405 100644 --- a/som_generationkwh/giscedata_facturacio.py +++ b/som_generationkwh/giscedata_facturacio.py @@ -577,6 +577,9 @@ def is_gkwh(self, cursor, uid, ids, context=None): def unlink(self, cursor, uid, ids, context=None): """Return gkwh rights to owner when gkwh invoice line is droped""" + if not context: + context = {} + fact_obj = self.pool.get('giscedata.facturacio.factura') gkwh_lineowner_obj = self.pool.get('generationkwh.invoice.line.owner') gkwh_dealer_obj = self.pool.get('generationkwh.dealer')