Skip to content
Snippets Groups Projects
Commit de428d5d authored by Santiago Said's avatar Santiago Said
Browse files

Merge branch 'MR' into '12.0-stage'

[FIX] Partner type not in dict :/

See merge request !19
parents 560deee0 53be8249
No related branches found
No related tags found
1 merge request!19[FIX] Partner type not in dict :/
......@@ -46,7 +46,7 @@ class Partner(models.Model):
@api.model
def create(self, vals):
if 'ref' not in vals.keys() and vals['partner_type'] == 'insurance':
if 'ref' not in vals.keys() and vals.get('partner_type', '') == 'insurance':
vals['ref'] = str(self.env['ir.sequence'].next_by_code('res.partner.insurance'))
return super(Partner, self).create(vals)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment