콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
7430 화면

Hi im using doo14. i made a custom module and now im facing a error "Element '' cannot be located in parent view" while inheriting

my code

from odoo import fields, models


class Teacher(models.Model):

_inherit = 'hr.employee'

teacher = fields.Boolean( string='Teacher', required=False)





Teacher.form.view
hr.employee












아바타
취소
작성자

this is the XML
<!-- Inherit Form View to Modify it -->
<record id="teacher_form_view" model="ir.ui.view">
<field name="name">Teacher.form.view</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<field name="coach_id" position="after"/>
<field name="teacher"/>

</field>
</record>

작성자

Can you explain what I did wrong

Is it worked?

베스트 답변

Hello alfik,

Please find below answer it may help you,


Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari

아바타
취소

<!-- Inherit Form View to Modify it -->
<record id="teacher_form_view" model="ir.ui.view">
<field name="name">Teacher.form.view</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<field name="coach_id" position="after">
<field name="teacher"/>
</field>
</field>
</record>

베스트 답변

Would you provide the full error trace ?

also , did you try to use xpath expr?

아바타
취소

Also check this video to copy/past your code in this forum.
https://www.youtube.com/watch?v=nw3q0Cs1swg&ab_channel=OdooMates

관련 게시물 답글 화면 활동
2
7월 24
7930
0
3월 22
101
2
2월 22
3816
0
1월 24
1278
3
5월 23
3512