[FIX]: base_calendar crm: fixed minor problem in base_calendar and base calendar invite attendee wizard , added onchange partner_id in crm phonecall
bzr revid: atp@tinyerp.co.in-20100325130511-9vmg5yd4jofetwcm
This commit is contained in:
@@ -287,7 +287,7 @@ class calendar_attendee(osv.osv):
|
||||
|
||||
def _links_get(self, cr, uid, context={}):
|
||||
"""
|
||||
Get request link and put in ref field.
|
||||
Get request link for ref field in calendar attendee.
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param context: A standard dictionary for contextual values
|
||||
@@ -415,7 +415,7 @@ request was delegated to"),
|
||||
|
||||
def _send_mail(self, cr, uid, ids, mail_to, email_from=tools.config.get('email_from', False), context={}):
|
||||
"""
|
||||
send mail.
|
||||
Send mail for calendar attendee.
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of calendar attendee’s IDs.
|
||||
@@ -566,7 +566,7 @@ are both optional, but if one occurs, so MUST the other"""),
|
||||
|
||||
def do_alarm_create(self, cr, uid, ids, model, date, context={}):
|
||||
"""
|
||||
Create Alarm
|
||||
Create Alarm for meeting.
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of res alarm’s IDs.
|
||||
@@ -959,7 +959,7 @@ class calendar_event(osv.osv):
|
||||
if defaults.get('location'):
|
||||
qry += ", location = '%(location)s'"
|
||||
qry += "WHERE id = %s" % (event_id)
|
||||
cr.execute(qry % (defaults))
|
||||
cr.execute(qry %(defaults))
|
||||
#End Loop
|
||||
return True
|
||||
|
||||
@@ -1063,6 +1063,7 @@ class calendar_event(osv.osv):
|
||||
return ''
|
||||
|
||||
if freq == 'weekly':
|
||||
|
||||
byday = map(lambda x: x.upper(), filter(lambda x: datas.get(x) and x in weekdays, datas))
|
||||
if byday:
|
||||
weekstring = ';BYDAY=' + ','.join(byday)
|
||||
|
||||
@@ -21,8 +21,10 @@
|
||||
|
||||
from base_calendar import base_calendar
|
||||
from osv import fields, osv
|
||||
from tools.translate import _
|
||||
import tools
|
||||
|
||||
|
||||
class base_calendar_invite_attendee(osv.osv_memory):
|
||||
"""
|
||||
Invite attendee.
|
||||
@@ -139,8 +141,7 @@ class base_calendar_invite_attendee(osv.osv_memory):
|
||||
if not mail_to:
|
||||
name = map(lambda x: x[1], filter(lambda x: type==x[0], \
|
||||
self._columns['type'].selection))
|
||||
raise osv.except_osv(_('Error!'), ("%s must have an email \
|
||||
Address to send mail") % (name[0]))
|
||||
raise osv.except_osv(_('Error!'), ("%s must have an email Address to send mail") %(name[0]))
|
||||
att_obj._send_mail(cr, uid, attendees, mail_to, \
|
||||
email_from= tools.config.get('email_from', False))
|
||||
|
||||
|
||||
@@ -95,14 +95,16 @@
|
||||
</group>
|
||||
<group col="3" colspan="2">
|
||||
<separator colspan="3" string="Contacts" />
|
||||
<field name="partner_id" />
|
||||
<field name="partner_id"
|
||||
on_change="onchange_partner_id(partner_id, email_from)" />
|
||||
<button string="Create a Partner"
|
||||
icon="terp-crm"
|
||||
name="%(action_crm_phonecall2partner)d"
|
||||
type="action"
|
||||
attrs="{'invisible':[('partner_id','!=',False)]}" />
|
||||
<newline/>
|
||||
<field name="partner_address_id" string="Contact" />
|
||||
<field name="partner_address_id" string="Contact"
|
||||
on_change="onchange_partner_address_id(partner_address_id, email_from)" />
|
||||
<newline/>
|
||||
<field name="partner_mobile" />
|
||||
</group>
|
||||
|
||||
@@ -84,7 +84,7 @@ class crm_phonecall2phonecall(osv.osv_memory):
|
||||
'date': this.date
|
||||
}
|
||||
phonecall_id = phonecall_obj.create(cr, uid, values, context=context)
|
||||
print phonecall_id
|
||||
|
||||
res = {
|
||||
'name': _('Phone Call'),
|
||||
'view_type': 'form',
|
||||
|
||||
Reference in New Issue
Block a user