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["city"] = report.invoice_address.subdivision_municipality.name
data["zone"] = report.zone.name if report.zone else "" data["zone"] = report.zone.name if report.zone else ""
data["table"] = report.table.name if report.table else "" data["table"] = report.table.name if report.table else ""
data["lines"] = [{ # data["lines"] = [{
'type': line.type, # 'type': line.type,
"product": line.product.name if line.type != 'title' else None, # "product": line.product.name if line.type != 'title' else None,
"quantity": line.quantity 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} # "uom": line.unit.name if line.type != 'title' else None}
for line in report.lines] # for line in report.lines]
data["lines"] = [{ data["lines"] = [{
'type': line.type, 'type': line.type,
"product": line.product.name if line.type != 'title' else None, "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, "quantity": line.quantity if line.type != 'title' else None,
"uom": line.unit.name 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] for line in report.lines if not line.impreso]