update common add core

This commit is contained in:
ivan deng
2020-09-16 03:04:26 +08:00
parent 05cd3ec558
commit 6a336710cb
5 changed files with 12 additions and 12 deletions

View File

@@ -9,9 +9,9 @@ class ResCompany(models.Model):
short_name = fields.Char('Short Name', related='partner_id.short_name', readonly=False)
# 当传参 show_short_name 时,只显示简称
# 当传参 show_short_company 时,只显示简称
def name_get(self):
if self._context.get('show_short_name'):
if self._context.get('show_short_company'):
return [(value.id, "%s" % (value.short_name if value.short_name else value.name)) for value in self]
else:
return super().name_get()