Skip to content

Commit

Permalink
if can not be show in OV neither in the pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
FranciscoCubero committed Jul 26, 2024
1 parent 162d42f commit a3b849b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions giscedata_facturacio_comer_som/giscedata_facturacio_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -3901,6 +3901,14 @@ def has_active_flux_solar(fact, pol):
if not has_active_flux_solar(fact, pol):
return {"is_visible": False}

imd_obj = self.pool.get("ir.model.data")
hidden_flux_id = imd_obj.get_object_reference(
self.cursor, self.uid, "som_polissa", "categ_flux_solar_ocult_ov"
)[1]
for categ in pol.category_id:
if categ.id == hidden_flux_id:
return {"is_visible": False}

autoconsum_excedents_product_id = self.get_autoconsum_excedents_product_id(fact)
ajustment = 0.0
surplus_kwh = 0.0
Expand Down

0 comments on commit a3b849b

Please sign in to comment.