Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
1 Svar
3575 Visninger

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

Avatar
Kassér
Bedste svar

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
Avatar
Kassér

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 Besvarelser Visninger Aktivitet
5
jun. 20
6863
1
apr. 16
5032
2
mar. 15
6442
1
maj 24
2607
0
jan. 24
2459