跳至內容
選單
此問題已被標幟
1 回覆
5962 瀏覽次數

I have this in my models:

# -*- coding: utf-8 -*-
from openerp import models, fields
 class event_event(models.Model):
 _inherit = ["event.event"]


testing = fields.Char('test') 



and this in my view:

<record model="ir.ui.view" id="res_partner_view">
     <field name="name">res.partner.form</field>
     <field name="model">res.partner</field>
     <field name="inherit_id" ref="base.view_partner_form"/>
     <field name="arch" type="xml">
     <xpath expr="//notebook[last()]" position="inside">
         <page string="My_New_Tab">
             <field name="testing"/>
         </page>
     </xpath>
     </field>
 </record>


Odoo is still giving me this:

Error details: Field `testing` does not exist

why?

頭像
捨棄
最佳答案

This is because, your field "testing" lies in model 'event.event'
and you try to call it in 'res.partner'.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
3
3月 20
42890
0
4月 22
2570
3
4月 21
8715
1
2月 18
2439
1
8月 17
5683