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

How could a date field in xml be set as the minimum date of selection the date before put in other fields?

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,
You can provide the minimum date or maximum date allowed to a date field using ‘datepicker’ in the ‘options’ of the field.
Example,

<  field name="sample_date" options="{'datepicker': {'minDate': '6/6/2021'}}"/>
or
<  field name="sample_date" options="{'datepicker': {'minDate': 'now'}}"/>
Regards
อวตาร
ละทิ้ง

how about number sir? can you help

<?xml version="1.0"?>
<xpath expr="//field[@name='order_line']/tree//field[@name='price_unit']" position="after">
<field name="purchase_price" groups="base.group_user" required="1" type="number" min="1"/>
</xpath>

Related Posts ตอบกลับ มุมมอง กิจกรรม
Inherit from inherited view แก้ไขแล้ว
5
มิ.ย. 20
6875
1
เม.ย. 16
5041
2
มี.ค. 15
6456
1
พ.ค. 24
2620
0
ม.ค. 24
2464