Mohammed Shekha(Open ERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.1-opw-576512-msh into 
lp:openobject-addons/6.1.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-576512-msh/+merge/114098

Hello,

Fixed the issue of write in crm meeting, meeting should not be write when it is 
done state, this is completely working in form view as we have set readonly 
attrs, so if record is in done state all fields which has readonly attrs will 
become readonly but in calendar view web-client supports the feature of drag 
and drop so if record is in done state still it allows to write the record.

Also the drag and drop feature of dhtmlxschedular not based on per event, event 
drag feature is a config setting for all events on month mode, so we can not 
put the restriction for stop drag for particular event.

Thanks.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-576512-msh/+merge/114098
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.1-opw-576512-msh.
=== modified file 'crm/crm_meeting.py'
--- crm/crm_meeting.py	2011-10-16 01:28:00 +0000
+++ crm/crm_meeting.py	2012-07-10 05:09:21 +0000
@@ -95,6 +95,16 @@
             self.log(cr, uid, id, message)
         return res
 
+    def write(self, cr, uid, ids, vals, context=None):
+        #To Fix the issue of calendar view drag and drop which allows to
+        #write the record which is already in done state.
+        if context is None:
+            context = {}
+        for result in self.browse(cr, uid, ids, context=context):
+            if result.state == 'done':
+                raise osv.except_osv(_("Warning !"),_("You can not change the meeting which is in Done state."))
+        return super(crm_meeting, self).write(cr, uid, ids, vals, context=context) 
+
 crm_meeting()
 
 class calendar_attendee(osv.osv):

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to