Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
6030 มุมมอง

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Time field in odoo แก้ไขแล้ว
3
มี.ค. 20
43074
0
เม.ย. 22
2617
3
เม.ย. 21
8810
1
ก.พ. 18
2513
1
ส.ค. 17
5815