Pinakin Nayi (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-addons11-google-import-pna into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons11-google-import-pna/+merge/126197
Hello Sir,
I improved google import.
1 ) add close button in import google contact notification wizard.
2 ) error opening recurrent meeting and imported meetings.
Thanks,
pna
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons11-google-import-pna/+merge/126197
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-addons11-google-import-pna.
=== modified file 'base_calendar/crm_meeting.py'
--- base_calendar/crm_meeting.py 2012-09-19 10:23:52 +0000
+++ base_calendar/crm_meeting.py 2012-09-25 08:46:33 +0000
@@ -88,4 +88,50 @@
def case_close_send_note(self, cr, uid, ids, context=None):
return self.message_post(cr, uid, ids, body=_("Meeting <b>completed</b>."), context=context)
+#override following methods to avoid recurrency meeting view problem
+class mail_message(osv.Model):
+ _inherit = 'mail.message'
+ def search(self, cr, uid, args, offset=0, limit=0, order=None, context=None, count=False):
+ for arg in args:
+ if arg[0] == "res_id":
+ if isinstance(arg[2], (str)):
+ args[1][2] = self.pool.get('calendar.event').remove_virtual_id(arg[2])
+ res = super(mail_message, self).search(cr, uid, args, offset, limit, order, context, count=False)
+ if count:
+ return len(res)
+ elif limit:
+ return res[offset:offset+limit]
+ else:
+ return res
+mail_message()
+
+class mail_compose_message(osv.Model):
+ _inherit = 'mail.compose.message'
+ # if not web warning message
+ def default_get(self, cr, uid, fields, context=None):
+ if context is None:
+ context = {}
+ res_id = context.get('default_res_id', context.get('active_id'))
+ if isinstance(res_id, (str)):
+ res_id = self.pool.get('calendar.event').remove_virtual_id(res_id)
+ context.update({'default_res_id':res_id})
+ result = super(mail_compose_message, self).default_get(cr, uid, fields, context=context)
+ return result
+mail_compose_message()
+
+class ir_attachment(osv.Model):
+ _inherit = 'ir.attachment'
+ def search(self, cr, uid, args, offset=0, limit=0, order=None, context=None, count=False):
+ for arg in args:
+ if arg[0] == "res_id":
+ if isinstance(arg[2], (str)):
+ args[1][2] = self.pool.get('calendar.event').remove_virtual_id(arg[2])
+ res = super(ir_attachment, self).search(cr, uid, args, offset, limit, order, context, count=False)
+ if count:
+ return len(res)
+ elif limit:
+ return res[offset:offset+limit]
+ else:
+ return res
+ir_attachment()
=== modified file 'import_google/wizard/google_import_message_view.xml'
--- import_google/wizard/google_import_message_view.xml 2012-08-08 13:06:14 +0000
+++ import_google/wizard/google_import_message_view.xml 2012-09-25 08:46:33 +0000
@@ -10,6 +10,9 @@
<group>
<field name='name'/>
</group>
+ <footer>
+ <button string="Close" special="cancel" />
+ </footer>
</form>
</field>
</record>
=== modified file 'import_google/wizard/import_google_data.py'
--- import_google/wizard/import_google_data.py 2012-08-30 08:57:28 +0000
+++ import_google/wizard/import_google_data.py 2012-09-25 08:46:33 +0000
@@ -104,8 +104,8 @@
_columns = {
'customer': fields.boolean('Customer', help="Check this box to set newly created partner as Customer."),
'supplier': fields.boolean('Supplier', help="Check this box to set newly created partner as Supplier."),
- 'group_name': fields.selection(_get_group, "Group Name",help="Choose which group to import, By default it takes all."),
- 'calendar_name': fields.selection(_get_calendars, "Calendar Name"),
+ 'group_name': fields.selection(_get_group, "Group Name", required= True, help="Choose which group to import, By default it takes all."),
+ 'calendar_name': fields.selection(_get_calendars, "Calendar Name", required= True),
}
_defaults = {
_______________________________________________
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