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')