تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
5955 أدوات العرض

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'.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
Time field in odoo تم الحل
3
مارس 20
42882
0
أبريل 22
2570
3
أبريل 21
8714
1
فبراير 18
2437
1
أغسطس 17
5681