(version 9) i need to update odoo/openerp/addons/base/res/res_currency_data.xml file
i created module added field to res.currency and added data file in my modules data folder. but my field is not updating. any suggestions?
from openerp import models, fields
class ResCurrency(models.Model):
_inherit = 'res.currency'
currency_word = fields.Char(translate=True, help='HELP')
and this is my data xml file.
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="0">
<!-- Currencies -->
<record id="base.USD" model="res.currency">
<field name="currency_word">Dollars</field>
</record>
</data>
</openerp>
and xml for field to show up in form view.
<openerp>
<data>
<record id="view_currency_form" model="ir.ui.view">
<field name="name">res.currency.form</field>
<field name="model">res.currency</field>
<field name="inherit_id" ref="base.view_currency_form"/>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="currency_word"/>
</field>
</field>
</record>
</data>
</openerp>
noupdateif it bothers you. and use lowercase foridname. also on creating record you must make sure you are giving all the required fields. and also you can just edit record from python function instead of xml record. gl - Dachi Darchiashvili