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

Is there a way to hide the text "Activate here a new currency before creating a new company." in the company form view bellow the currency field? Or at least change the text?

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

Hi Samo Arko,
I couldn't find the field you mentioned. You can simply solve your problem by:

1) Activating the developer mode (Settings/ Activate Developer Mode)
2) Go to the form you want to edit(where is the field) and click "Edit form view"

3) Find the object or field that you want to edit and add change/attribute:


When it comes to field these are the commone attributes
- invisible="1" if you want to make the entire field invisible

- placeholder="some text" if you want to change the placeholder(like odoo.com to your website)
- help="some help" - this is displayed when you hover over the field
4) Save and refresh

Remember that if you want to make apermament chage you will have to write a module for that. If not your field attributes will come back to the previous state as soon as you update the Odoo

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

I know how to hide fields and using the developer tools. With it I found that it's shown bellow the currency field. The problem is I think that it is text that is shown with javascript and it's reletad to the filed by the currency fields id. I tried to set the ID to empty '' with xpath expresion, but then I gotten an error that it can't find the ID in the view. And the way you described is the absolute wrong way of doing changes!

I have updated the post with screenshots and it works. I disagree with you - changing first in a developer mode is a good practice so you can see if the logic was good before starting to write a module

Tác giả

OK I found the code you posted. Had to look into the inherited views. Now how can I hide the html code without just comment it out in the edit form view but from a custom inherited view?

I would catch the "p" from inherited view and replace it with something:

<xpath expr="//p[1]" position="replace">

<br/>

</xpath>

or create another view with different sequence or just set the attribute of p for invisible

Tác giả

Thanks that worked.

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 11 19
3507
6
thg 8 19
4365
3
thg 2 19
6931
0
thg 2 18
4359
2
thg 11 17
9040