[trunk base_calendar] Bug inviting addresses

Bug #540141 reported by Omar (Pexego)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Medium
OpenERP R&D Addons Team 1

Bug Description

Hi,

I tried to invite three addresses of a partner in crm.meeting, but it did only invite the last address.

In wizard source code I see that if type == 'partner', it enters in a for loop about addresses, but it always update the vals and it does not save vals until the end, therefore only create an attendee for the last.

Otherwise I think that it must check if an attendee for this address or this user already exists and don't always create a new.

Thanks

Tags: pexego
Changed in openobject-addons:
status: New → Confirmed
Revision history for this message
Omar (Pexego) (omar7r) wrote :

Hi rpa,

Other thing for this bug:
att_obj._send_mail(cr, uid, [att_id], mail_to, \
email_from=tools.config.get('email_from', False))

The action of send email is executing, before it creates the attendee, therefore att_id isn't the id of the new attendee.

Thanks

Revision history for this message
Rucha (Open ERP) (rpa-openerp) wrote :

Hi Omar,
I have just faced above problem and solved with original one,
Please check attached patch,
Thanks

Revision history for this message
Omar (Pexego) (omar7r) wrote :

Hi rpa,

It doesn't work but only need a small fix, when it creates attendees is passes the context now, but the context is the context of crm.opportunity for example and in this case it contains the key 'default_state' set to 'open' and is trying write this state in attendees but attendees not has this state value, if take away the context it works.

I include your patch with this update and others, give it a look.
Other changes are: if model = 'calendar.attendee' it did a vals.update() and now vals is a list and if type = 'external' did not do same that the other types.

Thanks

Revision history for this message
Omar (Pexego) (omar7r) wrote :

Other thing, if I remove an attendee of attendees many2many of crm.meeting. Not must it delete the attendee? Because then I for example add a new attendee with the wizard and I marked it to send mail, when it saves, it tries send the email and inside it writes the attendees to the meeting, for it obtains these data it search for attendees where ref = 'crm.meeting,(id)' . Therefore it write in the email all attendees created for this meeting, include maybe some that you deleted of the list (many2many).

Thanks

Revision history for this message
Rucha (Open ERP) (rpa-openerp) wrote :

Thanks for the patch Omar,
For type=external changes are done,
Deleting attendee from meeting deletes whole attendee data,
Can you check again for it?
if still there is any problem you can create a new bug as many things are included in this bug it creates confusion,
I attach revised patch, it will work with latest trunk serve, client revisions,
Please check it,
Thanks

Revision history for this message
Omar (Pexego) (omar7r) wrote :

Hi rpa,

It works well and I delete an attendee and it works too. I think you can commit the patch.

Thanks.

Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 1 (openerp-dev-addons1)
importance: Undecided → Medium
tfr (Openerp) (tfr)
Changed in openobject-addons:
milestone: none → 6.0-rc2
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Ujjvala Collins (uco-openerp) wrote :

Hello Omar,

This problem has been resolved in the latest trunk addons. Now we have a separate wizard in base_calendar to invite attendees with revised patch suggested by rpa.

Can you please check again with the latest code?

Please do inform us so that we can close the bug.

Thanks.

Changed in openobject-addons:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.