Khushboo Bhatt(openerp) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-calendar-hmo-p1--duplicate_meeting-kbh 
into lp:~openerp-dev/openobject-addons/trunk-calendar-hmo-p1-.

Requested reviews:
  Jigar Amin  (OpenERP) (jam-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-calendar-hmo-p1--duplicate_meeting-kbh/+merge/86878

Hello,
 
 Implemented copy method for prevent some fields while duplicating meeting in 
base_calendar module.

Thank You,
kbh.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-calendar-hmo-p1--duplicate_meeting-kbh/+merge/86878
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-calendar-hmo-p1-.
=== modified file 'base_calendar/calendar_event.py'
--- base_calendar/calendar_event.py	2011-12-22 10:35:40 +0000
+++ base_calendar/calendar_event.py	2011-12-26 05:04:27 +0000
@@ -148,4 +148,31 @@
         """
         return self.write(cr, uid, ids, {'state': 'done'}, context)
 
+    def copy(self, cr, uid, id, default=None, context=None):
+        """
+        Create the new record in calendar_event model from existing one
+        @param cr: A database cursor
+        @param user: ID of the user currently logged in
+        @param id: list of record ids on which copy method executes
+        @param default: dict type contains the values to be overridden during copy of object
+        @param context: context arguments, like lang, time zone
+
+        @return: Returns the id of the new record
+        """
+
+        default.update({
+            'recurrency':False,
+            'location':False,
+            'state':'draft',
+            'allday':False,
+            'duration':0.0,
+            'edit_all':False,
+            'alarm_ids':False,
+            'attendee_ids':False
+
+            })
+
+        event_id = super(calendar_event, self).copy(cr, uid, id, default, context=context)
+        return event_id
+
 calendar_event()

_______________________________________________
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