Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4653 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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)

 

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 1 24
2350
2
thg 6 22
4302
2
thg 6 18
5875
2
thg 11 16
13391
2
thg 2 24
12361