Odoo Help


If date is less then current date lock some fields or a field?

on 5/21/15, 11:59 AM 917 views

Hello Odoo community,

I was thinking if there is any example that let say if invoice date is less then current date lock particular fields or field?

Any example or ideas would be appreciated

Thank you

Ray Carnes
On 5/21/15, 12:56 PM

Have you tried using the readonly attribute with something like

('date','<=', ((context_today()-datetime.timedelta(days=10)).strftime('%Y-%m-%d')))  

(I haven't - just an idea)


About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 5/21/15, 11:59 AM
Seen: 917 times
Last updated: 10/23/15, 9:18 AM