Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
3252 Lượt xem

Hi all,


It is possible to create tree view on "hr.resume.line" model from "hr_skills" module? Im using Odoo v13.0


Every time I tried to create / access tree view, this error occurs:

Traceback:
Error: can't access property "type", this.fields[attrs.fieldName] is undefined
_extractAttributes@http://localhost:8069/web/static/src/js/views/control_panel/control_panel_view.js:202:13
_parseSearchArch/<@http://localhost:8069/web/static/src/js/views/control_panel/control_panel_view.js:344:22
_.forEach@http://localhost:8069/web/static/lib/underscore/underscore.js:145:17
_parseSearchArch@http://localhost:8069/web/static/src/js/views/control_panel/control_panel_view.js:303:11
init@http://localhost:8069/web/static/src/js/views/control_panel/control_panel_view.js:126:22
OdooClass.extend/</prototype[name]</<@http://localhost:8069/web/static/src/js/core/class.js:90:38
Class@http://localhost:8069/web/static/src/js/core/class.js:107:33
_createControlPanel@http://localhost:8069/web/static/src/js/views/abstract_view.js:282:32
getController@http://localhost:8069/web/static/src/js/views/abstract_view.js:213:51
OdooClass.extend/</prototype[name]</<@http://localhost:8069/web/static/src/js/core/class.js:90:38
_createViewController/def<@http://localhost:8069/web/static/src/js/chrome/action_manager_act_window.js:195:22
_createViewController@http://localhost:8069/web/static/src/js/chrome/action_manager_act_window.js:193:23
_executeWindowAction/</<@http://localhost:8069/web/static/src/js/chrome/action_manager_act_window.js:307:43

Here's the action xml:

<record id="action_hr_resume_line" model="ir.actions.act_window">
<field name="name">Resume Line</field>
<field name="res_model">hr.resume.line</field>
<field name="type">ir.actions.act_window</field>
<field name="view_mode">tree</field>
</record>

Thanks

Ảnh đại diện
Huỷ bỏ
Tác giả

anyone?

Tác giả Câu trả lời hay nhất

Dear, Kiran Mohan,

Thanks for the reply, i've tried but the same error still occurs


Update on 29/4/21

Closed,

Turns out theres xml groupBy that require 'line_type' when there's no field 'line_type' on the model, just add field 'line_type' to the model and its done!

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi ,


Try 

<record id="action_hr_resume_line" model="ir.actions.act_window">

    <field name="name">Resume Line</field>

    <field name="res_model">hr.resume.line</field>

    <field name="view_mode">tree</field>

</record>


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 9 21
11267
1
thg 4 16
3918
1
thg 3 15
4471
1
thg 3 15
6378
4
thg 6 25
11248