Skip to Content
Menu
This question has been flagged
1 Reply
1389 Views

I have a module where I need to use Dominican Pesos (DOP) and Dollars (USD) as currencies, but DOP is not active by Default. How can I set DOP as active when installing a module?
I have try with this but that code is for adding a new currency, and what I want to do is to set the field 'active' of an existing currency as True.

`<?xml version='1.0' encoding='utf-8'?>
<odoo>
  <data noupdate="1">
    <record id="74" model="res.currency">
      <field name="active">True</field>
    </record>
  </data>
</odoo>`

Avatar
Discard
Best Answer

Hi,

Instead of record ID you have to give the external id, the external id is base.DOP ,

So try like this,

<record id="base.DOP" model="res.currency">
<field name="active">True</field>
</record>

To get external ID of record, see: How To Find External ID Of Records in Odoo

Thanks

Avatar
Discard