bzr revid: jke@openerp.com-20131118084532-6v6fdb3no48gpuv3
This commit is contained in:
jke-openerp 2013-11-18 09:45:32 +01:00
parent 77ba33003a
commit cee1b287d6
4 changed files with 14 additions and 20 deletions

View File

@ -163,7 +163,7 @@ class crm_meeting(osv.Model):
_columns = { _columns = {
'create_date': fields.datetime('Creation Date', readonly=True), 'create_date': fields.datetime('Creation Date', readonly=True),
'write_date': fields.datetime('Write Date', readonly=True), 'write_date': fields.datetime('Write Date', readonly=True),
#'state': fields.selection([('draft', 'Unconfirmed'), ('open', 'Confirmed')], string='Status', size=16, readonly=True, track_visibility='onchange'), 'state': fields.selection([('draft', 'Unconfirmed'), ('open', 'Confirmed')], string='Status', size=16, readonly=True, track_visibility='onchange'),
# Meeting fields # Meeting fields
'name': fields.char('Meeting Subject', size=128, required=True, states={'done': [('readonly', True)]}), 'name': fields.char('Meeting Subject', size=128, required=True, states={'done': [('readonly', True)]}),
@ -186,7 +186,7 @@ class crm_meeting(osv.Model):
'location': fields.char('Location', size=264, help="Location of Event", states={'done': [('readonly', True)]}), 'location': fields.char('Location', size=264, help="Location of Event", states={'done': [('readonly', True)]}),
'show_as': fields.selection([('free', 'Free'), ('busy', 'Busy')], 'Show Time as', states={'done': [('readonly', True)]}), 'show_as': fields.selection([('free', 'Free'), ('busy', 'Busy')], 'Show Time as', states={'done': [('readonly', True)]}),
'state': fields.selection([('tentative', 'Uncertain'),('cancelled', 'Cancelled'),('confirmed', 'Confirmed'),],'Status', readonly=True, track_visibility='onchange'), #'state': fields.selection([('tentative', 'Uncertain'),('cancelled', 'Cancelled'),('confirmed', 'Confirmed'),],'Status', readonly=True, track_visibility='onchange'),
#FIELD FOR RECURRENCY #FIELD FOR RECURRENCY
'exdate': fields.text('Exception Date/Times', help="This property defines the list of date/time exceptions for a recurring calendar component."), 'exdate': fields.text('Exception Date/Times', help="This property defines the list of date/time exceptions for a recurring calendar component."),
@ -227,7 +227,7 @@ class crm_meeting(osv.Model):
'end_type': 'count', 'end_type': 'count',
'count': 1, 'count': 1,
'rrule_type': False, 'rrule_type': False,
'state': 'tentative', 'state': 'draft',
'class': 'public', 'class': 'public',
'show_as': 'busy', 'show_as': 'busy',
'month_by': 'date', 'month_by': 'date',
@ -621,20 +621,14 @@ class crm_meeting(osv.Model):
def do_meeting_uncertain(self, cr, uid, ids, context=None, *args): def do_meeting_uncertain(self, cr, uid, ids, context=None, *args):
""" Makes event invitation as Tentative """ Makes event invitation as Tentative
@param ids: List of Event IDs """ @param ids: List of Event IDs """
return self.write(cr, uid, ids, {'state': 'tentative'}, context) return self.write(cr, uid, ids, {'state': 'draft'}, context)
def do_meeting_cancel(self, cr, uid, ids, context=None, *args):
""" Makes event invitation as cancelles
@param ids: List of Event IDs
"""
return self.write(cr, uid, ids, {'state': 'cancelled'}, context)
def do_meeting_confirm(self, cr, uid, ids, context=None, *args): def do_meeting_confirm(self, cr, uid, ids, context=None, *args):
""" Makes event invitation as Tentative """ Makes event invitation as Tentative
@param ids: List of Event IDs @param ids: List of Event IDs
@param context: A standard dictionary for contextual values @param context: A standard dictionary for contextual values
""" """
return self.write(cr, uid, ids, {'state': 'confirmed'}, context) return self.write(cr, uid, ids, {'state': 'open'}, context)

View File

@ -15,7 +15,7 @@
<field name="categ_ids" eval="[(6,0,[ref('categ_meet1')])]"/> <field name="categ_ids" eval="[(6,0,[ref('categ_meet1')])]"/>
<field eval="time.strftime('%Y-%m-03 16:30:00')" name="date_deadline"/> <field eval="time.strftime('%Y-%m-03 16:30:00')" name="date_deadline"/>
<field eval="6.3" name="duration"/> <field eval="6.3" name="duration"/>
<field name="state">confirmed</field> <field name="state">open</field>
</record> </record>
<record id="crm_meeting_2" model="crm.meeting"> <record id="crm_meeting_2" model="crm.meeting">
@ -27,7 +27,7 @@
<field eval="time.strftime('%Y-%m-05 12:00:00')" name="date"/> <field eval="time.strftime('%Y-%m-05 12:00:00')" name="date"/>
<field eval="time.strftime('%Y-%m-05 19:00:00')" name="date_deadline"/> <field eval="time.strftime('%Y-%m-05 19:00:00')" name="date_deadline"/>
<field eval="7.0" name="duration"/> <field eval="7.0" name="duration"/>
<field name="state">tentative</field> <field name="state">draft</field>
</record> </record>
<record id="crm_meeting_3" model="crm.meeting"> <record id="crm_meeting_3" model="crm.meeting">
@ -39,7 +39,7 @@
<field eval="time.strftime('%Y-%m-12 15:55:05')" name="date"/> <field eval="time.strftime('%Y-%m-12 15:55:05')" name="date"/>
<field eval="time.strftime('%Y-%m-12 18:55:05')" name="date_deadline"/> <field eval="time.strftime('%Y-%m-12 18:55:05')" name="date_deadline"/>
<field eval="3.0" name="duration"/> <field eval="3.0" name="duration"/>
<field name="state">confirmed</field> <field name="state">open</field>
</record> </record>
<record id="crm_meeting_4" model="crm.meeting"> <record id="crm_meeting_4" model="crm.meeting">
@ -50,7 +50,7 @@
<field eval="time.strftime('%Y-%m-20 8:00:00')" name="date"/> <field eval="time.strftime('%Y-%m-20 8:00:00')" name="date"/>
<field eval="time.strftime('%Y-%m-20 10:30:00')" name="date_deadline"/> <field eval="time.strftime('%Y-%m-20 10:30:00')" name="date_deadline"/>
<field eval="2.5" name="duration"/> <field eval="2.5" name="duration"/>
<field name="state">cancelled</field> <field name="state">open</field>
</record> </record>
<record id="crm_meeting_5" model="crm.meeting"> <record id="crm_meeting_5" model="crm.meeting">
@ -61,7 +61,7 @@
<field eval="time.strftime('%Y-%m-22 11:05:00')" name="date"/> <field eval="time.strftime('%Y-%m-22 11:05:00')" name="date"/>
<field eval="time.strftime('%Y-%m-22 16:05:00')" name="date_deadline"/> <field eval="time.strftime('%Y-%m-22 16:05:00')" name="date_deadline"/>
<field eval="5" name="duration"/> <field eval="5" name="duration"/>
<field name="state">confirmed</field> <field name="state">open</field>
</record> </record>
<record id="crm_meeting_6" model="crm.meeting"> <record id="crm_meeting_6" model="crm.meeting">
@ -72,7 +72,7 @@
<field eval="time.strftime('%Y-%m-18 2:00:00')" name="date"/> <field eval="time.strftime('%Y-%m-18 2:00:00')" name="date"/>
<field eval="time.strftime('%Y-%m-18 10:30:00')" name="date_deadline"/> <field eval="time.strftime('%Y-%m-18 10:30:00')" name="date_deadline"/>
<field eval="8.5" name="duration"/> <field eval="8.5" name="duration"/>
<field name="state">confirmed</field> <field name="state">draft</field>
</record> </record>
</data> </data>
</openerp> </openerp>

View File

@ -60,7 +60,7 @@
<form string="Meetings" version="7.0"> <form string="Meetings" version="7.0">
<header> <header>
<button name="do_meeting_confirm" type="object" string="Confirm Meeting" attrs="{'invisible':['|',('is_attendee','=',False),('attendee_status','=','accepted')]}"/> <button name="do_meeting_confirm" type="object" string="Confirm Meeting" attrs="{'invisible':['|',('is_attendee','=',False),('attendee_status','=','accepted')]}"/>
<button name="do_meeting_cancel" type="object" string="Cancel Meeting" attrs="{'invisible':['|',('is_attendee','=',False),('attendee_status','=','declined')]}"/> <!-- <button name="do_meeting_cancel" type="object" string="Cancel Meeting" attrs="{'invisible':['|',('is_attendee','=',False),('attendee_status','=','declined')]}"/> -->
<button name="do_meeting_uncertain" type="object" string="Uncertain Meeting" attrs="{'invisible':['|',('is_attendee','=',False),('attendee_status','=','tentative')]}"/> <button name="do_meeting_uncertain" type="object" string="Uncertain Meeting" attrs="{'invisible':['|',('is_attendee','=',False),('attendee_status','=','tentative')]}"/>
<field name="state" invisible="True"/> <field name="state" invisible="True"/>
</header> </header>

View File

@ -26,7 +26,7 @@
<field eval="time.strftime('%Y-%m-20')" name="date_from"/> <field eval="time.strftime('%Y-%m-20')" name="date_from"/>
<field eval="time.strftime('%Y-%m-22')" name="date_to"/> <field eval="time.strftime('%Y-%m-22')" name="date_to"/>
<field name="type">remove</field> <field name="type">remove</field>
<field name="state">tentative</field> <field name="state">draft</field>
<field name="number_of_days_temp">3</field> <field name="number_of_days_temp">3</field>
<field name="employee_id" ref="hr.employee_fp"/> <field name="employee_id" ref="hr.employee_fp"/>
</record> </record>
@ -37,7 +37,7 @@
<field eval="time.strftime('%Y-%m-23')" name="date_from"/> <field eval="time.strftime('%Y-%m-23')" name="date_from"/>
<field eval="time.strftime('%Y-%m-25')" name="date_to"/> <field eval="time.strftime('%Y-%m-25')" name="date_to"/>
<field name="type">add</field> <field name="type">add</field>
<field name="state">tentative</field> <field name="state">draft</field>
<field name="number_of_days_temp">7</field> <field name="number_of_days_temp">7</field>
<field name="employee_id" ref="hr.employee_fp"/> <field name="employee_id" ref="hr.employee_fp"/>
</record> </record>