Skip to Content
Menu
This question has been flagged

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.

Avatar
Discard

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.

Related Posts Replies Views Activity
1
Nov 16
7195
0
Jan 21
2164
2
Oct 23
4337
0
Oct 20
2071
0
Jul 19
688