[IMP] account_payment:-added the name_get method for the bank account of the payment mode used
bzr revid: mtr@mtr-20100901100359-pi4pyroxjnchi9hw
This commit is contained in:
parent
68b4bf9c52
commit
de012dd986
|
@ -141,7 +141,7 @@
|
|||
<para style="terp_default_9">Used Account </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P1">[[ o.mode.bank_id.name or '-' ]]</para>
|
||||
<para style="P1">[[ get_account_name(o.mode.bank_id.id) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -223,7 +223,7 @@
|
|||
<para style="terp_default_9">[[line.partner_id and line.partner_id.name or '-' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ line.bank_id and line.bank_id.name or '-' ]]</para>
|
||||
<para style="terp_default_9">[[ get_account_name(line.bank_id.id) or '-']]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ get_invoice_name(line.ml_inv_ref.id) or '-' ]]</para>
|
||||
|
|
|
@ -34,6 +34,7 @@ class payment_order(report_sxw.rml_parse):
|
|||
'get_company_currency' : self._get_company_currency,
|
||||
'get_amount_total_in_currency' : self._get_amount_total_in_currency,
|
||||
'get_amount_total' : self._get_amount_total,
|
||||
'get_account_name' : self._get_account_name,
|
||||
|
||||
})
|
||||
def _get_invoice_name(self, invoice_id):
|
||||
|
@ -69,7 +70,15 @@ class payment_order(report_sxw.rml_parse):
|
|||
pool = pooler.get_pool(self.cr.dbname)
|
||||
user = pool.get('res.users').browse(self.cr, self.uid, self.uid)
|
||||
return user.company_id and user.company_id.currency_id and user.company_id.currency_id.name or False
|
||||
|
||||
def _get_account_name(self,bank_id):
|
||||
if bank_id:
|
||||
pool = pooler.get_pool(self.cr.dbname)
|
||||
value_name = pool.get('res.partner.bank').name_get(self.cr, self.uid, [bank_id])
|
||||
if value_name:
|
||||
return value_name[0][1]
|
||||
return False
|
||||
|
||||
report_sxw.report_sxw('report.payment.order', 'payment.order', 'addons/account_payment/report/payment_order.rml', parser=payment_order, header="internal")
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
Loading…
Reference in New Issue