Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
2620 Zobrazení

Hello 
I have a very basic question 

Is it possible to do custom validation on a field in odoo studio ?
I tried wit an action and python code, but without success ...

I could not find any doc or presentation showing this ... event a basic validation ( > 0, regex, etc ...

Thanks


Avatar
Zrušit
Autor Nejlepší odpověď

Answering partially my own question 

MAnaged to do it with this (not sure that thebest way) 
if record.x_studio_capacity <= 0 :
    raise UserError('Capacity should be positive')

What about validate with other records ?
Like to save a reservation, I want to check that another record is not reserved during the same period (start_date / end_date) 
possible  ? 



Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
čvc 25
1428
2
bře 25
1665
0
úno 25
1303
0
úno 25
1532
0
úno 25
1436