Skip to Content
Menu
This question has been flagged
1 Reply
1561 Views

Good day,

The due payment report in Odoo 9 is showing the co. address, message and the amount due but it is not showing the name of the customer, it tried to fix it but I couldn't... any suggestion please



This is the report code:

<?xml version="1.0"?>
<t t-name="account.report_overdue_document">
    <t t-call="report.external_layout">
        <div class="page">
            <div class="row">
                <div class="col-xs-5 col-xs-offset-7">



                </div>
                <p>
                    Document: Customer account statement<br/>
                    Date: <span t-esc="Date"/><br/>
                    <t t-if="o.ref">Customer ref: <span t-field="o.ref"/></t>
                </p>

                <t t-if="Lines[o.id]">
                    <span t-field="res_company.overdue_msg"/>
                    <table class="table table-condensed" t-foreach="Lines[o.id]" t-as="currency">
                        <thead>
                            <tr>
                                <th>Reference number</th>
                                <th class="text-center">Date</th>
                                <th class="text-center">Due Date</th>
                                <th>Communication</th>
                                <th class="text-right">Due</th>
                                <th class="text-right">Paid</th>
                                <th class="text-center">Litigation</th>
                            </tr>
                        </thead>
                        <tr t-foreach="Lines[o.id][currency]" t-as="line">
                            <td>
                                <span t-esc="line['move_id']"/>
                            </td>
                            <td>
                                <span t-esc="line['date']"/>
                            </td>
                            <td>
                                <span t-esc="line['date_maturity']"/>
                            </td>
                            <td>
                                <t t-if="line['name'] != '/'"><span t-esc="line['name']"/></t>
                                <span t-esc="line['ref']"/>
                            </td>
                            <td class="text-right">
                                <span t-esc="line['debit']" t-esc-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: &quot;currency&quot;}"/>
                            </td>
                            <td class="text-right">
                                <span t-esc="line['credit']" t-esc-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: &quot;currency&quot;}"/>
                            </td>
                            <td class="text-center">
                                <span t-if="line['blocked']">x</span>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3"/>
                            <td><strong>Sub-Total :</strong></td>
                            <td class="text-right"><span t-esc="Totals[o.id][currency]['due']" t-esc-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: &quot;currency&quot;}"/></td>
                            <td class="text-right"><span t-esc="Totals[o.id][currency]['paid']" t-esc-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: &quot;currency&quot;}"/></td>
                            <td class="text-right"><span t-esc="Totals[o.id][currency]['mat']" t-esc-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: &quot;currency&quot;}"/></td>
                            <td/>
                        </tr>
                        <tr>
                            <td colspan="3"/>
                            <td><strong>Balance :</strong></td>
                            <td class="text-right">
                                <span t-esc="Totals[o.id][currency]['due'] - Totals[o.id][currency]['paid']" t-esc-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: &quot;currency&quot;}"/>
                            </td>
                        </tr>
                    </table>
                </t>
                <p t-if="not Lines[o.id]">
                    <strong>There is nothing due with this customer.</strong>
                </p>
            </div>
        </div>
   </t>
</t>


Avatar
Discard
Best Answer

Dear Abdullah

Try to add this after Customer Reference:

Customer Name: <span t-field="o.display_name"/>


I hope I helped you...

Avatar
Discard