Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
6979 มุมมอง

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!

อวตาร
ละทิ้ง

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.

คำตอบที่ดีที่สุด

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.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
มี.ค. 23
3889
0
ก.พ. 23
1615
0
ก.ค. 24
712
0
ก.พ. 23
439
1
ส.ค. 22
4576