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

[FIX] Partner type not in dict :/

parent 560deee0
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