From 295f1c80c5227e26f66079b191c1582c7624179f Mon Sep 17 00:00:00 2001 From: Mauricio Baeza Date: Tue, 31 Oct 2017 20:08:18 -0600 Subject: [PATCH] Fix - PDF con varios productos --- source/app/controllers/util.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/source/app/controllers/util.py b/source/app/controllers/util.py index 979dacc..0c1af30 100644 --- a/source/app/controllers/util.py +++ b/source/app/controllers/util.py @@ -673,6 +673,23 @@ class LIBO(object): cell_4 = self._set_cell('{cantidad}', cantidad, value=True) cell_5 = self._set_cell('{valorunitario}', valor_unitario, value=True) cell_6 = self._set_cell('{importe}', importe, value=True) + else: + row = cell_2.getCellAddress().Row + 1 + self._sheet.getRows().insertByIndex(row, 1) + if cell_1: + self._copy_cell(cell_1) + cell_1 = self._set_cell(v=key, cell=cell_1) + if cell_3: + self._copy_cell(cell_3) + cell_3 = self._set_cell(v=unidad, cell=cell_3) + self._copy_cell(cell_2) + self._copy_cell(cell_4) + self._copy_cell(cell_5) + self._copy_cell(cell_6) + cell_2 = self._set_cell(v=description, cell=cell_2) + cell_4 = self._set_cell(v=cantidad, cell=cell_4, value=True) + cell_5 = self._set_cell(v=valor_unitario, cell=cell_5, value=True) + cell_6 = self._set_cell(v=importe, cell=cell_6, value=True) return def _totales(self, data):