[MERGE]: Merged with parent branch
bzr revid: uco@tinyerp.co.in-20091230071258-31yq48xi93o2tpab
This commit is contained in:
commit
a5168c571c
|
@ -80,6 +80,11 @@ class crm_meeting(osv.osv):
|
|||
event_obj = self.pool.get('caldav.event')
|
||||
res[case['id']] = str(event_obj.get_recurrent_dates(str(rule), exdate, case['date']))
|
||||
return res
|
||||
|
||||
def _data_set(self, cr, uid, id, name, value, arg, context):
|
||||
if not self.browse(cr, uid, id, context).rrule:
|
||||
cr.execute("UPDATE crm_meeting set rdates='' where id=%s" % id)
|
||||
return True
|
||||
|
||||
_columns = {
|
||||
'inherit_case_id': fields.many2one('crm.case','Case',ondelete='cascade'),
|
||||
|
@ -95,8 +100,8 @@ class crm_meeting(osv.osv):
|
|||
'exrule' : fields.char('Exception Rule', size=352, help="defines a rule or repeating pattern\
|
||||
for anexception to a recurrence set"),
|
||||
'rrule' : fields.char('Recurrent Rule', size=352),
|
||||
'rdates' : fields.function(_get_rdates, method=True, string='Recurrent Dates', \
|
||||
store=True, type='text'),
|
||||
'rdates' : fields.function(_get_rdates, method=True, fnct_inv=_data_set \
|
||||
, store=True, type='text'),
|
||||
'attendees': fields.many2many('crm.caldav.attendee', 'crm_attendee_rel', 'case_id', \
|
||||
'attendee_id', 'Attendees'),
|
||||
'alarm_id' : fields.many2one('crm.caldav.alarm', 'Alarm'),
|
||||
|
@ -184,6 +189,9 @@ class crm_meeting(osv.osv):
|
|||
alarm_obj.__attribute__.update(crm_alarm.__attribute__)
|
||||
vals = event_obj.import_ical(cr, uid, file_content)
|
||||
for val in vals:
|
||||
section_id = self.pool.get('crm.case.section').search(cr, uid, \
|
||||
[('name', 'like', 'Meeting%')])[0]
|
||||
val.update({'section_id' : section_id})
|
||||
is_exists = common.uid2openobjectid(cr, val['id'], self._name )
|
||||
val.pop('id')
|
||||
if val.has_key('create_date'): val.pop('create_date')
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
<field name="rdates" colspan="4" nolabel="1" readonly="True"/>
|
||||
<newline/>
|
||||
<field name="exrule" string="Exception Rules" colspan="4"/>
|
||||
<separator string="Exceprion Dates" colspan="4"/>
|
||||
<separator string="Exception Dates" colspan="4"/>
|
||||
<field name="exdate" nolabel="1" colspan="4" />
|
||||
</page>
|
||||
</notebook>
|
||||
|
|
|
@ -104,13 +104,14 @@ class report_crm_case_section_stage(osv.osv):
|
|||
c.state,
|
||||
c.stage_id,
|
||||
c.section_id,
|
||||
c.categ_id,
|
||||
count(*) as nbr,
|
||||
sum(planned_revenue) as amount_revenue,
|
||||
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
|
||||
from
|
||||
crm_case c
|
||||
where c.stage_id is not null
|
||||
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.user_id, c.state, c.stage_id, c.section_id)""")
|
||||
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.user_id, c.state, c.stage_id, c.categ_id, c.section_id)""")
|
||||
|
||||
report_crm_case_section_stage()
|
||||
|
||||
|
|
Loading…
Reference in New Issue