Odoo Help

0

Odoo 9 product currency_id change

By
Serdar Eren
on 6/16/17, 8:54 AM 335 views

Hi everyone,

I'm trying to make each product should has own currency_id. e.g: Apple IPad's price 300$ for default, its price is dollar because my company currency. But i want to change dollar as euro and this can be each product like one is euro one is dollar one is try. In my custom module view.xml,

 <record id="product_template_form_view_inherited" model="ir.ui.view">
            <field name="name">product.template.common.form.inherited</field>
            <field name="model">product.template</field>
            <field name="inherit_id" ref="product.product_template_form_view" />
            <field name="arch" type="xml">
                <xpath expr="//notebook//page[1]//group//group[@name='group_standard_price']" position="inside">
                    <field name="currency_id" readonly='0'/>
                </xpath>
            </field>
        </record>

in module.py;

class product_price_currency(models.Model):
    _inherit = 'product.template'

    currency_id= fields.Many2one('res.currency',string='Currency',readOnly=False, store=True)

and this code works fine, i can select currency from drop down list and its changing product list_price currency. But when i try to save all changes its become again default company currency. How can i make this changes? Sorry about my english. If its not clear, i can send screenshots.

What do you want to achieve? Why don't you use different pricelists in different currencies as it is foreseen for multi-currency use cases? You'll mess up all Odoo workflows and inventory valuations this way.

Ermin Trevisan
on 6/16/17, 9:55 AM

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

1 follower(s)

Stats

Asked: 6/16/17, 8:54 AM
Seen: 335 times
Last updated: 6/16/17, 8:59 AM