[IMP] base: specify placeholder for company partners

set the specify placeholder for company partners from 'placeholder.png' to 'company_image.png'

After this commit, in the res.partner kanban view, if the company image of an individual is not set,
it will be shown as the 'company_image.png'(a company logo) rather than the 'plaeholder.png'(a camera logo).

closes odoo/odoo#68994

Taskid: 2491161
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
This commit is contained in:
Chong Wang (cwg)
2021-04-16 09:01:46 +00:00
parent ed12ad006a
commit 85e1c447df
+5
View File
@@ -1003,6 +1003,11 @@ class Partner(models.Model):
def _get_country_name(self):
return self.country_id.name or ''
def _get_placeholder_filename(self, field=None):
if self.is_company:
return '/base/static/img/company_image.png'
return super()._get_placeholder_filename(field)
class ResPartnerIndustry(models.Model):
_description = 'Industry'