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

I am using Odoo 15.

I am unable to make any custom changes in the given marked buttons. No any changes take effect on the given button.

As I could not upload the image, I am posting the link of the image

Planning shift Images

The respective custom code is

	​<xpath expr="//form/header/button[@name='action_send']" position="replace">
​​<buttonstring="Publish Test & Send" type="object" name="action_send"class="btn btn-primary"close="1"attrs="{'invisible': ['|', ('state', '=', 'published'), ('resource_type', '=', 'material')]}"groups="planning.group_planning_manager,planning.group_planning_branch_incharge"/>
xpath>

I am looking forward to your answer, Thank you.


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

Thank you everyone. I resolved the issue. I was inheriting the wrong form view. The ref id of the correct form view was "planning.planning_view_form_in_gantt"

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

Hello!

First of all, ensure you're inheriting and refering the parent view correctly. Also, check that the XML file you're editing is in the __manifest__.py.

I don't know if your copy and paste erased spaces (to put it here), but ensure every tag is separated by spaces. What I see in your code is that you have many tags without spaces. Also, close your xpath tag.

Finally, ensure you reset your instance and update the module. Refresh your browser after that.

Greetings!

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

these mistakes in syntax are just copy/paste issue. may there be any other reasons except the above u mentioned?

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 10 25
2498
1
thg 9 25
2473
3
thg 7 25
3962
1
thg 5 25
2079
4
thg 5 25
3408