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

@@ -20,9 +20,9 @@ from odoo import api, fields, models, exceptions, _
class ProductCategory(models.Model):
_inherit = 'product.category'
# 更新 complete_name 算法当有context: show_short =1 时,只显示短名
# 更新 complete_name 算法当有context: show_short_category =1 时,只显示短名
def name_get(self):
if self._context.get('show_short'):
if self._context.get('show_short_category'):
new_res = []
for category in self:
name = category.name