Browse Source

[FIX] returns the default team as a browsed record instead of the internal id. Otherwise error occurs as "AttributeError: 'int' object has no attribute 'id'"

pull/103/head
jbeficent 8 years ago
parent
commit
59a0283a90
  1. 3
      crm_phone/crm_phone.py

3
crm_phone/crm_phone.py

@ -71,7 +71,8 @@ class CrmPhonecall(models.Model):
default=lambda self: self.env.user)
team_id = fields.Many2one(
'crm.team', string='Sales Team', track_visibility='onchange',
default=lambda self: self.env['crm.team']._get_default_team_id())
default=lambda self: self.env['crm.team'].browse(
self.env['crm.team']._get_default_team_id()))
partner_id = fields.Many2one(
'res.partner', string='Contact', ondelete='cascade')
partner_phone = Phone(string='Phone', partner_field='partner_id')

Loading…
Cancel
Save