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

I am getting "Element '%s' cannot be located in parent view") error when using an inherited view in which a field with only string attribute is used for inheriting, when I am using user language as Turkish(Probably for any other language than English).  Below is the view that causes the error in the addon oh_hr_zk_attendance of Cybrosys when clicking Attandances->Manager->Attandances manu item.


<recordid="inherited_hr_attendance_view_filter"model="ir.ui.view">
    <fieldname="name">inherited_hr_attendance_view_filterfield>
    <fieldname="model">hr.attendancefield>
    <fieldname="inherit_id"ref="hr_attendance.hr_attendance_view_filter"/>
    <fieldname="arch"type="xml">
        <searchstring="Hr Attendance Search"><groupexpand="0"string="Group By">
            <separator/>
            <filtername="date"string="Date"context="{'group_by':'check_in:day'}"/>
            group>
        search>
    field>
record>

Error occurs at odoo/addons/base/models/ir_ui_view.py, line 673, in apply_inheritance_specs.
Because the view_id browse(at odoo/odoo/models.py", line 1520, in _fields_view_get) is returned with translated value of fields string attribute,
system doesn't match the values.

Temporary solution is deleting the translation for this field.

아바타
취소
작성자 베스트 답변

Hi Niyas,

This is a part of a third party addon which I only use for my database. They want to inherit and change all "Hr Attendance Search" tag, but this tag has only string attribute to call in inherited file.

The same thing also happened at "view_attendance_tree" view at hr_attendance module of Odoo V13 CE.

Only string attribute is defined and to change it they use this way. 

I think either every tag must have a name / id attribute or using string attribute of tag(this is not the right thing for me) must be under control(comparison of string attribute values of inherited and base views must be done in English).


Thanks.

아바타
취소
베스트 답변

Hi,

It will be nice if you specify what you are trying to do with this view ? need to xpath and add new filter ? In the above code, you can see there is a name attribute for the field, ie name="date" , using this you can inherit right ?


Thanks

아바타
취소
관련 게시물 답글 화면 활동
0
12월 24
1336
0
7월 24
1189
2
2월 24
2862
4
11월 23
3203
0
11월 23
1386