Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
6976 Weergaven

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!

Avatar
Annuleer

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.

Beste antwoord

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.

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
2
mrt. 23
3886
0
feb. 23
1609
0
jul. 24
712
0
feb. 23
439
1
aug. 22
4573