diff --git a/app_base_chinese/models/res_company.py b/app_base_chinese/models/res_company.py index 3d5103e4..a6c5e69d 100644 --- a/app_base_chinese/models/res_company.py +++ b/app_base_chinese/models/res_company.py @@ -14,17 +14,17 @@ class ResCompany(models.Model): # 修正区位名称 ids = self.env['stock.location'].with_context(active_test=False).search( [('name', 'like', ': Transit Location'), ('company_id', '=', rec.id)]) - ids.write({'name': '%s: 中转区位' % rec.name}) + ids.with_context(lang='zh_CN').write({'name': '%s:中转区位' % rec.name}) ids = self.env['stock.location'].with_context(active_test=False).search( [('name', 'like', ': Scrap'), ('company_id', '=', rec.id)]) - ids.write({'name': '%s: 报废区位' % rec.name}) + ids.with_context(lang='zh_CN').write({'name': '%s:报废区位' % rec.name}) ids = self.env['stock.location'].with_context(active_test=False).search( [('name', 'like', ': Inventory adjustment'), ('company_id', '=', rec.id)]) - ids.write({'name': '%s: 盘点区位' % rec.name}) + ids.with_context(lang='zh_CN').write({'name': '%s:盘点区位' % rec.name}) # 注意,原生没有在生产中使用 _ ids = self.env['stock.location'].with_context(active_test=False).search([ ('name', 'like', ': Production'), ('company_id', '=', rec.id)]) - ids.write({'name': '%s: 生产区位' % rec.name}) + ids.with_context(lang='zh_CN').write({'name': '%s:生产区位' % rec.name}) ids = self.env['stock.location'].with_context(active_test=False).search([ ('name', 'like', ': Subcontracting Location'), ('company_id', '=', rec.id)]) - ids.write({'name': '%s: 委外区位' % rec.name}) + ids.with_context(lang='zh_CN').write({'name': '%s:委外区位' % rec.name})