event.add('location').value = event_obj.location
if event_obj.rrule:
event.add('rrule').value = event_obj.rrule
- if event_obj.user_id or event_obj.organizer_id:
+ if event_obj.organizer:
++ # deprecated: will be removed with OpenERP v8: use organizer_id instead
+ event_org = event.add('organizer')
+ event_org.params['CN'] = [event_obj.organizer]
+ event_org.value = 'MAILTO:' + (event_obj.organizer)
+ elif event_obj.user_id or event_obj.organizer_id:
event_org = event.add('organizer')
organizer = event_obj.organizer_id
if not organizer:
'recurrent_id_date': fields.datetime('Recurrent ID date'),
'vtimezone': fields.selection(_tz_get, size=64, string='Timezone'),
'user_id': fields.many2one('res.users', 'Responsible', states={'done': [('readonly', True)]}),
- 'organizer': fields.char("Organizer", size=256, states={'done': [('readonly', True)]}), # Map with organizer attribute of VEvent.
++ 'organizer': fields.char("Organizer (deprecated)", size=256, states={'done': [('readonly', True)]},
++ deprecated='Will be removed with OpenERP v8; use organizer_id field instead'), # Map with organizer attribute of VEvent.
'organizer_id': fields.many2one('res.users', 'Organizer', states={'done': [('readonly', True)]}),
'end_type' : fields.selection([('count', 'Number of repetitions'), ('end_date','End date')], 'Recurrence Termination'),
'interval': fields.integer('Repeat Every', help="Repeat every (Days/Week/Month/Year)"),
email_from = current_user.email, context=context)
return True
+ def default_organizer(self, cr, uid, context=None):
++ """
++ .. deprecated:: 8.0
++ Use organizer_id field and its default value instead.
++ """
+ user_pool = self.pool.get('res.users')
+ user = user_pool.browse(cr, uid, uid, context=context)
+ res = user.name
+ if user.email:
+ res += " <%s>" %(user.email)
+ return res
+
_defaults = {
'end_type': 'count',
'count': 1,
on_change="onchange_dates(date,False,date_deadline)"/>
</group>
<group>
- <field name="user_id" groups="base.group_no_one"/>
+ <field name="user_id" groups="base.group_no_one" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_sale_salesman_all_leads']}"/>
<field name="categ_ids" widget="many2many_tags"/>
<field name="location"/>
- <field name="organizer" groups="base.group_no_one"/>
</group>
</group>
'brand_id': fields.many2one('fleet.vehicle.model.brand', 'Model Brand', required=True, help='Brand of the vehicle'),
'vendors': fields.many2many('res.partner', 'fleet_vehicle_model_vendors', 'model_id', 'partner_id', string='Vendors'),
'image': fields.related('brand_id', 'image', type="binary", string="Logo"),
- 'image_medium': fields.related('brand_id', 'image_medium', type="binary", string="Logo"),
- 'image_small': fields.related('brand_id', 'image_small', type="binary", string="Logo"),
- 'image_medium': fields.related('brand_id', 'image_medium', type="binary", string="Logo - medium"),
- 'image_small': fields.related('brand_id', 'image_small', type="binary", string="Logo - small"),
++ 'image_medium': fields.related('brand_id', 'image_medium', type="binary", string="Logo (medium)"),
++ 'image_small': fields.related('brand_id', 'image_small', type="binary", string="Logo (small)"),
}
'power': fields.integer('Power', help='Power in kW of the vehicle'),
'co2': fields.float('CO2 Emissions', help='CO2 emissions of the vehicle'),
'image': fields.related('model_id', 'image', type="binary", string="Logo"),
- 'image_medium': fields.related('model_id', 'image_medium', type="binary", string="Logo"),
- 'image_small': fields.related('model_id', 'image_small', type="binary", string="Logo"),
- 'image_medium': fields.related('model_id', 'image_medium', type="binary", string="Logo - medium"),
- 'image_small': fields.related('model_id', 'image_small', type="binary", string="Logo - small"),
++ 'image_medium': fields.related('model_id', 'image_medium', type="binary", string="Logo (medium)"),
++ 'image_small': fields.related('model_id', 'image_small', type="binary", string="Logo (small)"),
'contract_renewal_due_soon': fields.function(_get_contract_reminder_fnc, fnct_search=_search_contract_renewal_due_soon, type="boolean", string='Has Contracts to renew', multi='contract_info'),
'contract_renewal_overdue': fields.function(_get_contract_reminder_fnc, fnct_search=_search_get_overdue_contract_reminder, type="boolean", string='Has Contracts Overdued', multi='contract_info'),
'contract_renewal_name': fields.function(_get_contract_reminder_fnc, type="text", string='Name of contract to renew soon', multi='contract_info'),
'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the project without removing it."),
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of Projects."),
'analytic_account_id': fields.many2one('account.analytic.account', 'Contract/Analytic', help="Link this project to an analytic account if you need financial management on projects. It enables you to connect projects with budgets, planning, cost and revenue analysis, timesheets on projects, etc.", ondelete="cascade", required=True),
- 'priority': fields.integer('Sequence', help="Gives the sequence order when displaying the list of projects"),
++ 'priority': fields.integer('Sequence (deprecated)',
++ deprecated='Will be removed with OpenERP v8; use sequence field instead',
++ help="Gives the sequence order when displaying the list of projects"),
'members': fields.many2many('res.users', 'project_user_rel', 'project_id', 'uid', 'Project Members',
help="Project's members are users who can have an access to the tasks related to this project.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'tasks': fields.one2many('project.task', 'project_id', "Task Activities"),