Comment 6 for bug 1082009

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Anto,

I think you do not understand the issue properly and make this bug as a invalid.

Give me a chance to elaborate more specific here.

@Anto:
First of all here not an issue with user. Not affected that we are login with Administrator cause. You can If user is Administrator then after he should not be able to change the read only field 's value. Second you got the error "Access Denied" with demo user this is not an issue cause you don't have enough rights , If you assign the "HR/Manager" group to Demo user then you 'll see the problem clearly.

Also you told that we have put the 'states' which is fine but it doesn't affect to calender view (this is the actual problem).

Let me give you clear step to reproduce the bug.

1) Create a leave request. Validate it and approve it.
2) See Start date and end date is read-only which is fine as we put the 'states' on datetime field. So we can not changed the value from form view (even the user is admin and has a super power ;-) ).
3) Now go to calender view. You can change that value via drag and drop feature which should not be possible cause field is on read-only mode.

*Solution as per fme*

He suggested the we have to override the write method and raise the error, If it is on readonly state.

@Fme
Do you think this is the feasible solution that we have to fix this issue from addons side. Let me show you clear picture if we are going to fix this issue from addons side then we have to fix this on following view also.

*Holidays (Leave request)
* Meeting
* Event
* Sale Order
* Project task
* Project phases
* project Issue
* Purchase Order
* Manufacturing Order etc....(All view have a calender view and has a date field on read only mode as per specific state)

So I think your suggested solution is correct. Also same thing possible on gantt view also see lp:1084591. Strange for me You have consider lp:1084591 this on web (gantt view) and transfer this one t addons (Really I do not understand).

I am reopening this bug, and my strong opinion is this should be fix from web side. Right now it is on addons. Addons and web team can take the decision where this issue should be fix.

Thank you!