Se añade descripcion en la linea

This commit is contained in:
sinergia 2023-09-05 17:45:45 +00:00
parent ee13006322
commit cb12fe5e0c

13
sale.py
View File

@ -195,16 +195,17 @@ class Sale(metaclass=PoolMeta):
data["city"] = report.invoice_address.subdivision_municipality.name
data["zone"] = report.zone.name if report.zone else ""
data["table"] = report.table.name if report.table else ""
data["lines"] = [{
'type': line.type,
"product": line.product.name if line.type != 'title' else None,
"quantity": line.quantity if line.type != 'title' else None,
"uom": line.unit.name if line.type != 'title' else None}
for line in report.lines]
# data["lines"] = [{
# 'type': line.type,
# "product": line.product.name if line.type != 'title' else None,
# "quantity": line.quantity if line.type != 'title' else None,
# "uom": line.unit.name if line.type != 'title' else None}
# for line in report.lines]
data["lines"] = [{
'type': line.type,
"product": line.product.name if line.type != 'title' else None,
"description": line.description if line.type != 'title' else None,
"quantity": line.quantity if line.type != 'title' else None,
"uom": line.unit.name if line.type != 'title' else None}
for line in report.lines if not line.impreso]