Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Printing the Supplier Invoice number on report

By
Emad Jaddou
on 3/30/15, 4:18 AM 544 views

Hi Trying to print the payment details after issuing the check/payment.


I am using the following code:

 <?xml version="1.0"?>
<t t-name="account_check_writing.report_check">
 <t t-call="report.external_layout">
    <t t-call="report.html_container">
        <t t-foreach="docs" t-as="o">
            <div class="page">
      <div class="row">
        <div class="col-xs-5 col-xs-offset-7">
          <address t-field="o.partner_id" t-field-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;], &quot;no_marker&quot;: true}"/>
        </div>
      </div>
         <h2>
          <strong>Payment Voucher:</strong>
                <span t-field="o.number"/>
       </h2>
      <div class="row mt32 mb32">
        <div class="col-xs-2">
          <strong>Payment Date:</strong>
                <p t-esc="formatLang(o.date , date=True)"/>
        </div>
      <div class="col-xs-3">
          <strong>Payment Amount:</strong>
                <p  t-field="o.amount" t-field-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: &quot;o.currency_id&quot;}"/>
        </div>
      </div>
                <table class="table table-condensed">
                    <thead>
                        <tr>
                            <th class="text-left">Due Date</th>
                            <th class="text-right">Reference</th>
                            <th class="text-right">Original Amount</th>
                            <th class="text-right">Open Balance</th>
                            <th class="text-right">Payment</th>
                        </tr>
                    </thead>
                    <tbody>
                      <tr t-foreach="get_lines(o.line_dr_ids)" t-as="l">
                        <t t-if="formatLang(l['amount']) != '0.00'">
                            <td>
                                <p t-if="l['date_due']">
                                    <span t-esc="formatLang(l['date_due'], date=True)"/>
                                </p>
                            </td>
                            <td class="text-right"><span t-esc="l['name']"/></td>
                            <td class="text-right"><span t-esc="formatLang(l['amount_original'])"/></td>
                            <td class="text-right"><span t-esc="formatLang(l['amount_unreconciled'])"/></td>
                            <td class="text-right"><span t-esc="formatLang(l['amount'])"/></td>
                        </t>
                       </tr>
                    </tbody>
                </table>
            </div>
        </t>
    </t>
</t>
</t>
My problem is with the following line:

                            &lt;td class="text-right">&lt;span t-esc="l['name']"/>&lt;/td> 
there is no reference number (supplier invoice / system reference) being printed. What is the variable that should be used to print that?

0

zbik

--zbik--
5941
| 6 4 7
Lodz, Poland
--zbik--


zbik
On 3/30/15, 9:06 AM

See this todays commit, may be related.

your link is not working

Emad Jaddou
on 3/30/15, 10:52 AM

sorry, updated

zbik
on 3/30/15, 11:13 AM

Do I need to do anything after updating that commit?

Emad Jaddou
on 3/30/15, 1:17 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 3/30/15, 4:18 AM
Seen: 544 times
Last updated: 3/30/15, 11:13 AM