[FIX] point of sale: payment report bad behaviour when printing multiple documents
bzr revid: sle@openerp.com-20140429122400-s2ey704e8qfifzzj
This commit is contained in:
parent
ba6e63d690
commit
0d2a0e8109
|
@ -36,6 +36,7 @@ class pos_payment_report(report_sxw.rml_parse):
|
|||
})
|
||||
|
||||
def _pos_payment(self, obj):
|
||||
self.total = 0
|
||||
data={}
|
||||
sql = """ select id from pos_order where id = %d"""%(obj.id)
|
||||
self.cr.execute(sql)
|
||||
|
|
|
@ -3,23 +3,24 @@
|
|||
<data>
|
||||
<template id="report_payment">
|
||||
<t t-call="report.html_container">
|
||||
<t t-call="report.internal_layout">
|
||||
<div class="page">
|
||||
<h2>Today's Payments</h2>
|
||||
|
||||
<div class="row mt32 mb32">
|
||||
<div class="col-xs-3">
|
||||
<strong>Company</strong>:<br/>
|
||||
<span t-field="res_company.name"/>
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<t t-call="report.internal_layout">
|
||||
<div class="page">
|
||||
<h2>Today's Payments</h2>
|
||||
<div class="row mt32 mb32">
|
||||
<div class="col-xs-3">
|
||||
<strong>Company</strong>:
|
||||
<br/>
|
||||
<span t-field="res_company.name"/>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<strong>Print date</strong>:
|
||||
<br/>
|
||||
<t t-esc="formatLang(time.strftime('%Y-%m-%d'), date='True')"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<strong>Print date</strong>:<br/>
|
||||
<t t-esc="formatLang(time.strftime('%Y-%m-%d'), date='True')"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<table class="table table-condensed">
|
||||
<t t-set="pos_payment" t-value="pos_payment(o)"/>
|
||||
<table class="table table-condensed" t-if="pos_payment">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>
|
||||
|
@ -40,7 +41,7 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr t-foreach="pos_payment(o)" t-as="line_ids">
|
||||
<tr t-foreach="pos_payment" t-as="line_ids">
|
||||
<td>
|
||||
<t t-if="line_ids['code']">
|
||||
<span t-esc="line_ids['code']"/>
|
||||
|
@ -81,8 +82,8 @@
|
|||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue