Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
13803 Vizualizări

*.py

test_date1 = fields.Date('Test Date1')
test_date2 = fields.Datetime('Test Date2')

*.xml

<field name="test_date1" widget="daterange"/>
<field name="test_date2" widget="daterange"/>

The date range picker can show in the website,but after click the "Apply",the date range didn't show in field,just blank

Imagine profil
Abandonează

Really appreciate that!Thank you!

Cel mai bun răspuns

add options related_end_date and related_start_date like

<field name="test_date1" widget="daterange" options="{'related_end_date': 'test_date2'}"/>
<field name="test_date2" widget="daterange" options="{'related_start_date': 'test_date1'}"/>

Imagine profil
Abandonează