Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
6972 Widoki

Hello,

I have a notebook with week days as pages. When I open the module which contains the notebook, I want to have the auto focus on the page associated with the current week day. (  If it's Thursday, I want to see the Thursday page ).

Any ideas on how can I do this ?

I'm  working with Odoo 11 CE.


Thank you!

Awatar
Odrzuć

you can add autofocus="autofocus" to auto focus any page or field. I think you can not do based on conditionally using XML, you need to create JS stuff to do this.

Najlepsza odpowiedź

Hello,

you can try fields_view_get method for it. Where you can set node for page like below code.

for node in document.xpath ("// page [@name = '% s']"% now.strftime ("% a")):
    node.set ("autofocus", "autofocus")

may be this will help you.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
mar 23
3874
0
lut 23
1605
0
lip 24
710
0
lut 23
439
1
sie 22
4571