Is there a way to add a fixed line spacing between Total and 0.00?
OTHER DISCOUNTS
-------------------------
Description Amount
CM 10.00
-------------------------
Total 10.00
0.00
19,380.00
0.00
0.00
0.00
19,370.00
My code: ${'OTHER DISCOUNTS'.ljust(10)} ${''.rjust(25,'-')} ${'Description'.ljust(15)} ${'Amount'.ljust(10)} % for l in object.account_invoice_deduction_line: ${l.description[:10].ljust(15)} ${"{:4,.2f}".format(l.amount).ljust(10)} %endfor ${''.rjust(25,'-')} ${"Total".ljust(15)} ${"{:4,.2f}".format(object.total_applied_discount).ljust(10)} %set end_line = vars.line_counter %for _ in range(1, 28): %set end_line = end_line + 1 %if end_line < 20: ${''} %endif %endfor ${"".rjust(80)}${"{:4,.2f}".format(vars.vatable_sales)} ${"".rjust(80)}${"{:4,.2f}".format(vars.vat_exempt_sales)} ${"".rjust(80)}${"0.00"} ${"".rjust(80)}${"{:4,.2f}".format(object.amount_tax)} ${"".rjust(80)}${"{:4,.2f}".format(vars.outright_discount + vars.cash_discount + vars.freight_discount + vars.promo_discount)} ${"".rjust(80)}${"{:4,.2f}".format(object.residual)}
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
1
Reply
2392
Views
Hello,
Below block added a some extra lines so you don't want this block so remove this section.
This Section is unnecessary right now as per your posted code,
so you not require this so please remove this section.
**************************************************************
%set end_line = vars.line_counter
%for _ in range(1, 28):
%set end_line = end_line + 1
%if end_line < 20:
${''}
%endif
%endfor
Thanks