Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd

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
Annuleer

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.

Gerelateerde posts Antwoorden Weergaven Activiteit
1
nov. 16
8531
0
jan. 21
3129
2
dec. 24
6701
0
okt. 20
3124
0
jul. 19
688