[IMP]Get email on change of partner and made invitation tab visible to all users
bzr revid: dhr@tinyerp.com-20121130060020-9pn7666r96dag2nc
This commit is contained in:
parent
f12df4e8ea
commit
21b1aa5295
|
@ -384,9 +384,26 @@ property or property parameter."),
|
|||
'cutype': 'individual',
|
||||
}
|
||||
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
raise osv.except_osv(_('Warning!'), _('You cannot duplicate a calendar attendee.'))
|
||||
|
||||
|
||||
def onchange_partner_id(self, cr, uid, ids, partner_id,context=None):
|
||||
"""
|
||||
Make entry on email and availbility on change of partner_id field.
|
||||
@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
|
||||
@param partner_id: changed value of partner id
|
||||
@param context: a standard dictionary for contextual values
|
||||
@return: dictionary of values which put value in email and availability fields
|
||||
"""
|
||||
|
||||
if not partner_id:
|
||||
return {'value': {'email': ''}}
|
||||
partner = self.pool.get('res.partner').browse(cr, uid, partner_id, context=context)
|
||||
return {'value': {'email': partner.email}}
|
||||
|
||||
def get_ics_file(self, cr, uid, event_obj, context=None):
|
||||
"""
|
||||
Returns iCalendar file for the event invitation.
|
||||
|
|
|
@ -171,10 +171,10 @@
|
|||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Invitations" groups="base.group_no_one">
|
||||
<page string="Invitations">
|
||||
<field name="attendee_ids" widget="one2many" mode="tree">
|
||||
<tree string="Invitation details" editable="top">
|
||||
<field name="partner_id"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
|
||||
<field name="email" string="Mail To"/>
|
||||
<field name="state"/>
|
||||
<button name="do_tentative"
|
||||
|
|
Loading…
Reference in New Issue