Browse Source

[FIX] add default company

pull/149/head
Florent de Labarre 7 years ago
committed by GitHub
parent
commit
7ea4dbd66e
  1. 3
      base_sms_client/models/sms_gateway.py

3
base_sms_client/models/sms_gateway.py

@ -62,7 +62,8 @@ class SmsAbstract(models.AbstractModel):
char_limit = fields.Integer(string='Character Limit', default=160) char_limit = fields.Integer(string='Character Limit', default=160)
default_gateway = fields.Boolean() default_gateway = fields.Boolean()
company_id = fields.Many2one(comodel_name='res.company')
company_id = fields.Many2one(comodel_name='res.company',
default=lambda self: self.env.user.company_id)
class SmsGateway(models.Model): class SmsGateway(models.Model):

Loading…
Cancel
Save