Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
3196 มุมมอง

Hello everybody,   I want to add a constraint but I don't have the idea of how to do it. I created a custom export which auto-generates external ids for each record I export. The export contains a list of students which the lecturer has to update their marks.. and re-imports the same excel sheet which also updates the marks of the students. 

However much there is some information which I don't want the lecturers to update but I have failed to restrict the lecturer from importing the data in case those field values have been updated. 

Any Ideas,  Thank you. 


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hello Brian,

You can modify the logic in write method and check that if the data is being written from Import and user has a group of lecturer, in vals there should ne only marks. If any other key found in vals, it should raise warning.

Thanks,

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ส.ค. 19
8742
Odoo Mail Sending Limit แก้ไขแล้ว
2
ธ.ค. 23
14725
0
พ.ย. 23
1735
0
ต.ค. 23
33
3
ต.ค. 23
788