This commit is contained in:
Ivan Office
2024-06-25 01:07:36 +08:00
parent 96f1993ace
commit 821fec77ab

View File

@@ -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})