Fix partner_statement: NULL Error in report

This commit is contained in:
Graeme Gellatly
2022-03-04 10:01:58 +13:00
committed by Miquel Raïch
parent bfa55e80ff
commit c6d04b7572
4 changed files with 31 additions and 40 deletions

View File

@@ -58,11 +58,11 @@ class OutstandingStatementXslx(models.AbstractModel):
if not line.get("ref", ""):
name_to_show = line.get("name", "")
else:
if (line.get("name", "") in line.get("ref", "")) or (
if (line.get("ref", "") in line.get("name", "")) or (
line.get("name", "") == line.get("ref", "")
):
name_to_show = line.get("name", "")
elif line.get("ref", "") not in line.get("name", ""):
else:
name_to_show = line.get("ref", "")
sheet.write(
row_pos, 0, line.get("move_id", ""), FORMATS["format_tcell_left"]