奇妙な理由で機能しない単純なカスタマイズを行おうとしています。
init .py:
import account_voucher_hash
openerp .py
{
"name" : "Hash Voucher",
"version" : "1.1",
"depends" : [
'base',
'account_voucher',
],
"author" : "me",
"description": """The Module customizes Vouchers""",
'website': 'http://abc.com',
'init_xml': [],
'update_xml': [
'account_voucher_view_hash.xml',
],
'demo_xml': [],
'installable': True,
'active': False,
}
account_voucher_hash.py
from osv import fields, osv
import netsvc
class account_voucher_hash(osv.osv):
_name = 'account.voucher'
_inherit = 'account.voucher'
_columns={
'test1': fields.integer('Test 1'),
'create_uid': fields.many2one('res.users', 'Created By'),
'creator_name': fields.related("create_uid", "name", type="char", string="Creator Name"),
'write_uid': fields.many2one('res.users', 'Modified By'),
'write_name': fields.related("write_uid", "name", type="char", string="Modifier Name"),
}
account_voucher_hash()
account_voucher_view_hash.xml
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_voucher_form" model="ir.ui.view">
<field name="name">account_voucher_hash_form</field>
<field name="model">account.voucher</field>
<field name="type">form</field>
<field name="priority" eval="15"/>
<field name="arch" type="xml">
<field name="inherit_id" ref="account_voucher.view_voucher_form" />
<field name="arch" type="xml">
<field name="reference" select="2" position="after">
<field name="test1"/>
<field name="create_uid"/>
<field name="creator_name"/>
<field name="write_uid"/>
<field name="write_name"/>
</field>
</field>
</field>
</record>
</data>
</openerp>
Journal Voucherフォームには、新しいフィールドは表示されません。どこが間違っているのですか?