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

I would like to have an inline editable treeview as in Journal Items (when you click on an element from the list, it becomes editable inline). Any idea how to do this?

Thanks in advance,

Best regards,

Ảnh đại diện
Huỷ bỏ

Did you find out how to do it

from js will we be abele to add editabel='top' to the list view?

Câu trả lời hay nhất

You need to change that treeview to have an additional attribute:

editable="top"

You can also do "bottom" if you prefer that. You need to put that change in a custom module, with XML, if you want that change to be permanent. You can also activate developer mode from the "About Odoo" popup, and edit the view manually through the additional menu option on top of the page. This change will be overwritten the next time you upgrade/refresh the Odoo modules, though.

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

Ok, I was trying to do that on a function field with type="one2many", which don't work. I accepted your answer as it works in "normal" use case :) Regards

Well, by definition function field does not directly relate to a physical record and thus usually is not editable. But you can specify fnct_inv for the function field to specify how values will be stored/saved and then you can do the inline editing. Samples abound in account/account.py.

Tác giả

It's not directly linked to the question, but your comment totally solves my problem! I now have a function field type one2many with an fnct_inv in my model and the editable="top" works with it! Thanks a lot. Now, I've one last issue : https://www.odoo.com/forum/help-1/question/fields-function-with-type-one2many-in-wizard-61049. Any idea ?

Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 4 25
4792
5
thg 11 23
43162
3
thg 9 23
9558
1
thg 9 22
3829
1
thg 6 22
12650