コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
4022 ビュー

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?

アバター
破棄
最善の回答

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

アバター
破棄
著作者

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

著作者

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

著作者

Thanks that worked.

関連投稿 返信 ビュー 活動
0
11月 19
3677
6
8月 19
4474
3
2月 19
7073
0
2月 18
4490
2
11月 17
9209