Skip to content
Snippets Groups Projects
Commit 519dd273 authored by Christophe Simonis's avatar Christophe Simonis
Browse files

[MERGE] forward port of branch 9.0 up to d5f28f4a

parents 5be43b8d d5f28f4a
No related branches found
No related tags found
No related merge requests found
......@@ -548,10 +548,8 @@ class res_partner(osv.Model, format_address):
@api.model
def create(self, vals):
if vals.get('type') == 'delivery':
vals['image'] = self.with_context(partner_type='delivery')._get_default_image(False, False)
elif vals.get('type') == 'invoice':
vals['image'] = self.with_context(partner_type='invoice')._get_default_image(False, False)
if vals.get('type') and not self._context.get('partner_type'):
self = self.with_context(partner_type=vals['type'])
if vals.get('website'):
vals['website'] = self._clean_website(vals['website'])
# function field not correctly triggered at create -> remove me when
......
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