[Merge]: Merge with trunk addons
bzr revid: rpa@openerp.co.in-20100305084917-dlaaj2fkcv9kfhko
This commit is contained in:
@@ -710,15 +710,6 @@ class calendar_event(osv.osv):
|
||||
def _tz_get(self, cr, uid, context={}):
|
||||
return [(x.lower(), x) for x in pytz.all_timezones]
|
||||
|
||||
def onchange_rrule_type(self, cr, uid, ids, rtype, *args, **argv):
|
||||
if rtype == 'none' or not rtype:
|
||||
return {'value': {'rrule': ''}}
|
||||
if rtype == 'custom':
|
||||
return {}
|
||||
rrule = self.pool.get('calendar.custom.rrule')
|
||||
rrulestr = rrule.compute_rule_string(cr, uid, {'freq': rtype.upper(), \
|
||||
'interval': 1})
|
||||
return {'value': {'rrule': rrulestr}}
|
||||
|
||||
def onchange_dates(self, cr, uid, ids, start_date, duration=False, end_date=False, context={}):
|
||||
if not start_date:
|
||||
@@ -735,6 +726,22 @@ class calendar_event(osv.osv):
|
||||
value['date_deadline'] = end.strftime("%Y-%m-%d %H:%M:%S")
|
||||
return {'value': value}
|
||||
|
||||
def _get_rulestring(self, cr, uid, ids, name, arg, context=None):
|
||||
result = {}
|
||||
for event in ids:
|
||||
datas = self.read(cr, uid, ids)[0]
|
||||
if datas.get('rrule_type'):
|
||||
if datas.get('rrule_type') == 'none':
|
||||
result[event] = False
|
||||
elif datas.get('rrule_type') == 'custom':
|
||||
rrule_custom = self.compute_rule_string(cr, uid, datas)
|
||||
result[event] = rrule_custom
|
||||
else:
|
||||
result[event] = self.compute_rule_string(cr, uid, {'freq':\
|
||||
datas.get('rrule_type').upper(), \
|
||||
'interval': 1}, context=context)
|
||||
return result
|
||||
|
||||
_columns = {
|
||||
'id': fields.integer('ID'),
|
||||
'sequence': fields.integer('Sequence'),
|
||||
@@ -755,7 +762,7 @@ class calendar_event(osv.osv):
|
||||
defines the list of date/time exceptions for arecurring calendar component."),
|
||||
'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=124),
|
||||
'rrule': fields.function(_get_rulestring, type='char', size=124, method=True, string='Recurrent Rule', store=True),
|
||||
'rrule_type': fields.selection([('none', ''), ('daily', 'Daily'), \
|
||||
('weekly', 'Weekly'), ('monthly', 'Monthly'), \
|
||||
('yearly', 'Yearly'), ('custom', 'Custom')], 'Recurrency'),
|
||||
@@ -764,15 +771,48 @@ rule or repeating pattern for anexception to a recurrence set"),
|
||||
'recurrent_uid': fields.integer('Recurrent ID'),
|
||||
'recurrent_id': fields.datetime('Recurrent ID date'),
|
||||
'vtimezone': fields.related('user_id', 'context_tz', type='char', size=24, string='Timezone'),
|
||||
'user_id': fields.many2one('res.users', 'Responsible'),
|
||||
'user_id': fields.many2one('res.users', 'Responsible'),
|
||||
'freq': fields.selection([('None', 'No Repeat'), \
|
||||
('secondly', 'Secondly'), \
|
||||
('minutely', 'Minutely'), \
|
||||
('hourly', 'Hourly'), \
|
||||
('daily', 'Daily'), \
|
||||
('weekly', 'Weekly'), \
|
||||
('monthly', 'Monthly'), \
|
||||
('yearly', 'Yearly')], 'Frequency'),
|
||||
'interval': fields.integer('Interval'),
|
||||
'count': fields.integer('Count'),
|
||||
'mo': fields.boolean('Mon'),
|
||||
'tu': fields.boolean('Tue'),
|
||||
'we': fields.boolean('Wed'),
|
||||
'th': fields.boolean('Thu'),
|
||||
'fr': fields.boolean('Fri'),
|
||||
'sa': fields.boolean('Sat'),
|
||||
'su': fields.boolean('Sun'),
|
||||
'select1': fields.selection([('date', 'Date of month'), \
|
||||
('day', 'Day of month')], 'Option'),
|
||||
'day': fields.integer('Date of month'),
|
||||
'week_list': fields.selection([('MO', 'Monday'), ('TU', 'Tuesday'), \
|
||||
('WE', 'Wednesday'), ('TH', 'Thursday'), \
|
||||
('FR', 'Friday'), ('SA', 'Saturday'), \
|
||||
('SU', 'Sunday')], 'Weekday'),
|
||||
'byday': fields.selection([('1', 'First'), ('2', 'Second'), \
|
||||
('3', 'Third'), ('4', 'Fourth'), \
|
||||
('5', 'Fifth'), ('-1', 'Last')], 'By day'),
|
||||
'month_list': fields.selection(months.items(), 'Month'),
|
||||
'end_date': fields.date('Repeat Until')
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'class': lambda *a: 'public',
|
||||
'show_as': lambda *a: 'busy',
|
||||
'freq': lambda *x: 'None',
|
||||
'select1': lambda *x: 'date',
|
||||
'interval': lambda *x: 1,
|
||||
}
|
||||
|
||||
def modify_this(self, cr, uid, ids, defaults, context=None, *args):
|
||||
ids = map(lambda x: base_calendar_id2real_id(x), ids)
|
||||
datas = self.read(cr, uid, ids[0], context=context)
|
||||
defaults.update({
|
||||
'recurrent_uid': base_calendar_id2real_id(datas['id']),
|
||||
@@ -781,11 +821,27 @@ rule or repeating pattern for anexception to a recurrence set"),
|
||||
'rrule': ''
|
||||
})
|
||||
exdate = datas['exdate'] and datas['exdate'].split(',') or []
|
||||
exdate.append(defaults.get('date'))
|
||||
if defaults.get('date'):
|
||||
exdate.append(defaults.get('date'))
|
||||
self.write(cr, uid, ids, {'exdate': ','.join(exdate)}, context=context)
|
||||
new_id = self.copy(cr, uid, ids[0], default=defaults, context=context)
|
||||
return new_id
|
||||
|
||||
def modify_all(self, cr, uid, ids, defaults, context=None, *args):
|
||||
ids = map(lambda x: base_calendar_id2real_id(x), ids)
|
||||
defaults.pop('id')
|
||||
defaults.update({'table': self._table})
|
||||
|
||||
qry = "UPDATE %(table)s set name='%(name)s', \
|
||||
date='%(date)s', date_deadline='%(date_deadline)s'"
|
||||
if defaults.get('alarm_id'):
|
||||
qry += ", alarm_id=%(alarm_id)s"
|
||||
if defaults.get('location'):
|
||||
qry += ", location='%(location)s'"
|
||||
qry += "WHERE id=%s" % (ids[0])
|
||||
cr.execute(qry % (defaults))
|
||||
return True
|
||||
|
||||
def get_recurrent_ids(self, cr, uid, select, base_start_date, base_until_date, limit=100):
|
||||
if not limit:
|
||||
limit = 100
|
||||
@@ -858,6 +914,50 @@ rule or repeating pattern for anexception to a recurrence set"),
|
||||
return ids and ids[0] or False
|
||||
return ids
|
||||
|
||||
def compute_rule_string(self, cr, uid, datas, context=None, *args):
|
||||
weekdays = ['mo', 'tu', 'we', 'th', 'fr', 'sa', 'su']
|
||||
weekstring = ''
|
||||
monthstring = ''
|
||||
yearstring = ''
|
||||
# logic for computing rrule string
|
||||
freq = datas.get('freq')
|
||||
if freq == 'None':
|
||||
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)
|
||||
|
||||
elif freq == 'monthly':
|
||||
if datas.get('select1')=='date' and (datas.get('day') < 1 or datas.get('day') > 31):
|
||||
raise osv.except_osv(_('Error!'), ("Please select proper Day of month"))
|
||||
if datas.get('select1')=='day':
|
||||
monthstring = ';BYDAY=' + datas.get('byday') + datas.get('week_list')
|
||||
elif datas.get('select1')=='date':
|
||||
monthstring = ';BYMONTHDAY=' + str(datas.get('day'))
|
||||
|
||||
elif freq == 'yearly':
|
||||
if datas.get('select1')=='date' and (datas.get('day') < 1 or datas.get('day') > 31):
|
||||
raise osv.except_osv(_('Error!'), ("Please select proper Day of month"))
|
||||
bymonth = ';BYMONTH=' + str(datas.get('month_list'))
|
||||
if datas.get('select1')=='day':
|
||||
bystring = ';BYDAY=' + datas.get('byday') + datas.get('week_list')
|
||||
elif datas.get('select1')=='date':
|
||||
bystring = ';BYMONTHDAY=' + str(datas.get('day'))
|
||||
yearstring = bymonth + bystring
|
||||
|
||||
if datas.get('end_date'):
|
||||
datas['end_date'] = ''.join((re.compile('\d')).findall(datas.get('end_date'))) + '235959Z'
|
||||
enddate = (datas.get('count') and (';COUNT=' + str(datas.get('count'))) or '') +\
|
||||
((datas.get('end_date') and (';UNTIL=' + datas.get('end_date'))) or '')
|
||||
|
||||
rrule_string = 'FREQ=' + freq.upper() + weekstring + ';INTERVAL=' + \
|
||||
str(datas.get('interval')) + enddate + monthstring + yearstring
|
||||
|
||||
# End logic
|
||||
return rrule_string
|
||||
|
||||
def search(self, cr, uid, args, offset=0, limit=100, order=None,
|
||||
context=None, count=False):
|
||||
args_without_date = []
|
||||
@@ -885,6 +985,10 @@ rule or repeating pattern for anexception to a recurrence set"),
|
||||
select = ids
|
||||
new_ids = []
|
||||
for id in select:
|
||||
if len(str(id).split('-')) > 1:
|
||||
data = self.read(cr, uid, id, ['date', 'date_deadline'])
|
||||
self.modify_this(cr, uid, [id], vals, context)
|
||||
continue
|
||||
id = base_calendar_id2real_id(id)
|
||||
if not id in new_ids:
|
||||
new_ids.append(id)
|
||||
@@ -1072,114 +1176,6 @@ class virtual_report_spool(web_services.report_spool):
|
||||
|
||||
virtual_report_spool()
|
||||
|
||||
class calendar_custom_rrule(osv.osv):
|
||||
_name = "calendar.custom.rrule"
|
||||
_description = "Custom Recurrency Rule"
|
||||
|
||||
_columns = {
|
||||
'freq': fields.selection([('None', 'No Repeat'), \
|
||||
('secondly', 'Secondly'), \
|
||||
('minutely', 'Minutely'), \
|
||||
('hourly', 'Hourly'), \
|
||||
('daily', 'Daily'), \
|
||||
('weekly', 'Weekly'), \
|
||||
('monthly', 'Monthly'), \
|
||||
('yearly', 'Yearly')], 'Frequency', required=True),
|
||||
'interval': fields.integer('Interval'),
|
||||
'count': fields.integer('Count'),
|
||||
'mo': fields.boolean('Mon'),
|
||||
'tu': fields.boolean('Tue'),
|
||||
'we': fields.boolean('Wed'),
|
||||
'th': fields.boolean('Thu'),
|
||||
'fr': fields.boolean('Fri'),
|
||||
'sa': fields.boolean('Sat'),
|
||||
'su': fields.boolean('Sun'),
|
||||
'select1': fields.selection([('date', 'Date of month'), \
|
||||
('day', 'Day of month')], 'Option'),
|
||||
'day': fields.integer('Date of month'),
|
||||
'week_list': fields.selection([('MO', 'Monday'), ('TU', 'Tuesday'), \
|
||||
('WE', 'Wednesday'), ('TH', 'Thursday'), \
|
||||
('FR', 'Friday'), ('SA', 'Saturday'), \
|
||||
('SU', 'Sunday')], 'Weekday'),
|
||||
'byday': fields.selection([('1', 'First'), ('2', 'Second'), \
|
||||
('3', 'Third'), ('4', 'Fourth'), \
|
||||
('5', 'Fifth'), ('-1', 'Last')], 'By day'),
|
||||
'month_list': fields.selection(months.items(), 'Month'),
|
||||
'end_date': fields.date('Repeat Until')
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'freq': lambda *x: 'daily',
|
||||
'select1': lambda *x: 'date',
|
||||
'interval': lambda *x: 1,
|
||||
}
|
||||
|
||||
def compute_rule_string(self, cr, uid, datas, context=None, *args):
|
||||
weekdays = ['mo', 'tu', 'we', 'th', 'fr', 'sa', 'su']
|
||||
weekstring = ''
|
||||
monthstring = ''
|
||||
yearstring = ''
|
||||
|
||||
# logic for computing rrule string
|
||||
|
||||
freq = datas.get('freq')
|
||||
if freq == 'None':
|
||||
obj.write(cr, uid, [res_obj.id], {'rrule': ''})
|
||||
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)
|
||||
|
||||
elif freq == 'monthly':
|
||||
if datas.get('select1')=='date' and (datas.get('day') < 1 or datas.get('day') > 31):
|
||||
raise osv.except_osv(_('Error!'), ("Please select proper Day of month"))
|
||||
if datas.get('select1')=='day':
|
||||
monthstring = ';BYDAY=' + datas.get('byday') + datas.get('week_list')
|
||||
elif datas.get('select1')=='date':
|
||||
monthstring = ';BYMONTHDAY=' + str(datas.get('day'))
|
||||
|
||||
elif freq == 'yearly':
|
||||
if datas.get('select1')=='date' and (datas.get('day') < 1 or datas.get('day') > 31):
|
||||
raise osv.except_osv(_('Error!'), ("Please select proper Day of month"))
|
||||
bymonth = ';BYMONTH=' + str(datas.get('month_list'))
|
||||
if datas.get('select1')=='day':
|
||||
bystring = ';BYDAY=' + datas.get('byday') + datas.get('week_list')
|
||||
elif datas.get('select1')=='date':
|
||||
bystring = ';BYMONTHDAY=' + str(datas.get('day'))
|
||||
yearstring = bymonth + bystring
|
||||
|
||||
if datas.get('end_date'):
|
||||
datas['end_date'] = ''.join((re.compile('\d')).findall(datas.get('end_date'))) + '235959Z'
|
||||
enddate = (datas.get('count') and (';COUNT=' + str(datas.get('count'))) or '') +\
|
||||
((datas.get('end_date') and (';UNTIL=' + datas.get('end_date'))) or '')
|
||||
|
||||
rrule_string = 'FREQ=' + freq.upper() + weekstring + ';INTERVAL=' + \
|
||||
str(datas.get('interval')) + enddate + monthstring + yearstring
|
||||
|
||||
# End logic
|
||||
return rrule_string
|
||||
|
||||
def do_add(self, cr, uid, ids, context={}):
|
||||
datas = self.read(cr, uid, ids)[0]
|
||||
if datas.get('interval') <= 0:
|
||||
raise osv.except_osv(_('Error!'), ("Please select proper Interval"))
|
||||
|
||||
|
||||
if not context or not context.get('model'):
|
||||
return {}
|
||||
else:
|
||||
model = context.get('model')
|
||||
obj = self.pool.get(model)
|
||||
res_obj = obj.browse(cr, uid, context['active_id'])
|
||||
|
||||
rrule_string = self.compute_rule_string(cr, uid, datas)
|
||||
obj.write(cr, uid, [res_obj.id], {'rrule': rrule_string})
|
||||
return {}
|
||||
|
||||
calendar_custom_rrule()
|
||||
|
||||
class res_users(osv.osv):
|
||||
_inherit = 'res.users'
|
||||
|
||||
@@ -1198,7 +1194,7 @@ class res_users(osv.osv):
|
||||
status = 'busy'
|
||||
res.update({user_id:status})
|
||||
|
||||
#TOCHECK: Delegrated Event
|
||||
#TOCHECK: Delegated Event
|
||||
for user_id in ids:
|
||||
if user_id not in res:
|
||||
res[user_id] = 'free'
|
||||
@@ -1214,4 +1210,5 @@ class res_users(osv.osv):
|
||||
string='Free/Busy', method=True),
|
||||
}
|
||||
res_users()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -173,71 +173,6 @@
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<record id="view_custom_rule_form" model="ir.ui.view">
|
||||
<field name="name">Custom Rule</field>
|
||||
<field name="model">calendar.custom.rrule</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Custom Rule">
|
||||
<separator string="Select data for Custom Rule" colspan="4"/>
|
||||
<field name="freq" />
|
||||
<field name="interval" />
|
||||
<newline />
|
||||
<field name="count"
|
||||
attrs="{'required' : [('end_date','=',False)]}"/>
|
||||
<field name="end_date"
|
||||
attrs="{'required' : [('count','<=',0), ('freq', '!=', 'None')]}"/>
|
||||
<group col="7" colspan="4" name="Select weekdays"
|
||||
attrs="{'invisible' : [('freq','!=','weekly')]}">
|
||||
<separator string="" colspan="6" />
|
||||
<newline />
|
||||
<field name="mo" colspan="1" />
|
||||
<field name="tu" colspan="1" />
|
||||
<field name="we" colspan="1" />
|
||||
<field name="th" colspan="1" />
|
||||
<field name="fr" colspan="1" />
|
||||
<field name="sa" colspan="1" />
|
||||
<field name="su" colspan="1" />
|
||||
<newline />
|
||||
</group>
|
||||
<group col="4" colspan="4" attrs="{'invisible' : [('freq','!=','monthly'), ('freq','!=','yearly')]}">
|
||||
<separator string="" colspan="6"/>
|
||||
<group col="2" colspan="4">
|
||||
<field name="select1"/>
|
||||
</group>
|
||||
<group col="3" colspan="4" attrs="{'invisible' : [('select1','=','day')]}">
|
||||
<field name="day" attrs="{'required' : [('select1','=','date')]}"/>
|
||||
</group>
|
||||
<newline />
|
||||
<group col="3" colspan="4" attrs="{'invisible' : [('select1','=','date')]}">
|
||||
<field name="byday" string="The"
|
||||
attrs="{'required' : [('select1','=','day')]}"/>
|
||||
<field name="week_list" nolabel="1"
|
||||
attrs="{'required' : [('select1','=','day')]}"/>
|
||||
</group>
|
||||
<group col="2" colspan="4" attrs="{'invisible' : [('freq','!=','yearly')]}">
|
||||
<field name="month_list" string="of" colspan="1"
|
||||
attrs="{'required' : [('freq','=','yearly')]}"/>
|
||||
</group>
|
||||
</group>
|
||||
<separator string="" colspan="6" />
|
||||
<label string="" colspan="2"/>
|
||||
<button icon='gtk-cancel' special="cancel" string="Cancel"/>
|
||||
<button name="do_add" string="Ok" type="object" icon="gtk-ok"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_calendar_custom_rrule_wizard" model="ir.actions.act_window">
|
||||
<field name="name">Custom Rule</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">calendar.custom.rrule</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
<!-- Available alarms-->
|
||||
<menuitem id="base.menu_calendar_configuration" name="Calendar"
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
import wizard
|
||||
import pooler
|
||||
|
||||
class event_edit_this(wizard.interface):
|
||||
class event_edit_all(wizard.interface):
|
||||
event_form = """<?xml version="1.0"?>
|
||||
<form string="Edit this Occurence">
|
||||
<form string="Edit all Occurrences">
|
||||
<separator string="" colspan="4" />
|
||||
<newline />
|
||||
<field name='name' colspan="4" />
|
||||
@@ -38,9 +38,9 @@ class event_edit_this(wizard.interface):
|
||||
</form>"""
|
||||
|
||||
event_fields = {
|
||||
'name': {'string': 'Title', 'type': 'char', 'size': 64},
|
||||
'date': {'string': 'Start Date', 'type': 'datetime'},
|
||||
'date_deadline': {'string': 'End Date', 'type': 'datetime'},
|
||||
'name': {'string': 'Title', 'type': 'char', 'size': 64, 'required': True},
|
||||
'date': {'string': 'Start Date', 'type': 'datetime', 'required': True},
|
||||
'date_deadline': {'string': 'End Date', 'type': 'datetime', 'required': True},
|
||||
'location': {'string': 'Location', 'type': 'char', 'size': 124},
|
||||
'alarm_id': {'string': 'Reminder', 'type': 'many2one', 'relation': 'res.alarm'},
|
||||
}
|
||||
@@ -58,17 +58,8 @@ class event_edit_this(wizard.interface):
|
||||
def _modify_this(self, cr, uid, datas, context=None):
|
||||
model = datas.get('model')
|
||||
model_obj = pooler.get_pool(cr.dbname).get(model)
|
||||
new_id = model_obj.modify_this(cr, uid, [datas['id']], datas['form'], context)
|
||||
value = {
|
||||
'name': 'New event',
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form,tree',
|
||||
'res_model': model,
|
||||
'res_id': new_id,
|
||||
'view_id': False,
|
||||
'type': 'ir.actions.act_window',
|
||||
}
|
||||
return value
|
||||
model_obj.modify_all(cr, uid, [datas['id']], datas['form'], context)
|
||||
return {}
|
||||
|
||||
states = {
|
||||
'init': {
|
||||
@@ -82,6 +73,6 @@ class event_edit_this(wizard.interface):
|
||||
}
|
||||
}
|
||||
|
||||
event_edit_this('calendar.event.edit.this')
|
||||
event_edit_all('calendar.event.edit.all')
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -53,6 +53,10 @@ class crm_fundraising(osv.osv):
|
||||
|
||||
_defaults = {
|
||||
'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
|
||||
'probability':lambda *a:0.0,
|
||||
'planned_cost':lambda *a:0.0,
|
||||
'planned_revenue':lambda *a:0.0,
|
||||
|
||||
}
|
||||
|
||||
crm_fundraising()
|
||||
|
||||
@@ -27,17 +27,26 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Leads Form">
|
||||
<group colspan="4" col="6">
|
||||
<group colspan="4" col="7">
|
||||
<field name="partner_name" required="1"/>
|
||||
<field name="priority"/>
|
||||
<field name="date_deadline"/>
|
||||
|
||||
<button
|
||||
name="%(wizard_crm_lead_opportunity_set)d"
|
||||
string="Convert"
|
||||
help="Convert into Opportunity"
|
||||
icon="gtk-index"
|
||||
type="action"
|
||||
attrs="{'invisible':[('opportunity_id','!=',False)]}"/>
|
||||
<newline/>
|
||||
<field name="section_id" colspan="1" widget="selection"/>
|
||||
<field name="user_id"/>
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
|
||||
|
||||
|
||||
<field name="stage_id" widget="selection" readonly="1" domain="[('object_id.model', '=', 'crm.lead')]"/>
|
||||
<group col="2" colspan="1">
|
||||
|
||||
<button name="stage_previous" string="Previous" states="open,pending" type="object" icon="gtk-go-back"/>
|
||||
<button name="stage_next" string="Next" states="open,pending" type="object" icon="gtk-go-forward"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Lead">
|
||||
@@ -71,20 +80,14 @@
|
||||
icon="gtk-index" type="action"
|
||||
string="Create"
|
||||
attrs="{'invisible':[('partner_id','!=',False)]}"/>
|
||||
<field name="opportunity_id"/>
|
||||
<button
|
||||
name="%(wizard_crm_lead_opportunity_set)d"
|
||||
string="Convert"
|
||||
icon="gtk-index"
|
||||
type="action"
|
||||
attrs="{'invisible':[('opportunity_id','!=',False)]}"/>
|
||||
<field name="opportunity_id"/>
|
||||
</group>
|
||||
<separator colspan="4" string="Notes"/>
|
||||
<field name="description" nolabel="1" colspan="4"/>
|
||||
<separator colspan="4"/>
|
||||
<group col="8" colspan="4">
|
||||
<field name="state" select="2"/>
|
||||
<button name="case_close" string="Done" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
|
||||
<button name="case_close" string="Close" states="open,draft,pending" type="object" icon="gtk-close"/>
|
||||
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
|
||||
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
|
||||
<button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause"/>
|
||||
@@ -167,6 +170,7 @@
|
||||
<field name="user_id"/>
|
||||
<field name="state"/>
|
||||
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
|
||||
<button name="case_close" string="Close" states="open,draft,pending" type="object" icon="gtk-close"/>
|
||||
<button string="Convert to Opportunity" name="%(wizard_crm_lead_opportunity_set)d" states="draft,open,pending" icon="gtk-index" type="action"/>
|
||||
<button name="case_escalate" string="Escalate" states="open,draft,pending" type="object" icon="gtk-go-up"/>
|
||||
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
|
||||
|
||||
+169
-126
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
# ------------------------------------------------------
|
||||
# ------------------------------------------------------
|
||||
# Meetings Categories
|
||||
# ------------------------------------------------------
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
<field name="res_model">crm.case.categ</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="crm.crm_case_categ_tree-view"/>
|
||||
<field name="domain">[('object_id.model', '=', 'crm.meeting')]</field>
|
||||
<field name="context">{'object_id':'crm.meeting'}</field>
|
||||
<field name="domain">[('object_id.model', '=', 'crm.meeting')]</field>
|
||||
<field name="context">{'object_id':'crm.meeting'}</field>
|
||||
</record>
|
||||
<menuitem action="crm_meeting_categ_action" id="menu_crm_case_meeting-act" parent="crm.menu_crm_case_categ"/>
|
||||
|
||||
@@ -24,115 +24,158 @@
|
||||
<field name="model">crm.meeting</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Meetings">
|
||||
<group col="6" colspan="4">
|
||||
<form string="Meetings">
|
||||
<group col="6" colspan="4">
|
||||
<field name="name" select="1" string="Summary"
|
||||
colspan="4" />
|
||||
<field name="categ_id" widget="selection" string="Meeting Type" domain="[('object_id.model', '=', 'crm.meeting')]"/>
|
||||
<field name="date" string="Start Date" required="1" on_change="onchange_dates(date,duration,False)"/>
|
||||
<field name="duration" widget="float_time" on_change="onchange_dates(date,duration,False)"/>
|
||||
<field name="date_deadline" string="End Date" required="1" on_change="onchange_dates(date,False,date_deadline)"/>
|
||||
colspan="4" />
|
||||
<field name="categ_id" widget="selection" string="Meeting Type" domain="[('object_id.model', '=', 'crm.meeting')]"/>
|
||||
<field name="date" string="Start Date" required="1" on_change="onchange_dates(date,duration,False)"/>
|
||||
<field name="duration" widget="float_time" on_change="onchange_dates(date,duration,False)"/>
|
||||
<field name="date_deadline" string="End Date" required="1" on_change="onchange_dates(date,False,date_deadline)"/>
|
||||
<field name="location" />
|
||||
<field name="alarm_id" string="Reminder" widget="selection" />
|
||||
<group colspan="2" col="4" >
|
||||
<field name="rrule_type" string="Recurrency"
|
||||
on_change="onchange_rrule_type(rrule_type)"
|
||||
colspan="1" attrs="{'readonly':[('recurrent_uid','!=',False)]}"/>
|
||||
<button string="Custom"
|
||||
name="%(base_calendar.action_calendar_custom_rrule_wizard)d"
|
||||
icon="gtk-save-as" type="action" context="{'model' : 'crm.meeting'}"
|
||||
attrs="{'invisible': [('rrule_type','!=','custom')]}"
|
||||
/>
|
||||
<button string="Edit" help="Edit only this Occurrency Meeting" attrs="{'invisible':[('rrule_type','in', ('none', False))]}"
|
||||
name="%(wizard_edit_this_event)d" icon="gtk-save"
|
||||
type="action" context="{'model' : 'crm.meeting', 'date': date, 'date_deadline': date_deadline}" />
|
||||
<field name="rrule_type" string="Recurrency"
|
||||
colspan="1" attrs="{'readonly':[('recurrent_uid','!=',False)]}"/>
|
||||
<button string="Edit All" help="Edit all Ourrences of recurrent Meeting" attrs="{'invisible':[('rrule_type','in', ('none', False))]}"
|
||||
name="%(wizard_edit_all_events)d" icon="gtk-edit"
|
||||
type="action" context="{'model' : 'crm.meeting', 'date': date, 'date_deadline': date_deadline}" />
|
||||
</group>
|
||||
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Meeting">
|
||||
<separator colspan="4" string="Communication"/>
|
||||
<field name="partner_id" string="Partner"
|
||||
on_change="onchange_partner_id(partner_id)" />
|
||||
<field name="partner_address_id"
|
||||
string="Contact"
|
||||
on_change="onchange_partner_address_id(partner_address_id, email_from)" />
|
||||
<field name="email_from"/>
|
||||
<separator colspan="4" string="Status and Categorization"/>
|
||||
<group colspan="4" col="4">
|
||||
<field name="user_id" />
|
||||
<field name="section_id" widget="selection" />
|
||||
<field name="show_as" string="Show time as"/>
|
||||
<field name="class" string="Privacy"/>
|
||||
<field name="recurrent_id" invisible="1" />
|
||||
<field name="recurrent_uid" invisible="1" />
|
||||
<field name="rrule" invisible="1" />
|
||||
</group>
|
||||
<separator string="Description" colspan="4" />
|
||||
<field name="description" nolabel="1" colspan="4" />
|
||||
<separator colspan="4"/>
|
||||
<group col="8" colspan="4">
|
||||
<field name="state" select="2" />
|
||||
<button name="case_close" string="Done"
|
||||
states="open" type="object"
|
||||
icon="gtk-jump-to" />
|
||||
<button name="case_open" string="Confirm"
|
||||
states="draft" type="object"
|
||||
icon="gtk-go-forward" />
|
||||
<button name="case_cancel" string="Cancel"
|
||||
states="draft,open" type="object"
|
||||
icon="gtk-cancel" />
|
||||
|
||||
</group>
|
||||
<group col="4" colspan="4" name="rrule" attrs="{'invisible': [('rrule_type','!=','custom')]}">
|
||||
<separator string="Select data for Custom Rule" colspan="8"/>
|
||||
<group col="8" colspan="4">
|
||||
<field name="freq" />
|
||||
<field name="interval" />
|
||||
<field name="count"
|
||||
attrs="{'required' : [('end_date','=',False)]}" />
|
||||
<field name="end_date"
|
||||
attrs="{'required' : [('count','<=',0), ('freq', '!=', 'None')]}" />
|
||||
</group>
|
||||
<group col="14" colspan="4" name="Select weekdays"
|
||||
attrs="{'invisible' : [('freq','!=','weekly')]}">
|
||||
<field name="mo" colspan="1" />
|
||||
<field name="tu" colspan="1" />
|
||||
<field name="we" colspan="1" />
|
||||
<field name="th" colspan="1" />
|
||||
<field name="fr" colspan="1" />
|
||||
<field name="sa" colspan="1" />
|
||||
<field name="su" colspan="1" />
|
||||
<newline />
|
||||
</group>
|
||||
<group col="10" colspan="4"
|
||||
attrs="{'invisible' : [('freq','!=','monthly'), ('freq','!=','yearly')]}">
|
||||
<group col="2" colspan="1">
|
||||
<field name="select1" />
|
||||
</group>
|
||||
</page>
|
||||
<group col="2" colspan="1"
|
||||
attrs="{'invisible' : [('select1','=','day')]}">
|
||||
<field name="day"
|
||||
attrs="{'required' : [('select1','=','date')]}" />
|
||||
</group>
|
||||
<group col="3" colspan="1"
|
||||
attrs="{'invisible' : [('select1','=','date')]}">
|
||||
<field name="byday" string="The"
|
||||
attrs="{'required' : [('select1','=','day')]}" />
|
||||
<field name="week_list" nolabel="1"
|
||||
attrs="{'required' : [('select1','=','day')]}" />
|
||||
</group>
|
||||
<group col="1" colspan="1"
|
||||
attrs="{'invisible' : [('freq','!=','yearly')]}">
|
||||
<field name="month_list" string="of"
|
||||
colspan="1"
|
||||
attrs="{'required' : [('freq','=','yearly')]}" />
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Meeting">
|
||||
<group col="6" colspan="4">
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Assignment"/>
|
||||
<field name="section_id" widget="selection" />
|
||||
<field name="user_id" />
|
||||
</group><group col="2" colspan="2">
|
||||
<separator colspan="2" string="Contacts"/>
|
||||
<field name="partner_id" string="Partner"
|
||||
on_change="onchange_partner_id(partner_id)" />
|
||||
<field name="partner_address_id"
|
||||
string="Contact"
|
||||
on_change="onchange_partner_address_id(partner_address_id, email_from)" />
|
||||
<field name="email_from"/>
|
||||
</group><group col="2" colspan="2">
|
||||
<separator colspan="2" string="Visibility"/>
|
||||
<field name="show_as" string="Show time as"/>
|
||||
<field name="class" string="Privacy"/>
|
||||
<field name="rrule" groups="base.group_extended" />
|
||||
<field name="recurrent_id" invisible="1" />
|
||||
<field name="recurrent_uid" invisible="1" />
|
||||
</group>
|
||||
</group>
|
||||
<separator string="Description" colspan="4" />
|
||||
<field name="description" nolabel="1" colspan="4" />
|
||||
<separator colspan="4"/>
|
||||
<group col="8" colspan="4">
|
||||
<field name="state" select="2" />
|
||||
<button name="case_close" string="Done"
|
||||
states="open" type="object"
|
||||
icon="gtk-jump-to" />
|
||||
<button name="case_open" string="Confirm"
|
||||
states="draft" type="object"
|
||||
icon="gtk-go-forward" />
|
||||
<button name="case_cancel" string="Cancel"
|
||||
states="draft,open" type="object"
|
||||
icon="gtk-cancel" />
|
||||
</group>
|
||||
</page>
|
||||
<page string="Invitation Detail">
|
||||
<button string="Invite People"
|
||||
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
|
||||
icon="terp-partner" type="action"
|
||||
context="{'model' : 'crm.meeting', 'attendee_field':'attendee_ids'}" colspan="2"/>
|
||||
<field name="attendee_ids" colspan="4"
|
||||
nolabel="1" widget="one2many" mode="tree,form">
|
||||
<tree string="Invitation details" editable="top">
|
||||
<field name="email" />
|
||||
<field name="role" select="1" />
|
||||
<field name="state" />
|
||||
</tree>
|
||||
<form string="Invitation details">
|
||||
<notebook colspan="4">
|
||||
<page string="Details">
|
||||
<field name="email" />
|
||||
<field name="rsvp" select="1" />
|
||||
<field name="cutype" select="1" />
|
||||
<field name="role" select="1" />
|
||||
<separator colspan="4" string="" />
|
||||
<field name="state" />
|
||||
<group col="6" colspan="4">
|
||||
<field name="state" select="2" />
|
||||
<button name="do_tentative" states="needs-action,declined,accepted"
|
||||
string="Uncertain" type="object"
|
||||
icon="terp-crm" />
|
||||
<button name="do_accept" string="Accept" states="needs-action,tentative,declined"
|
||||
type="object" icon="gtk-apply" />
|
||||
<button name="do_decline" string="Decline" states="needs-action,tentative,accepted"
|
||||
type="object" icon="gtk-cancel" />
|
||||
<button
|
||||
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
|
||||
string="Delegate" type="action"
|
||||
icon="gtk-sort-descending" states="needs-action,tentative,declined,accepted"
|
||||
context="{'model' : 'calendar.attendee', 'attendee_field' : 'child_ids'}" />
|
||||
</group>
|
||||
</page>
|
||||
<page string="Other">
|
||||
<field name="user_id"/>
|
||||
<field name="partner_address_id" select="1" />
|
||||
<newline />
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
|
||||
|
||||
<button string="Invite People"
|
||||
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
|
||||
icon="terp-partner" type="action"
|
||||
context="{'model' : 'crm.meeting', 'attendee_field':'attendee_ids'}" colspan="2"/>
|
||||
<field name="attendee_ids" colspan="4"
|
||||
nolabel="1" widget="one2many" mode="tree,form">
|
||||
<tree string="Invitation details" editable="top">
|
||||
<field name="email" />
|
||||
<field name="role" select="1" />
|
||||
<field name="state" />
|
||||
</tree>
|
||||
<form string="Invitation details">
|
||||
<notebook colspan="4">
|
||||
<page string="Details">
|
||||
<field name="email" />
|
||||
<field name="rsvp" select="1" />
|
||||
<field name="cutype" select="1" />
|
||||
<field name="role" select="1" />
|
||||
<separator colspan="4" string="" />
|
||||
<field name="state" />
|
||||
<group col="6" colspan="4">
|
||||
<field name="state" select="2" />
|
||||
<button name="do_tentative" states="needs-action,declined,accepted"
|
||||
string="Uncertain" type="object"
|
||||
icon="terp-crm" />
|
||||
<button name="do_accept" string="Accept" states="needs-action,tentative,declined"
|
||||
type="object" icon="gtk-apply" />
|
||||
<button name="do_decline" string="Decline" states="needs-action,tentative,accepted"
|
||||
type="object" icon="gtk-cancel" />
|
||||
<button
|
||||
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
|
||||
string="Delegate" type="action"
|
||||
icon="gtk-sort-descending" states="needs-action,tentative,declined,accepted"
|
||||
context="{'model' : 'calendar.attendee', 'attendee_field' : 'child_ids'}" />
|
||||
</group>
|
||||
</page>
|
||||
<page string="Other">
|
||||
<field name="user_id"/>
|
||||
<field name="partner_address_id" select="1" />
|
||||
<newline />
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
@@ -145,12 +188,12 @@
|
||||
<tree string="Meetings" colors="red:state=='open';black:state in ('draft', 'cancel','done','pending')">
|
||||
<field name="id" widget="char"/>
|
||||
<field name="name" string="Subject"/>
|
||||
<field name="partner_id" string="Partner"/>
|
||||
<field name="partner_id" string="Partner"/>
|
||||
<field name="section_id" />
|
||||
<field name="date" string="Meeting Date"/>
|
||||
<field name="date" string="Meeting Date"/>
|
||||
<field name="categ_id"/>
|
||||
<field name="user_id"/>
|
||||
<field name="state"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -186,31 +229,31 @@
|
||||
<field name="model">crm.meeting</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Meetings">
|
||||
<group col="12" colspan="4">
|
||||
<filter icon="terp-crm" string="My Meetings" domain="[('user_id','=',uid)]" help="My Meetings"/>
|
||||
<filter icon="terp-crm" string="Current" domain="[('state','in',('draft', 'open'))]" default="1" help="Current Meetings"/>
|
||||
<filter icon="terp-crm" string="Confirmed" domain="[('state','=','done')]" help="Confirmed Meetings"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" select="1" string="Subject"/>
|
||||
<field name="partner_id" select="1"/>
|
||||
<field name="section_id" default="context.get('section_id', False)" select="1" widget="selection">
|
||||
<filter icon="terp-crm"
|
||||
<search string="Search Meetings">
|
||||
<group col="12" colspan="4">
|
||||
<filter icon="terp-crm" string="My Meetings" domain="[('user_id','=',uid)]" help="My Meetings"/>
|
||||
<filter icon="terp-crm" string="Current" domain="[('state','in',('draft', 'open'))]" default="1" help="Current Meetings"/>
|
||||
<filter icon="terp-crm" string="Confirmed" domain="[('state','=','done')]" help="Confirmed Meetings"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" select="1" string="Subject"/>
|
||||
<field name="partner_id" select="1"/>
|
||||
<field name="section_id" default="context.get('section_id', False)" select="1" widget="selection">
|
||||
<filter icon="terp-crm"
|
||||
domain="[('section_id','=',context.get('section_id',False))]"
|
||||
help="My section"
|
||||
/>
|
||||
</field>
|
||||
<field name="user_id" select="1" widget="selection"/>
|
||||
</group>
|
||||
</field>
|
||||
<field name="user_id" select="1" widget="selection"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="attendee_form_view_inherit" model="ir.ui.view">
|
||||
<field name="name">calendar.attendee.form.inherit</field>
|
||||
<field name="model">calendar.attendee</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="base_calendar.base_calendar_attendee_form_view"/>
|
||||
<field name="inherit_id" ref="base_calendar.base_calendar_attendee_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="language" position="after">
|
||||
<field name="categ_id" string="Event Type"/>
|
||||
@@ -222,12 +265,12 @@
|
||||
<field name="name">calendar.attendee.tree.inherit</field>
|
||||
<field name="model">calendar.attendee</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="inherit_id" ref="base_calendar.base_calendar_attendee_tree_view"/>
|
||||
<field name="inherit_id" ref="base_calendar.base_calendar_attendee_tree_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="role" position="after">
|
||||
<field name="categ_id" string="Event Type"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<wizard string="Edit this event" model="crm.meeting"
|
||||
name="calendar.event.edit.this" id="wizard_edit_this_event"
|
||||
<wizard string="Edit all events" model="crm.meeting"
|
||||
name="calendar.event.edit.all" id="wizard_edit_all_events"
|
||||
menu="False" />
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
name="Meetings"
|
||||
res_model="crm.meeting"
|
||||
src_model="crm.opportunity"
|
||||
view_mode="calendar,graph"
|
||||
context="{'default_partner_id': active_id, 'default_duration': 4.0}"
|
||||
domain="[('opportunity_id','=',active_id)]"
|
||||
view_mode="calendar,tree,form"
|
||||
context="{'default_duration': 4.0}"
|
||||
domain="[('user_id','=',uid)]"
|
||||
view_type="form"/>
|
||||
|
||||
<act_window
|
||||
@@ -19,8 +19,8 @@
|
||||
res_model="crm.phonecall"
|
||||
src_model="crm.opportunity"
|
||||
view_mode="calendar,tree,form"
|
||||
context="{'default_partner_id': active_id, 'default_duration': 1.0}"
|
||||
domain="[('opportunity_id','=',active_id)]"
|
||||
context="{'default_duration': 1.0}"
|
||||
domain="[('user_id','=',uid)]"
|
||||
view_type="form"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="crm_case_category_act_oppor11">
|
||||
|
||||
@@ -41,7 +41,11 @@
|
||||
<form string="Opportunities">
|
||||
<group colspan="4" col="7">
|
||||
<field name="name" string="Opportunity"/>
|
||||
<field name="stage_id" on_change="onchange_stage_id(stage_id)" widget="selection" domain="[('object_id.model', '=', 'crm.opportunity')]"/>
|
||||
<group colspan="2" col="4">
|
||||
<field name="stage_id" readonly="1" on_change="onchange_stage_id(stage_id)" widget="selection" domain="[('object_id.model', '=', 'crm.opportunity')]"/>
|
||||
<button name="stage_previous" string="Previous" states="open,pending" type="object" icon="gtk-go-back"/>
|
||||
<button name="stage_next" string="Next" states="open,pending" type="object" icon="gtk-go-forward"/>
|
||||
</group>
|
||||
<field name="user_id"/>
|
||||
<button string="Schedule Meeting"
|
||||
name="%(wizard_crm_opportunity_meeting_set)d" icon="gtk-redo" type="action" />
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<field name="view_mode">tree,calendar</field>
|
||||
<field name="view_id" ref="crm_case_phone_tree_view"/>
|
||||
<field name="domain" eval="'[(\'categ_id\',\'=\','+str(ref('categ_phone1'))+')]'"/>
|
||||
<field name="context">{'set_editable':True}</field>
|
||||
<field name="context">{'set_editable':True,'default_state':'open'}</field>
|
||||
<field name="search_view_id" ref="crm.view_crm_case_phonecalls_filter"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_phone_incoming0">
|
||||
@@ -79,6 +79,7 @@
|
||||
<field name="view_mode">tree,calendar</field>
|
||||
<field name="view_id" ref="crm_case_phone_tree_view"/>
|
||||
<field name="domain" eval="'[(\'categ_id\',\'=\','+str(ref('categ_phone2'))+')]'"/>
|
||||
<field name="context">{'default_state':'open'}</field>
|
||||
<field name="search_view_id" ref="crm.view_crm_case_phonecalls_filter"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_phone_outgoing0">
|
||||
|
||||
@@ -32,8 +32,7 @@
|
||||
<field name="name" string="Call Summary"/>
|
||||
<field name="partner_id" string="Partner"/>
|
||||
<field name="partner_contact"/>
|
||||
<field name="partner_phone"/>
|
||||
<field name="partner_mobile"/>
|
||||
<field name="partner_phone"/>
|
||||
<field name="user_id"/>
|
||||
<button string="Opportunity"
|
||||
name="%(wizard_crm_phonecall_opportunity_set)d"
|
||||
@@ -92,11 +91,7 @@
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Categorization" />
|
||||
<field name="priority"/>
|
||||
<field name="opportunity_id"
|
||||
on_change="onchange_case_id(case_id, name, partner_id)"
|
||||
context="{'default_name':name,'default_section_id':section_id,'default_user_id':user_id,'default_duration':duration,
|
||||
'default_partner_id':partner_id,'default_partner_address_id':partner_address_id,'default_partner_phone':partner_phone,
|
||||
'default_partner_mobile':partner_mobile,'default_categ_id':categ_id}" />
|
||||
<field name="opportunity_id"/>
|
||||
</group>
|
||||
<separator string="Description" colspan="4" />
|
||||
<field name="description" nolabel="1" colspan="4" />
|
||||
|
||||
@@ -57,7 +57,7 @@ class partner_create(wizard.interface):
|
||||
'string':'Action', 'required':True, 'default': lambda *a:'exist'},
|
||||
'partner_id' : {'type':'many2one', 'relation':'res.partner', 'string':'Partner'},
|
||||
}
|
||||
|
||||
|
||||
def _selectPartner(self, cr, uid, data, context):
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
case_obj = pool.get('crm.lead')
|
||||
@@ -75,8 +75,11 @@ class partner_create(wizard.interface):
|
||||
addresses = contact_obj.browse(cr, uid, address_ids)
|
||||
partner_ids = addresses and [addresses[0].partner_id.id] or False
|
||||
|
||||
partner_id = partner_ids and partner_ids[0] or False
|
||||
return {'partner_id': partner_id}
|
||||
partner_id = partner_ids and partner_ids[0] or False
|
||||
vals = {'partner_id': partner_id}
|
||||
if not partner_id:
|
||||
vals['action'] = 'create'
|
||||
return vals
|
||||
|
||||
def _create_partner(self, cr, uid, data, context):
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
|
||||
@@ -86,8 +86,7 @@ class opportunity2phonecall(wizard.interface):
|
||||
id3 = data_obj.browse(cr, uid, id3, context=context).res_id
|
||||
|
||||
opportunites = opportunity_case_obj.browse(cr, uid, data['ids'])
|
||||
for opportunity in opportunites:
|
||||
#TODO : Take Other Info from opportunity
|
||||
for opportunity in opportunites:
|
||||
new_case = phonecall_case_obj.create(cr, uid, {
|
||||
'name' : opportunity.name,
|
||||
'case_id' : opportunity.id,
|
||||
@@ -96,9 +95,12 @@ class opportunity2phonecall(wizard.interface):
|
||||
'description' : form['note'],
|
||||
'date' : form['deadline'],
|
||||
'section_id' : form['section_id'],
|
||||
'partner_id': opportunity.partner_id.id,
|
||||
'partner_address_id':opportunity.partner_address_id.id,
|
||||
'partner_id': opportunity.partner_id and opportunity.partner_id.id or False,
|
||||
'partner_address_id':opportunity.partner_address_id and opportunity.partner_address_id.id or False,
|
||||
'description': data['form']['note'] or opportunity.description,
|
||||
'partner_phone' : opportunity.phone or (opportunity.partner_address_id and opportunity.partner_address_id.phone or False),
|
||||
'partner_mobile' : opportunity.partner_address_id and opportunity.partner_address_id.mobile or False,
|
||||
'priority': opportunity.priority,
|
||||
'opportunity_id':opportunity.id
|
||||
}, context=context)
|
||||
vals = {}
|
||||
@@ -148,9 +150,15 @@ class opportunity2meeting(wizard.interface):
|
||||
id2 = data_obj.browse(cr, uid, id2, context=context).res_id
|
||||
if id3:
|
||||
id3 = data_obj.browse(cr, uid, id3, context=context).res_id
|
||||
opportunity = opportunity_case_obj.browse(cr, uid, data['id'], context=context)
|
||||
partner_id = opportunity.partner_id and opportunity.partner_id.id or False
|
||||
name = opportunity.name
|
||||
email = opportunity.email_from
|
||||
section_id = opportunity.section_id and opportunity.section_id.id or False
|
||||
return {
|
||||
'name': _('Meetings'),
|
||||
'domain' : "[('opportunity_id','in',%s)]"%(data['ids']),
|
||||
'domain' : "[('user_id','=',%s)]"%(uid),
|
||||
'context': {'default_partner_id': partner_id, 'default_section_id': section_id, 'default_email_from': email, 'default_state':'open', 'default_name':name},
|
||||
'view_type': 'form',
|
||||
'view_mode': 'calendar,form,tree',
|
||||
'res_model': 'crm.meeting',
|
||||
|
||||
@@ -165,9 +165,9 @@ class phonecall2opportunity(partner_create):
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
case_obj = pool.get('crm.phonecall')
|
||||
for case in case_obj.browse(cr, uid, data['ids']):
|
||||
if case.state != 'open':
|
||||
if case.state in ['done', 'cancel']:
|
||||
raise wizard.except_wizard(_('Warning !'),
|
||||
_('Phone Call state should be \'Open\' before converting to Opportunity.'))
|
||||
_('Closed/Cancelled Phone Call Could not convert into Opportunity.'))
|
||||
return {}
|
||||
|
||||
def _selectopportunity(self, cr, uid, data, context):
|
||||
@@ -200,8 +200,7 @@ class phonecall2opportunity(partner_create):
|
||||
|
||||
phonecall_case_obj = pool.get('crm.phonecall')
|
||||
opportunity_case_obj = pool.get('crm.opportunity')
|
||||
for phonecall in phonecall_case_obj.browse(cr, uid, data['ids']):
|
||||
#TODO : Take other info from phonecall
|
||||
for phonecall in phonecall_case_obj.browse(cr, uid, data['ids']):
|
||||
new_opportunity_id = opportunity_case_obj.create(cr, uid, {
|
||||
'name': data['form']['name'],
|
||||
'planned_revenue': data['form']['planned_revenue'],
|
||||
@@ -210,7 +209,8 @@ class phonecall2opportunity(partner_create):
|
||||
'section_id': phonecall.section_id.id,
|
||||
'description': phonecall.description,
|
||||
'phonecall_id': phonecall.id,
|
||||
'priority': phonecall.priority
|
||||
'priority': phonecall.priority,
|
||||
'phone': phonecall.partner_phone,
|
||||
})
|
||||
new_opportunity = opportunity_case_obj.browse(cr, uid, new_opportunity_id)
|
||||
vals = {
|
||||
@@ -281,9 +281,15 @@ class phonecall2meeting(wizard.interface):
|
||||
id2 = data_obj.browse(cr, uid, id2, context=context).res_id
|
||||
if id3:
|
||||
id3 = data_obj.browse(cr, uid, id3, context=context).res_id
|
||||
phonecall = phonecall_case_obj.browse(cr, uid, data['id'], context=context)
|
||||
partner_id = phonecall.partner_id and phonecall.partner_id.id or False
|
||||
name = phonecall.name
|
||||
email = phonecall.email_from
|
||||
section_id = phonecall.section_id and phonecall.section_id.id or False
|
||||
return {
|
||||
'name': _('Meetings'),
|
||||
'domain' : "[('phonecall_id','in',%s)]"%(data['ids']),
|
||||
'domain' : "[('user_id','=',%s)]"%(uid),
|
||||
'context': {'default_partner_id': partner_id, 'default_section_id': section_id, 'default_email_from': email, 'default_state':'open', 'default_name':name},
|
||||
'view_type': 'form',
|
||||
'view_mode': 'calendar,form,tree',
|
||||
'res_model': 'crm.meeting',
|
||||
|
||||
@@ -76,15 +76,6 @@
|
||||
<field name="fn">field</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.fields" id="map_event_8">
|
||||
<field name="name" ref="caldav.field_event_priority"/>
|
||||
<field name="type_id" ref="base_calendar.calendar_lines_event" />
|
||||
<field name="field_id" search="[('name','=','priority'),('model_id.model','=','crm.meeting')]" />
|
||||
<field name="fn">field</field>
|
||||
<field name="mapping">{'1': '1', '2': '2', '3': '2','4': '2', '5': '3', '6': '4', '7': '4', '8': '4', '9': '5'}</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="basic.calendar.fields" id="map_event_9">
|
||||
<field name="name" ref="caldav.field_event_location"/>
|
||||
<field name="type_id" ref="base_calendar.calendar_lines_event" />
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
<field name="user_id" />
|
||||
<label string="Resolution: " align="1.0"/>
|
||||
<group colspan="1" col="3">
|
||||
<field name="stage_id" select="1" nolabel="1"/>
|
||||
<field name="stage_id" select="1" nolabel="1" on_change="onchange_stage_id(stage_id)" domain="[('object_id.model', '=', 'crm.project.bug')]"/>
|
||||
<button icon="gtk-go-back" string="" name="stage_previous" type="object"/>
|
||||
<button icon="gtk-go-forward" string="" name="stage_next" type="object"/>
|
||||
</group>
|
||||
|
||||
@@ -88,8 +88,20 @@ class crm_project_bug(osv.osv):
|
||||
def convert_to_bug(self, cr, uid, ids, context=None):
|
||||
return self._convert(cr, uid, ids, 'bug_categ', context=context)
|
||||
|
||||
def onchange_stage_id(self, cr, uid, ids, stage_id, context={}):
|
||||
if not stage_id:
|
||||
return {'value':{}}
|
||||
stage = self.pool.get('crm.case.stage').browse(cr, uid, stage_id, context)
|
||||
if not stage.on_change:
|
||||
return {'value':{}}
|
||||
return {'value':{'probability':stage.probability}}
|
||||
|
||||
_defaults = {
|
||||
'project_id':_get_project,
|
||||
'project_id':_get_project,
|
||||
'probability':lambda *a:0.0,
|
||||
'planned_cost':lambda *a:0.0,
|
||||
'planned_revenue':lambda *a:0.0,
|
||||
}
|
||||
|
||||
crm_project_bug()
|
||||
|
||||
|
||||
@@ -16,8 +16,10 @@
|
||||
<field name="nbr" string="#Project Bug"/>
|
||||
<field name="amount_revenue"/>
|
||||
<field name="probability"/>
|
||||
<field name="amount_revenue_prob"/>
|
||||
<field name="delay_close"/>
|
||||
<field name="state"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="section_id" invisible="1"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="stage_id" invisible="1"/>
|
||||
<field name="categ_id" invisible="1"/>
|
||||
@@ -59,8 +61,9 @@
|
||||
<field name="inherit_id" ref="report_crm.view_crm_case_filter"/>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="state" position="before">
|
||||
</field>
|
||||
<xpath expr='//search[@string="Search"]/group[@string="Group By..."]/filter[@string="State"]' position='after'>
|
||||
<filter string="Stage" icon="terp-sale" domain="[]" context="{'group_by':'stage_id'}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Evaluation">
|
||||
<field name="create_date"/>
|
||||
<!--field name="create_date"/-->
|
||||
<field name="employee_id"/>
|
||||
<!-- field name="progress"/ -->
|
||||
<field name="plan_id"/>
|
||||
@@ -202,9 +202,9 @@
|
||||
<field name="survey_id" widget="selection" colspan="3"/>
|
||||
<group colspan="1">
|
||||
<button name="%(survey.action_view_survey_question_message)d" string="Interview Question" type="action"
|
||||
icon="gtk-execute" context="{'survey_id': survey_id, 'response_id': response, 'active' : response, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}" attrs="{'readonly':[('survey_id','=',False)]}"/>
|
||||
icon="gtk-execute" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0, 'active' : response, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}" attrs="{'readonly':[('survey_id','=',False)]}"/>
|
||||
<button name="%(survey.survey_browse_response)d" string="Print Interview" type="action"
|
||||
icon="gtk-print" context="{'survey_id': survey_id, 'response_id' : response,}" attrs="{'readonly':[('response','!=',True),('survey_id','!=',True)]}" />
|
||||
icon="gtk-print" context="{'survey_id': survey_id, 'response_id' : [response], 'response_no':0,}" attrs="{'readonly':[('response','=',False)]}" />
|
||||
</group>
|
||||
</group>
|
||||
<group col="4" colspan="4">
|
||||
@@ -236,9 +236,9 @@
|
||||
|
||||
<field name="response" readonly="1" invisible="True"/>
|
||||
<button name="%(survey.action_view_survey_question_message)d" string="Interview Question" type="action" states="waiting_answer,done,cancel"
|
||||
icon="gtk-execute" context="{'survey_id': survey_id, 'response_id': response, 'active' : response, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}" attrs="{'readonly':[('survey_id','=',False)]}"/>
|
||||
icon="gtk-execute" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0, 'active' : response, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}" attrs="{'readonly':[('survey_id','=',False)]}"/>
|
||||
<button name="%(survey.survey_browse_response)d" string="Print Interview" type="action" states="waiting_answer,done,cancel"
|
||||
icon="gtk-print" context="{'survey_id': survey_id, 'response_id' : response,}" attrs="{'readonly':[('response','!=',True),('survey_id','!=',True)]}" />
|
||||
icon="gtk-print" context="{'survey_id': survey_id, 'response_id' : [response], 'response_no':0}" attrs="{'readonly':[('response','!=',True),('survey_id','!=',True)]}" />
|
||||
<field name="state" />
|
||||
</tree>
|
||||
</field>
|
||||
|
||||
@@ -79,14 +79,14 @@
|
||||
<button string="Schedule a Phone Call"
|
||||
name="%(wizard_hr_job_reschedule_phone_call)d" icon="gtk-redo" type="action"/>
|
||||
<button name="%(survey.action_view_survey_question_message)d" string="Interview Question" type="action"
|
||||
icon="gtk-execute" context="{'survey_id': survey, 'response_id': response ,'active' : response, 'object' : 'hr.applicant', 'cur_id' :active_id}" attrs="{'readonly':[('survey','=',False)]}"/>
|
||||
icon="gtk-execute" context="{'survey_id': survey, 'response_id': [response], 'response_no':0 ,'active' : response, 'object' : 'hr.applicant', 'cur_id' :active_id}" attrs="{'readonly':[('survey','=',False)]}"/>
|
||||
<newline/>
|
||||
<field name="partner_name"/>
|
||||
<field name="job_id"/>
|
||||
<field name="department_id" widget="selection"/>
|
||||
<button name="%(wizard_hr_job_meeting_set)d" string="Schedule Meeting" icon="terp-hr" type="action"/>
|
||||
<button name="%(survey.survey_browse_response)d" string="Print Interview" type="action"
|
||||
icon="gtk-print" context="{'survey_id': survey, 'response_id' : response,}" attrs="{'readonly':[('response','=',False)]}" />
|
||||
icon="gtk-print" context="{'survey_id': survey, 'response_id' : [response], 'response_no':0,}" attrs="{'readonly':[('response','=',False)]}" />
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Job Info">
|
||||
|
||||
+70
-64
@@ -2,15 +2,15 @@
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<menuitem icon="terp-mrp" id="menu_mrp_root" name="Manufacturing"
|
||||
<menuitem icon="terp-mrp" id="base.menu_mrp_root" name="Manufacturing"
|
||||
groups="group_mrp_user,group_mrp_manager" sequence="3"/>
|
||||
<menuitem id="menu_mrp_reordering" name="Automatic Procurements" parent="stock.menu_stock_root" sequence="4"/>
|
||||
<menuitem id="menu_mrp_manufacturing" name="Manufacturing" parent="menu_mrp_root" sequence="1"/>
|
||||
<menuitem id="menu_mrp_manufacturing" name="Manufacturing" parent="base.menu_mrp_root" sequence="1"/>
|
||||
|
||||
<menuitem name="Control" id="menu_mrp_control" parent="menu_mrp_root" sequence="3" />
|
||||
<menuitem name="Master Data"
|
||||
<menuitem name="Control" id="menu_mrp_control" parent="base.menu_mrp_root" sequence="3" />
|
||||
<menuitem name="Master Data"
|
||||
id="menu_mrp_bom"
|
||||
parent="menu_mrp_root"
|
||||
parent="base.menu_mrp_root"
|
||||
sequence="5" />
|
||||
<!--
|
||||
Property / Property Group
|
||||
@@ -38,7 +38,7 @@
|
||||
<menuitem
|
||||
id="menu_mrp_configuration"
|
||||
name="Configuration"
|
||||
parent="menu_mrp_root"
|
||||
parent="base.menu_mrp_root"
|
||||
groups="group_mrp_manager"
|
||||
sequence="50" />
|
||||
|
||||
@@ -447,7 +447,7 @@
|
||||
id="mrp.wizard_change_production_qty"
|
||||
keyword="client_action_multi"
|
||||
multi="True"/>
|
||||
|
||||
|
||||
<record id="mrp_production_form_view" model="ir.ui.view">
|
||||
<field name="name">mrp.production.form</field>
|
||||
<field name="model">mrp.production</field>
|
||||
@@ -458,19 +458,18 @@
|
||||
<field name="name" select="1" string="Reference"/>
|
||||
<field name="date_planned" select="1"/>
|
||||
<field name="origin" select="1"/>
|
||||
<field name="product_id" on_change="product_id_change(product_id)" select="1"/>
|
||||
<field name="product_id" on_change="product_id_change(product_id)" select="1"/>
|
||||
<field name="product_qty"/>
|
||||
<group colspan="2" col="3">
|
||||
<field name="product_uom"/>
|
||||
<button type="action" name="%(mrp.wizard_change_production_qty)d" string="Change Qty" states="ready,confirmed,in_production"/>
|
||||
</group>
|
||||
|
||||
<label string="" colspan="2"/>
|
||||
<field name="product_uos_qty" groups="product.group_uos"/>
|
||||
<label string="" colspan="2"/>
|
||||
<field name="product_uos_qty" groups="product.group_uos"/>
|
||||
<group colspan="2" col="3" groups="product.group_uos">
|
||||
<field name="product_uos"/>
|
||||
<label string=""/>
|
||||
</group>
|
||||
<label string=""/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
<notebook colspan="4">
|
||||
@@ -506,31 +505,32 @@
|
||||
</field>
|
||||
|
||||
<field colspan="2" name="move_lines2" nolabel="1" domain="[('state','in', ('done', 'cancel'))]"
|
||||
widget="one2many_list" mode="tree,form" height="275">
|
||||
<tree string="Consumed Products" editable="bottom">
|
||||
<field name="product_id" readonly="1"/>
|
||||
<field name="product_qty" readonly="1"/>
|
||||
<field name="product_uom" readonly="1" />
|
||||
<field name="state" invisible="1" />
|
||||
<field name="location_id" readonly="1"/>
|
||||
<field name="prodlot_id" />
|
||||
<button
|
||||
name="%(stock.track_line)d"
|
||||
string="Split in production lots"
|
||||
type="action" icon="gtk-justify-fill"
|
||||
states="done,cancel" />
|
||||
<button
|
||||
name="%(stock.move_scrap)d"
|
||||
string="D" type="action"
|
||||
icon="gtk-convert"
|
||||
states="done,cancel" />
|
||||
</tree>
|
||||
<form string="Consumed Products">
|
||||
<field name="product_id" />
|
||||
<field name="product_qty" />
|
||||
<field name="product_uom" />
|
||||
</form>
|
||||
</field>
|
||||
widget="one2many_list" mode="tree,form" height="275">
|
||||
<tree string="Consumed Products" editable="bottom">
|
||||
<field name="product_id" readonly="1"/>
|
||||
<field name="product_qty" readonly="1"/>
|
||||
<field name="product_uom" readonly="1" />
|
||||
<field name="state" invisible="1" />
|
||||
<field name="location_id" readonly="1"/>
|
||||
<field name="prodlot_id" />
|
||||
<button
|
||||
name="%(stock.track_line)d"
|
||||
string="Split in production lots"
|
||||
type="action" icon="gtk-justify-fill"
|
||||
states="done,cancel" />
|
||||
<button
|
||||
name="%(stock.move_scrap)d"
|
||||
string="D" type="action"
|
||||
icon="gtk-convert"
|
||||
states="done,cancel" />
|
||||
</tree>
|
||||
<form string="Consumed Products">
|
||||
<field name="product_id" />
|
||||
<field name="product_qty" />
|
||||
<field name="product_uom" />
|
||||
</form>
|
||||
</field>
|
||||
|
||||
<group col="9" colspan="4">
|
||||
<field name="state" select="2"/>
|
||||
<button name="action_compute" states="draft" string="Compute Data" type="object" icon="gtk-execute"/>
|
||||
@@ -568,26 +568,26 @@
|
||||
</field>
|
||||
|
||||
<field colspan="2" name="move_created_ids2" nolabel="1" domain="[('state','in', ('done', 'cancel'))]"
|
||||
widget="one2many_list" mode="tree,form" height="275">
|
||||
<tree string="Finished Products" editable="bottom">
|
||||
<field name="product_id" readonly="1"/>
|
||||
<field name="product_qty" readonly="1"/>
|
||||
<field name="product_uom" readonly="1" />
|
||||
<field name="state" invisible="1" />
|
||||
<field name="location_id" readonly="1"/>
|
||||
<field name="prodlot_id" />
|
||||
<button name="%(stock.track_line)d"
|
||||
widget="one2many_list" mode="tree,form" height="275">
|
||||
<tree string="Finished Products" editable="bottom">
|
||||
<field name="product_id" readonly="1"/>
|
||||
<field name="product_qty" readonly="1"/>
|
||||
<field name="product_uom" readonly="1" />
|
||||
<field name="state" invisible="1" />
|
||||
<field name="location_id" readonly="1"/>
|
||||
<field name="prodlot_id" />
|
||||
<button name="%(stock.track_line)d"
|
||||
string="Split in production lots" type="action" icon="gtk-justify-fill" states="done,cancel"/>
|
||||
<button name="%(stock.move_scrap)d"
|
||||
string="D" type="action" icon="gtk-go-forward"
|
||||
states="done,cancel" />
|
||||
</tree>
|
||||
<form string="Finished Products">
|
||||
<field name="product_id" />
|
||||
<field name="product_qty" />
|
||||
<field name="product_uom" />
|
||||
</form>
|
||||
</field>
|
||||
<button name="%(stock.move_scrap)d"
|
||||
string="D" type="action" icon="gtk-go-forward"
|
||||
states="done,cancel" />
|
||||
</tree>
|
||||
<form string="Finished Products">
|
||||
<field name="product_id" />
|
||||
<field name="product_qty" />
|
||||
<field name="product_uom" />
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Work Orders">
|
||||
<field colspan="4" name="workcenter_lines" nolabel="1">
|
||||
@@ -878,7 +878,7 @@
|
||||
help="Procurement started late" />
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name"/>
|
||||
<field name="origin"/>
|
||||
<field name="origin"/>
|
||||
<field name="product_id" />
|
||||
<field name="date_planned" widget="date"/>
|
||||
<field name="state" />
|
||||
@@ -909,14 +909,12 @@
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="search_view_id" ref="view_mrp_procurement_filter"/>
|
||||
<field name="domain">[]</field>
|
||||
<field name="context">{}</field>
|
||||
<field name="domain">[]</field>
|
||||
<field name="context">{}</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="mrp_procurement_action3" id="menu_procurement_requisitions" parent="purchase.menu_procurement_management"
|
||||
name="Requisitions" sequence="5" />
|
||||
|
||||
|
||||
name="Requisitions" sequence="5" />
|
||||
|
||||
<record id="mrp_procurement_action5" model="ir.actions.act_window">
|
||||
<field name="name">Procurement Exceptions</field>
|
||||
@@ -979,7 +977,7 @@
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="view_warehouse_orderpoint_form" model="ir.ui.view">
|
||||
<field name="name">stock.warehouse.orderpoint.form</field>
|
||||
<field name="model">stock.warehouse.orderpoint</field>
|
||||
@@ -1048,5 +1046,13 @@
|
||||
name="Bill of Materials"
|
||||
res_model="mrp.bom"
|
||||
src_model="product.product"/>
|
||||
|
||||
<!-- Menu for Resource for MRP-->
|
||||
<menuitem icon="terp-mrp" id="base.menu_mrp_root" name="Manufacturing" sequence="3"/>
|
||||
<menuitem id="menu_pm_resources_mrp" name="Resources" parent="base.menu_mrp_root" sequence="2"/>
|
||||
<menuitem action="resource.action_resource_resource_tree" id="menu_view_resource_search_mrp" parent="menu_pm_resources_mrp" sequence="1"/>
|
||||
<menuitem action="resource.action_resource_calendar_form" id="menu_view_resource_calendar_search_mrp" parent="menu_pm_resources_mrp" sequence="1"/>
|
||||
<menuitem action="resource.action_resource_calendar_leave_tree" id="menu_view_resource_calendar_leaves_search_mrp" parent="menu_pm_resources_mrp" sequence="1"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<!-- <wizard id="wiz_mrp_proc0" model="mrp.procurement" string="Compute Schedulers" name="mrp.procurement.compute.all"/>-->
|
||||
<!-- <menuitem id="menu_mrp_scheduler" name="Schedulers" parent="menu_mrp_root" sequence="4"/> -->
|
||||
<!-- <menuitem action="wiz_mrp_proc0" id="mrp_Sched_all" parent="mrp.menu_mrp_scheduler" type="wizard" sequence="90"/>-->
|
||||
<wizard id="wiz_mrp_proc0" model="mrp.procurement" string="Compute Schedulers" name="mrp.procurement.compute.all"/>
|
||||
<menuitem id="menu_mrp_scheduler" name="Schedulers" parent="base.menu_mrp_root" sequence="4"/>
|
||||
<menuitem action="wiz_mrp_proc0" id="mrp_Sched_all" parent="mrp.menu_mrp_scheduler" type="wizard" sequence="90"/>
|
||||
<!--
|
||||
<menuitem action="wiz_mrp_proc1" id="menu_wiz_mrp_proc1" parent="mrp.mrp_Sched_all" type="wizard"/>
|
||||
-->
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<menuitem id="menu_mrp_planning" name="Planning" parent="mrp.menu_mrp_root" sequence="2"/>
|
||||
<menuitem id="menu_mrp_planning" name="Planning" parent="base.menu_mrp_root" sequence="2"/>
|
||||
<record model="ir.ui.view" id="mrp_production_workcenter_tree_view_inherit">
|
||||
<field name="name">mrp.production.workcenter.line.tree</field>
|
||||
<field name="model">mrp.production.workcenter.line</field>
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
<data>
|
||||
<menuitem icon="terp-project" id="base.menu_main_pm" name="Project Management" sequence="1"/>
|
||||
<menuitem id="menu_project_management" name="Project Management" parent="base.menu_main_pm" sequence="1"/>
|
||||
|
||||
<menuitem id="menu_definitions" name="Configuration" parent="base.menu_main_pm" sequence="60"/>
|
||||
<menuitem id="menu_definitions" name="Configuration" parent="base.menu_main_pm" sequence="60"/>
|
||||
|
||||
<!-- Project -->
|
||||
<record id="edit_project" model="ir.ui.view">
|
||||
@@ -86,6 +85,7 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_project_list" model="ir.ui.view">
|
||||
<field name="name">project.project.list</field>
|
||||
<field name="model">project.project</field>
|
||||
@@ -146,7 +146,6 @@
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<!--<menuitem id="menu_all_project" parent="base.menu_main_pm" name="Projects"/> -->
|
||||
|
||||
<record id="open_view_project_all" model="ir.actions.act_window">
|
||||
<field name="name">Projects</field>
|
||||
@@ -165,9 +164,9 @@
|
||||
<field name="domain">[('state','=','template')]</field>
|
||||
<field name="view_id" ref="view_project"/>
|
||||
</record>
|
||||
<!--<menuitem action="open_view_template_project" id="menu_template_project" parent="project.menu_definitions"/>-->
|
||||
<menuitem id="menu_template_project_specification" parent="project.menu_definitions" name="Specification" sequence="1"/>
|
||||
<menuitem action="open_view_template_project" id="menu_template_project" parent="project.menu_template_project_specification" name="Specification Template"/>
|
||||
|
||||
<record id="view_task_work_form" model="ir.ui.view">
|
||||
<field name="name">project.task.work.form</field>
|
||||
<field name="model">project.task.work</field>
|
||||
@@ -320,6 +319,7 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_task_tree2" model="ir.ui.view">
|
||||
<field name="name">project.task.tree</field>
|
||||
<field name="model">project.task</field>
|
||||
@@ -463,6 +463,7 @@
|
||||
<field name="domain">[('project_id', 'child_of', [active_id])]</field>
|
||||
<field name="context">{'project_id':active_id, 'active_test':False}</field>
|
||||
</record>
|
||||
|
||||
<record id="ir_project_task_open" model="ir.values">
|
||||
<field eval=" 'tree_but_open'" name="key2"/>
|
||||
<field eval="'project.project'" name="model"/>
|
||||
@@ -484,6 +485,7 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="task_type_tree" model="ir.ui.view">
|
||||
<field name="name">project.task.type.tree</field>
|
||||
<field name="model">project.task.type</field>
|
||||
@@ -495,6 +497,7 @@
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="open_task_type_form" model="ir.actions.act_window">
|
||||
<field name="name">Task Types</field>
|
||||
<field name="res_model">project.task.type</field>
|
||||
@@ -505,15 +508,6 @@
|
||||
|
||||
<act_window domain="[('user_id', '=', active_id)]" id="act_res_users_2_project_project" name="User's projects" res_model="project.project" src_model="res.users" view_mode="tree,form" view_type="form"/>
|
||||
|
||||
<act_window
|
||||
domain="[('project_id', '=', active_id)]"
|
||||
id="act_project_project_2_project_task_new"
|
||||
name="Create a Task"
|
||||
res_model="project.task"
|
||||
src_model="project.project"
|
||||
view_mode="form,tree,calendar,graph"
|
||||
view_type="form"/>
|
||||
|
||||
<act_window
|
||||
domain="[('project_id', '=', active_id)]"
|
||||
id="act_project_project_2_project_task_all"
|
||||
@@ -523,16 +517,7 @@
|
||||
view_mode="tree,form,calendar,graph"
|
||||
view_type="form"/>
|
||||
|
||||
<act_window
|
||||
domain="[('project_id', '=', active_id),('state', '<>', 'cancelled'),('state', '<>', 'done')]"
|
||||
id="act_project_project_2_project_task_opened"
|
||||
name="Tasks in Progress"
|
||||
res_model="project.task"
|
||||
src_model="project.project"
|
||||
view_mode="tree,form,calendar,graph"
|
||||
view_type="form"/>
|
||||
|
||||
<record id="task_company" model="ir.ui.view">
|
||||
<record id="task_company" model="ir.ui.view">
|
||||
<field name="name">res.company.task.config</field>
|
||||
<field name="model">res.company</field>
|
||||
<field name="type">form</field>
|
||||
@@ -549,30 +534,30 @@
|
||||
|
||||
<!-- User Form-->
|
||||
<record id="view_project_users_form_simple" model="ir.ui.view">
|
||||
<field name="name">res.users.project.form1</field>
|
||||
<field name="model">res.users</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="base.view_users_form"/>
|
||||
<field eval="18" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="password" position="after">
|
||||
<field name="context_project_id" completion="1" widget="selection"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
<field name="name">res.users.project.form1</field>
|
||||
<field name="model">res.users</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="base.view_users_form"/>
|
||||
<field eval="18" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="password" position="after">
|
||||
<field name="context_project_id" completion="1" widget="selection"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_users_form_project_modif_inherited1">
|
||||
<field name="name">view.users.form.project.modif.inherited1</field>
|
||||
<field name="model">res.users</field>
|
||||
<field name="inherit_id" ref="base.view_users_form_simple_modif" />
|
||||
<field name="type">form</field>
|
||||
<field eval="18" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<page string="Current Activity" position="inside">
|
||||
<field name="context_project_id" completion="1" widget="selection" context="{'user_prefence':True}"/>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
<field name="name">view.users.form.project.modif.inherited1</field>
|
||||
<field name="model">res.users</field>
|
||||
<field name="inherit_id" ref="base.view_users_form_simple_modif" />
|
||||
<field name="type">form</field>
|
||||
<field eval="18" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<page string="Current Activity" position="inside">
|
||||
<field name="context_project_id" completion="1" widget="selection" context="{'user_prefence':True}"/>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!--- Messages-->
|
||||
<record id="view_project_message_form" model="ir.ui.view">
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
"init_xml" : [],
|
||||
"demo_xml" : ["project_demo.xml"],
|
||||
"update_xml": [
|
||||
'security/ir.model.access.csv',
|
||||
"project_wizard.xml" ,
|
||||
"project_view.xml",
|
||||
"project_phase_workflow.xml"
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_project_resource_allocation_list" model="ir.ui.view">
|
||||
<field name="name">project.resource.allocation.list</field>
|
||||
<field name="model">project.resource.allocation</field>
|
||||
@@ -25,6 +26,7 @@
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_project_phase_form" model="ir.ui.view">
|
||||
<field name="name">project.phase.form</field>
|
||||
<field name="model">project.phase</field>
|
||||
@@ -79,8 +81,46 @@
|
||||
</page>
|
||||
<page string="Task Detail">
|
||||
<separator colspan="4" string="Project's Tasks"/>
|
||||
<field colspan="4" name="task_ids" nolabel="1"/>
|
||||
|
||||
<field colspan="4" name="task_ids" context="{'default_project_id' :project_id}" nolabel="1">
|
||||
<tree editable="bottom" string="Project's Tasks">
|
||||
<field name="name"/>
|
||||
<field name="project_id"/>
|
||||
<field name="user_id"/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_deadline"/>
|
||||
<field name="planned_hours" widget="float_time" on_change="onchange_planned(project_id, user_id, planned_hours, effective_hours)"/>
|
||||
<field name="remaining_hours" widget="float_time" sum="Remaining Hours"/>
|
||||
<field name="effective_hours" invisible="1"/>
|
||||
<field name="state"/>
|
||||
<field name="occupation_rate" invisible="1"/>
|
||||
</tree>
|
||||
<form string="Project's Tasks">
|
||||
<notebook colspan="4">
|
||||
<page string="Task Detail">
|
||||
<group colspan="4" col="4">
|
||||
<field name="name"/>
|
||||
<field name="project_id"/>
|
||||
<field name="user_id"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Dates" colspan="2"/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_deadline"/>
|
||||
<field name="occupation_rate" invisible="1"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Planning" colspan="2"/>
|
||||
<field name="planned_hours" widget="float_time" on_change="onchange_planned(project_id, user_id, planned_hours, effective_hours)"/>
|
||||
<field name="remaining_hours" widget="float_time" sum="Remaining Hours"/>
|
||||
<field name="effective_hours" invisible="1"/>
|
||||
</group>
|
||||
<group colspan="6" col="4">
|
||||
<field name="state"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
<button name="%(wizard_schedule_task)d" string="Schedule Tasks" type="action" icon="gtk-jump-to"/>
|
||||
</page>
|
||||
</notebook>
|
||||
@@ -88,6 +128,7 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_project_phase_list" model="ir.ui.view">
|
||||
<field name="name">project.phase.list</field>
|
||||
<field name="model">project.phase</field>
|
||||
@@ -212,8 +253,23 @@
|
||||
view_mode="tree,form"
|
||||
domain="[('phase_id','=',active_id)]"/>
|
||||
|
||||
<act_window
|
||||
domain="[('project_id', '=', active_id)]"
|
||||
id="act_project_phases"
|
||||
name="Phases"
|
||||
res_model="project.phase"
|
||||
src_model="project.project"
|
||||
view_mode="tree,form"
|
||||
view_type="form" />
|
||||
|
||||
<menuitem action="act_project_phase" id="menu_project_phase" parent="project.menu_project_management" sequence="4"/>
|
||||
|
||||
<!-- Menu for Resource for Long Term Project -->
|
||||
<menuitem icon="terp-project" id="base.menu_main_pm" name="Project Management" sequence="1"/>
|
||||
<menuitem id="menu_pm_resources_project1" name="Resources" parent="base.menu_main_pm" sequence="2"/>
|
||||
<menuitem action="resource.action_resource_resource_tree" id="menu_view_resource" parent="menu_pm_resources_project1" sequence="1"/>
|
||||
<menuitem action="resource.action_resource_calendar_form" id="menu_view_resource_calendar" parent="menu_pm_resources_project1" sequence="1"/>
|
||||
<menuitem action="resource.action_resource_calendar_leave_tree" id="menu_view_resource_calendar_leaves" parent="menu_pm_resources_project1" sequence="1"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<wizard id="wizard_compute_phase" menu="False" model="project.phase" name="wizard.compute.phases" string="Compute Phase Scheduling"/>
|
||||
<wizard id="wizard_schedule_task" menu="False" model="project.phase" name="phase.schedule.tasks" string="Schedule Tasks"/>
|
||||
<wizard id="wizard_compute_task" model="project.task" menu="False" name="wizard.compute.tasks" string="Compute Task Scheduling"/>
|
||||
<menuitem icon="terp-project" id="base.menu_main" name="Project Management" sequence="1"/>
|
||||
<menuitem id="base.menu_pm_planning" name="Planning" parent="base.menu_main" sequence="3"/>
|
||||
<menuitem
|
||||
action="wizard_compute_phase"
|
||||
|
||||
@@ -128,6 +128,17 @@ class wizard_compute_phases(wizard.interface):
|
||||
phase_schedule(cr, uid, phase, start_dt, calendar_id or False)
|
||||
return {}
|
||||
|
||||
def phases_open_list(self, cr, uid, data, context):
|
||||
mod_obj = pooler.get_pool(cr.dbname).get('ir.model.data')
|
||||
act_obj = pooler.get_pool(cr.dbname).get('ir.actions.act_window')
|
||||
result = mod_obj._get_id(cr, uid, 'project_long_term', 'act_project_phase')
|
||||
id = mod_obj.read(cr, uid, [result], ['res_id'])[0]['res_id']
|
||||
result = act_obj.read(cr, uid, [id], context=context)[0]
|
||||
if data['form']['project_id']:
|
||||
result['domain'] = [('project_id', '=', data['form']['project_id'])]
|
||||
result['domain'] = [('state', 'not in', ['cancelled','done'])]
|
||||
return result
|
||||
|
||||
states = {
|
||||
'init': {
|
||||
'actions': [],
|
||||
@@ -139,9 +150,10 @@ class wizard_compute_phases(wizard.interface):
|
||||
},
|
||||
'compute': {
|
||||
'actions': [_compute_date],
|
||||
'result': {'type':'form','arch':success_msg,'fields':{}, 'state':[('end', 'Ok')]},
|
||||
}
|
||||
'result': {'type': 'action', 'action':phases_open_list, 'state':'end'},
|
||||
},
|
||||
}
|
||||
|
||||
wizard_compute_phases('wizard.compute.phases')
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
groups="group_purchase_user"/>-->
|
||||
<menuitem icon="terp-purchase" id="base.menu_purchase_root" name="Procurement Management"
|
||||
groups="group_purchase_user" sequence="7"/>
|
||||
<menuitem id="menu_procurement_management" name="Procurement Management"
|
||||
<menuitem id="menu_procurement_management" name="Procurement Management"
|
||||
parent="base.menu_purchase_root" sequence="1"/>
|
||||
|
||||
<!--supplier menu-->
|
||||
@@ -20,9 +20,9 @@
|
||||
<menuitem id="menu_procurement_management_nventory" name="Inventory Control"
|
||||
parent="base.menu_purchase_root" sequence="4"/>
|
||||
<menuitem action="stock.action_picking_tree4" id="menu_action_picking_tree4" parent="menu_procurement_management_nventory"
|
||||
name="Incoming shipments" sequence="9"/>
|
||||
name="Incoming shipments" sequence="9"/>
|
||||
<menuitem action="stock.action_reception_picking_move" id="menu_action_reception_picking_move"
|
||||
name="Incoming Products" parent="menu_procurement_management_nventory" sequence="10"/>
|
||||
name="Incoming Products" parent="menu_procurement_management_nventory" sequence="10"/>
|
||||
|
||||
<!--Invoice control-->
|
||||
<menuitem id="menu_procurement_management_invoice" name="Invoice Control"
|
||||
@@ -160,11 +160,11 @@
|
||||
<filter icon="terp-partner" domain="[('create_uid','=',uid)]" help="My Purchase Orders"/>
|
||||
</field>
|
||||
</group>
|
||||
<group expand="1" string="Group By..." colspan="4" col="10">
|
||||
<filter string="Supplier" icon="terp-purchase" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="State" icon="terp-sale" domain="[]" context="{'group_by':'state'}"/>
|
||||
<filter string="Order Date" icon="terp-purchase" domain="[]" context="{'group_by':'date_order'}"/>
|
||||
</group>
|
||||
<group expand="1" string="Group By..." colspan="4" col="10">
|
||||
<filter string="Supplier" icon="terp-purchase" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="State" icon="terp-sale" domain="[]" context="{'group_by':'state'}"/>
|
||||
<filter string="Order Date" icon="terp-purchase" domain="[]" context="{'group_by':'date_order'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
@@ -178,8 +178,8 @@
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="search_view_id" ref="view_purchase_order_filter"/>
|
||||
</record>
|
||||
<menuitem action="purchase_rfq" id="menu_purchase_rfq" parent="menu_procurement_management"
|
||||
name="Request for Quotations" sequence="6"/>
|
||||
<menuitem action="purchase_rfq" id="menu_purchase_rfq" parent="menu_procurement_management"
|
||||
name="Request for Quotations" sequence="6"/>
|
||||
|
||||
<record id="purchase_form_action" model="ir.actions.act_window">
|
||||
<field name="name">Purchase Orders</field>
|
||||
|
||||
@@ -45,7 +45,7 @@ class report_crm_case(osv.osv):
|
||||
state = field_name[5:]
|
||||
cr.execute("select count(*) from crm_opportunity where section_id =%s and state='%s'"%(case.section_id.id,state))
|
||||
state_cases = cr.fetchone()[0]
|
||||
perc_state = (state_cases / float(case.nbr_cases) ) * 100
|
||||
perc_state = (state_cases / float(case.nbr) ) * 100
|
||||
|
||||
res[case.id] = perc_state
|
||||
else:
|
||||
@@ -58,7 +58,7 @@ class report_crm_case(osv.osv):
|
||||
cr.execute("select count(*) from crm_case_log l, ir_model m where l.model_id=m.id and m.model = '%s'" , model_name)
|
||||
logs = cr.fetchone()[0]
|
||||
|
||||
avg_ans = logs / case.nbr_cases
|
||||
avg_ans = logs / case.nbr
|
||||
res[case.id] = avg_ans
|
||||
|
||||
return res
|
||||
@@ -68,7 +68,7 @@ class report_crm_case(osv.osv):
|
||||
'user_id':fields.many2one('res.users', 'User', readonly=True),
|
||||
'section_id':fields.many2one('crm.case.section', 'Section', readonly=True),
|
||||
'nbr': fields.integer('# of Cases', readonly=True),
|
||||
'state': fields.selection(AVAILABLE_STATES, 'Status', size=16, readonly=True),
|
||||
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
|
||||
'avg_answers': fields.function(_get_data,string='Avg. Answers', method=True,type="integer"),
|
||||
'perc_done': fields.function(_get_data,string='%Done', method=True,type="float"),
|
||||
'perc_cancel': fields.function(_get_data,string='%Cancel', method=True,type="float"),
|
||||
|
||||
@@ -55,8 +55,9 @@
|
||||
<field name="inherit_id" ref="view_crm_case_filter"/>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="user_id" position="before">
|
||||
</field>
|
||||
<xpath expr='//search[@string="Search"]/group[@string="Group By..."]/filter[@string="State"]' position='after'>
|
||||
<filter string="Stage" icon="terp-sale" domain="[]" context="{'group_by':'stage_id'}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -7,10 +7,8 @@ class report_crm_fundraising(osv.osv):
|
||||
_inherit = "report.crm.case"
|
||||
_columns = {
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.fundraising')]"),
|
||||
'stage_id':fields.many2one('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.fundraising')]", readonly=True),
|
||||
'probability': fields.float('Avg. Probability', readonly=True),
|
||||
'amount_revenue': fields.float('Est.Revenue', readonly=True),
|
||||
'amount_costs': fields.float('Est.Cost', readonly=True),
|
||||
'amount_revenue_prob': fields.float('Est. Rev*Prob.', readonly=True),
|
||||
'delay_close': fields.char('Delay to close', size=20, readonly=True),
|
||||
}
|
||||
@@ -26,7 +24,6 @@ class report_crm_fundraising(osv.osv):
|
||||
c.user_id,
|
||||
c.section_id,
|
||||
c.categ_id,
|
||||
c.stage_id,
|
||||
count(*) as nbr,
|
||||
0 as avg_answers,
|
||||
0.0 as perc_done,
|
||||
@@ -37,7 +34,7 @@ class report_crm_fundraising(osv.osv):
|
||||
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
|
||||
from
|
||||
crm_fundraising c
|
||||
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.state, c.user_id,c.section_id,c.categ_id,c.stage_id
|
||||
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.state, c.user_id,c.section_id,c.categ_id
|
||||
)""")
|
||||
report_crm_fundraising()
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="section_id" invisible="1"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="stage_id" invisible="1"/>
|
||||
<field name="categ_id" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -36,7 +35,6 @@
|
||||
<field name="nbr" position="after">
|
||||
<field name="delay_close"/>
|
||||
<field name="amount_revenue"/>
|
||||
<field name="amount_costs"/>
|
||||
<field name="amount_revenue_prob"/>
|
||||
<field name="probability"/>
|
||||
</field>
|
||||
|
||||
@@ -55,7 +55,9 @@
|
||||
<field name="inherit_id" ref="view_crm_case_filter"/>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="user_id" position="before"/>
|
||||
<xpath expr='//search[@string="Search"]/group[@string="Group By..."]/filter[@string="State"]' position='after'>
|
||||
<filter string="Stage" icon="terp-sale" domain="[]" context="{'group_by':'stage_id'}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -61,8 +61,9 @@
|
||||
<field name="inherit_id" ref="view_crm_case_filter"/>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="user_id" position="before">
|
||||
</field>
|
||||
<xpath expr='//search[@string="Search"]/group[@string="Group By..."]/filter[@string="State"]' position='after'>
|
||||
<filter string="Stage" icon="terp-sale" domain="[]" context="{'group_by':'stage_id'}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -49,14 +49,13 @@
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_crm_phonecall_filter" model="ir.ui.view">
|
||||
<field name="name">report.crm.phonecall.select</field>
|
||||
<field name="model">report.crm.phonecall</field>
|
||||
<field name="inherit_id" ref="view_crm_case_filter"/>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="user_id" position="before">
|
||||
<field name="user_id" position="before">
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -79,7 +79,6 @@
|
||||
<filter string="User" icon="terp-sale" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Section" icon="terp-sale" domain="[]" context="{'group_by':'section_id'}"/>
|
||||
<filter string="State" icon="terp-sale" domain="[]" context="{'group_by':'state'}"/>
|
||||
<filter string="Stage" icon="terp-sale" domain="[]" context="{'group_by':'stage_id'}"/>
|
||||
<filter string="Month" icon="terp-sale" domain="[]" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" icon="terp-sale" domain="[]" context="{'group_by':'name'}"/>
|
||||
<filter string="Category" icon="terp-sale" domain="[]" context="{'group_by':'categ_id'}"/>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree</field>
|
||||
</record>
|
||||
<menuitem id="next_id_77" name="Reporting" parent="mrp.menu_mrp_root" sequence="49"/>
|
||||
<menuitem id="next_id_77" name="Reporting" parent="base.menu_mrp_root" sequence="49"/>
|
||||
<menuitem action="action_report_workcenter_load_tree" id="menu_report_workcenter_load" parent="next_id_77"/>
|
||||
|
||||
<!-- stock.move compared to internal location src/dest -->
|
||||
|
||||
@@ -1,9 +1,58 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<menuitem icon="terp-project" id="base.menu_main" name="Project Management" sequence="1"/>
|
||||
<menuitem id="base.menu_pm_resources" name="Resources" parent="base.menu_main" sequence="2"/>
|
||||
|
||||
<!-- Search Views -->
|
||||
|
||||
<record id="view_resource_resource_search" model="ir.ui.view">
|
||||
<field name="name">resource.resource.search</field>
|
||||
<field name="model">resource.resource</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Resource">
|
||||
<group col='15' colspan='4'>
|
||||
<field name="name" string="Resource Name"/>
|
||||
<field name="code" string="Code"/>
|
||||
<field name="user_id" string="User" widget="selection"/>
|
||||
<field name="calendar_id" string="Working Calendar" widget="selection"/>
|
||||
<field name="resource_type" string="Resource Type"/>
|
||||
<field name="company_id" string="Company" widget="selection"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_resource_calendar_search" model="ir.ui.view">
|
||||
<field name="name">resource.calendar.search</field>
|
||||
<field name="model">resource.calendar</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Resource Calendar">
|
||||
<group col='15' colspan='4'>
|
||||
<field name="name" string="Working Calendar"/>
|
||||
<field name="manager" string="Workgroup Manager" widget="selection"/>
|
||||
<field name="company_id" string="Company" widget="selection"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_resource_calendar_leaves_search" model="ir.ui.view">
|
||||
<field name="name">resource.calendar.leaves.search</field>
|
||||
<field name="model">resource.calendar.leaves</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Resource Calendar Leaves">
|
||||
<group col='15' colspan='4'>
|
||||
<field name="name" string="Name"/>
|
||||
<field name="company_id" string="Company" widget="selection"/>
|
||||
<field name="calendar_id" string="Working Time" widget="selection"/>
|
||||
<field name="resource_id" string="Resource" widget="selection"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="resource_calendar_form" model="ir.ui.view">
|
||||
<field name="name">resource.calendar.form</field>
|
||||
<field name="model">resource.calendar</field>
|
||||
@@ -18,13 +67,28 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_resource_calendar_tree" model="ir.ui.view">
|
||||
<field name="name">resource.calendar.tree</field>
|
||||
<field name="model">resource.calendar</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Resource Calendar">
|
||||
<field name="name"/>
|
||||
<field name="manager" select="1"/>
|
||||
<field name="company_id" select="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_resource_calendar_form" model="ir.actions.act_window">
|
||||
<field name="name">Resource Calendar</field>
|
||||
<field name="res_model">resource.calendar</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" eval="False"/>
|
||||
<field name="search_view_id" ref="view_resource_calendar_search"/>
|
||||
</record>
|
||||
<menuitem string="Resource Calendar" action="action_resource_calendar_form" id="menu_resource_calendar_form" parent="base.menu_pm_resources"/>
|
||||
|
||||
<record id="view_resource_calendar_week_tree" model="ir.ui.view">
|
||||
<field name="name">resource.calendar.week.tree</field>
|
||||
@@ -65,7 +129,6 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<act_window
|
||||
id="resource_calendar_closing_days"
|
||||
name="Closing Days"
|
||||
@@ -82,7 +145,6 @@
|
||||
view_mode="calendar,tree,form"
|
||||
domain="[('calendar_id','=',active_id), ('resource_id','!=',False)]"/>
|
||||
|
||||
|
||||
<record id="resource_resource_form" model="ir.ui.view">
|
||||
<field name="name">resource.resource.form</field>
|
||||
<field name="model">resource.resource</field>
|
||||
@@ -104,7 +166,7 @@
|
||||
<field name="model">resource.resource</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Resource">
|
||||
<tree string="Resources">
|
||||
<field name="name" />
|
||||
<field name="company_id" />
|
||||
<field name="calendar_id" />
|
||||
@@ -118,10 +180,9 @@
|
||||
<field name="name">Resources</field>
|
||||
<field name="res_model">resource.resource</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="search_view_id" ref="view_resource_resource_search"/>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_resource_resource_tree" id="base.menu_resource_resource_tree" parent="base.menu_pm_resources" />
|
||||
|
||||
<record id="resource_calendar_leave_form" model="ir.ui.view">
|
||||
<field name="name">resource.calendar.leaves.form</field>
|
||||
<field name="model">resource.calendar.leaves</field>
|
||||
@@ -156,9 +217,8 @@
|
||||
<field name="name">Resource Leaves</field>
|
||||
<field name="res_model">resource.calendar.leaves</field>
|
||||
<field name="view_mode">tree,form,calendar</field>
|
||||
<field name="search_view_id" ref="view_resource_calendar_leaves_search"/>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_resource_calendar_leave_tree" id="menu_resource_calendar_leave_tree" parent="base.menu_pm_resources"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
<field name="inherit_id" ref="crm.crm_case_form_view_oppor"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="/form[@string='Opportunities']/group/button[@string='Schedule Call']" position="after">
|
||||
<button string="Quotation" icon="terp-sale" name="%(sale_crm_wizard)d" type="action"/>
|
||||
<button string="Convert to Quote" icon="terp-sale" name="%(sale_crm_wizard)d" type="action"/>
|
||||
<label colspan="6" string=""/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
@@ -20,27 +21,27 @@
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="/form/notebook/page[@string='Other data']/field[@name='company_id']" position="after">
|
||||
<field name="section_id" widget='selection'/>
|
||||
</xpath>
|
||||
<field name="user_id" position="after">
|
||||
<field name="section_id" widget="selection"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_sales_order_filter_inherit" model="ir.ui.view">
|
||||
<record id="view_sales_order_filter_inherit" model="ir.ui.view">
|
||||
<field name="name">sale.order.list.select</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="type">search</field>
|
||||
<field name="inherit_id" ref="sale.view_sales_order_filter"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="date_order" position="after">
|
||||
<field name="section_id" default="context.get('section_id', False)" select="1" widget="selection" string="Section">
|
||||
<filter icon="terp-crm"
|
||||
<field name="date_order" position="after">
|
||||
<field name="section_id" default="context.get('section_id', False)" select="1" widget="selection" string="Section">
|
||||
<filter icon="terp-crm"
|
||||
domain="[('section_id','=',context.get('section_id',False))]"
|
||||
help="My section"/>
|
||||
</field>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</field>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
||||
@@ -130,16 +130,31 @@ class make_sale(wizard.interface):
|
||||
|
||||
if data['form']['close']:
|
||||
case_obj.case_close(cr, uid, data['ids'])
|
||||
|
||||
value = {
|
||||
'domain': str([('id', 'in', new_ids)]),
|
||||
'view_type': 'form',
|
||||
'view_mode': 'tree,form',
|
||||
'res_model': 'sale.order',
|
||||
'view_id': False,
|
||||
'type': 'ir.actions.act_window',
|
||||
'search_view_id': id['res_id']
|
||||
}
|
||||
|
||||
if not new_ids:
|
||||
return {}
|
||||
|
||||
if len(new_ids)<=1:
|
||||
value = {
|
||||
'domain': str([('id', 'in', new_ids)]),
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
'res_model': 'sale.order',
|
||||
'view_id': False,
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_id': new_ids and new_ids[0]
|
||||
}
|
||||
else:
|
||||
value = {
|
||||
'domain': str([('id', 'in', new_ids)]),
|
||||
'view_type': 'form',
|
||||
'view_mode': 'tree,form',
|
||||
'res_model': 'sale.order',
|
||||
'view_id': False,
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_id':new_ids
|
||||
}
|
||||
|
||||
return value
|
||||
|
||||
states = {
|
||||
|
||||
@@ -187,7 +187,7 @@ class survey_browse_response(report_rml):
|
||||
if datas.has_key('form') and datas['form'].has_key('response_ids'):
|
||||
response_id = datas['form']['response_ids'][0][2]
|
||||
elif context.has_key('response_id') and context['response_id']:
|
||||
response_id = [int(context['response_id'])]
|
||||
response_id = [int(context['response_id'][0])]
|
||||
else:
|
||||
response_id = surv_resp_obj.search(cr, uid, [('survey_id', 'in', ids)])
|
||||
surv_resp_line_obj = pooler.get_pool(cr.dbname).get('survey.response.line')
|
||||
|
||||
@@ -691,7 +691,7 @@ class survey_question_wiz(osv.osv_memory):
|
||||
total_pages = len(p_id)
|
||||
pre_button = False
|
||||
readonly = 0
|
||||
if context.has_key('response_id') and context['response_id']:
|
||||
if context.has_key('response_id') and context['response_id'] and int(context['response_id'][0]) > 0:
|
||||
readonly = 1
|
||||
if not sur_name_rec['page_no'] + 1 :
|
||||
surv_name_wiz.write(cr, uid, [context['sur_name_id']], {'store_ans':{}})
|
||||
@@ -731,7 +731,7 @@ class survey_question_wiz(osv.osv_memory):
|
||||
pag_rec = page_obj.read(cr, uid, p_id)
|
||||
xml_form = etree.Element('form', {'string': _(tools.ustr(pag_rec['title']))})
|
||||
xml_group = etree.SubElement(xml_form, 'group', {'col': '1', 'colspan': '4'})
|
||||
if context.has_key('response_id'):
|
||||
if context.has_key('response_id') and context['response_id'] and int(context['response_id'][0]) > 0:
|
||||
xml_group = etree.SubElement(xml_form, 'group', {'col': '40', 'colspan': '4'})
|
||||
record = sur_response_obj.browse(cr, uid, context['response_id'][context['response_no']])
|
||||
etree.SubElement(xml_group, 'label', {'string': to_xml(tools.ustr('Answer Of :- ' + record.user_id.name + ', Date :- ' + record.date_create.split('.')[0] )), 'align':"0.0"})
|
||||
@@ -1011,7 +1011,7 @@ class survey_question_wiz(osv.osv_memory):
|
||||
tot_per = (float(100) * (int(field.split('_')[2]) + 1) / len(tot_page_id.page_ids))
|
||||
value[field] = tot_per
|
||||
response_obj = self.pool.get('survey.response')
|
||||
if context.has_key('response_id') and context['response_id']:
|
||||
if context.has_key('response_id') and context['response_id'] and int(context['response_id'][0]) > 0:
|
||||
data = super(survey_question_wiz, self).default_get(cr, uid, fields_list, context)
|
||||
response_ans = response_obj.browse(cr, uid, context['response_id'][context['response_no']])
|
||||
fields_list.sort()
|
||||
|
||||
Reference in New Issue
Block a user