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

Is it possibel add currency symbol in supplier payment screen?

By
samba
on 11/10/14, 6:47 AM 1,269 views

Accounting -> supplier payments -> click on "create" . When i select supplier in the screen, related all invioces are appeared on the scree. But two columns "Original amount", "Open balance" and " total of payment " does not contains currency symbol. I try to modify the code like this. But the below code not showing symbol. Can any one look into the code and find the problem

Reference files:odoo-7-1/addons/account_voucher/voucher_payment_receipt_view.xml                                                  /odoo-7-1/addons/account_voucher/account_voucher.py

<openerp>
    <data>
        <record model="ir.ui.view" id="view_vendor_payment_form_extension">
            <field name="name">view.vendor.payment.form.extension</field>
            <field name="model">account.voucher</field>
            <field name="inherit_id" ref="account_voucher.view_vendor_payment_form"/>
            <field name="arch" type="xml">
                <xpath expr="/form/sheet/notebook/page[1]/field[@name='line_dr_ids']/tree/field[@name='amount_original']" position='replace'>
                 <field name="amount_original" readonly="1" class="oe_inline" widget='monetary' options='{"currency_field": "currency_id"}'/>  
                </xpath>
            </field>
        </record>
    </data>
</openerp>

Hello samba, I'm afraid that the widget monetary only works for forms, not trees: https://github.com/odoo/odoo/blob/8.0/addons/web/static/src/js/view_form.js#L6071 Please follow John's link to view some other options. Regards.

Marvin Taboada
on 11/11/14, 5:31 AM
0

Ivan

--Ivan--
3210
| 5 3 6
Jakarta, Indonesia
--Ivan--
Ivan
On 11/11/14, 4:14 AM

I posted an answer for this question: https://www.odoo.com/forum/help-1/question/how-to-show-currency-symbol-instead-of-currency-name-in-a-treeview-67588#answer-67602.  Hope it will help you.

0

Med Said BARA

--Med Said BARA--
2664
| 5 5 7
Algeria
--Med Said BARA--
Med Said BARA
On 11/11/14, 10:33 AM

Why not using base_currency_symbol  (or read the code in this module)

Hello Med Said BARA, I have read sources of the suggested module but (1) it only contributes the last three fields below, (2) only adds the new fields to the 'res.currency' form. "Symbol Position" is actually an original field defined for 'res.currency' that is used by the 'monetary' widget (previously mentioned) to format its output https://github.com/odoo/odoo/blob/8.0/addons/web/static/src/js/view_form.js#L6097

Marvin Taboada
on 11/11/14, 12:39 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

3 follower(s)

Stats

Asked: 11/10/14, 6:47 AM
Seen: 1269 times
Last updated: 3/16/15, 8:10 AM