Code review comment for lp:~openerp-dev/openerp-web/trunk-bug-1082009-bth

Revision history for this message
Mohammed Shekha(Open ERP) (msh-openerp) wrote :

Hello,

I think checking just date_start readonly will not fix this issue, currently this fix will stops the feature of drag and drop in calendar view (Would you please recheck and test it with this fix) because if date_start will have readonly=True but there might be a possibility of state exceptions (readonly=True, states={'draft': [('readonly', False)]}), here you have not considered states exception

To check this create Sale order in sale order's calendar view, date_order is date_start and date_order has state exception for draft state, so in draft state date_order field will be editable and in all other state it will be readonly, so we should allow drag and drop for draft state.

The issue is that we will not have modifiers so that we can straight forward check whether field satisfying readonly or not, for calendar view, to fix this we should also consider state based conditions.

(One suggestion according to me) We may have to transfer the field's modifiers in calendar.js itself(As server's transfer_field_to_modifiers returns modifiers) and then we have to compute the domain based on modifiers to check date_start is readonly or not. With this fix we also have to put state field in calendar view as we web-client considers the fields of view in computing domain.

If you have better idea/suggestion or any other way to fix the state exception then it will be better to use that.

Thanks.

« Back to merge proposal