Odoo Help

0

Is it possibel add currency symbol in supplier payment screen?

By
samba
on 11/10/14, 6:47 AM 1,491 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
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
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

About This Community

This platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

3 follower(s)

Stats

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