تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
4728 أدوات العرض

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

الصورة الرمزية
إهمال
أفضل إجابة

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)

 

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
يناير 24
2539
2
يونيو 22
4471
2
يونيو 18
6036
2
نوفمبر 16
13629
2
فبراير 24
12525