Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
620 Weergaven

We are using v17, Odoo online.  


How would we set minimum ecommerce order value?  Say, only allows orders (check out) above $100.  Is there any way to set or manage this?  We have set a text alert on each of the product pages, but wondering if there was also a hard block function to force minimum order value?  


Thank you.  

Avatar
Annuleer
Beste antwoord

set a sql constraint checker:  define a function using decorator  "@api.constrains('field1', 'field2'...)".  

Then only the input value matchs your checker can be allowed and validated , otherwise it will raise an error by popping a notification window. 

See the example in the official doc:  developer/tutorials/getting_started/Chapter 11: Constraints

Avatar
Annuleer

Sorry i didn't noticed your online version, not sure whether the solution above works