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
2565
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
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
0
Nov 24
|
132 | ||
|
0
Jun 24
|
268 | ||
|
1
Jun 24
|
701 | ||
|
0
Oct 23
|
952 | ||
|
2
Mar 23
|
1488 |