diff --git a/app_base_chinese/__manifest__.py b/app_base_chinese/__manifest__.py
index a9402f33..3043450f 100644
--- a/app_base_chinese/__manifest__.py
+++ b/app_base_chinese/__manifest__.py
@@ -18,7 +18,7 @@
{
'name': "App base chinese,中国化基本模块增强",
- 'version': '13.21.07.27',
+ 'version': '13.21.01.02',
'author': 'Sunpop.cn',
'category': 'Base',
'website': 'https://www.sunpop.cn',
diff --git a/app_base_chinese/data/stock.location.csv b/app_base_chinese/data/stock.location.csv
index fa5008c6..7c599d1d 100644
--- a/app_base_chinese/data/stock.location.csv
+++ b/app_base_chinese/data/stock.location.csv
@@ -1,7 +1,7 @@
id,name
-stock.stock_location_locations_partner,λ
-stock.stock_location_customers,ͻλ
-stock.stock_location_suppliers,Ӧλ
-stock.stock_location_locations,λ
-stock.stock_location_locations_virtual,λ
-stock.stock_location_inter_wh,ڲתλ
+stock.stock_location_locations_partner,往来单位
+stock.stock_location_customers,客户区位
+stock.stock_location_suppliers,供应商区位
+stock.stock_location_locations,物理区位
+stock.stock_location_locations_virtual,虚拟区位
+stock.stock_location_inter_wh,内部中转区位
diff --git a/app_base_chinese/data/stock_location_data.xml b/app_base_chinese/data/stock_location_data.xml
index 4e39f5d8..ec265243 100644
--- a/app_base_chinese/data/stock_location_data.xml
+++ b/app_base_chinese/data/stock_location_data.xml
@@ -1,31 +1,51 @@
-
+
先进先出(FIFO)
-
+
后进先出(LIFO)
-
- 物理区位
-
-
- 往来单位
-
-
- 虚拟区位
-
-
- 供应商区位
-
-
- 客户区位
-
-
- 内部中转区位
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app_base_chinese/models/__init__.py b/app_base_chinese/models/__init__.py
index 423324f5..ae2ddbc9 100644
--- a/app_base_chinese/models/__init__.py
+++ b/app_base_chinese/models/__init__.py
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
+from . import res_company
from . import res_partner
from . import res_currency
from . import product_category
diff --git a/app_base_chinese/models/res_company.py b/app_base_chinese/models/res_company.py
index 06892a0b..3d5103e4 100644
--- a/app_base_chinese/models/res_company.py
+++ b/app_base_chinese/models/res_company.py
@@ -7,11 +7,24 @@ from odoo.exceptions import UserError, ValidationError
class ResCompany(models.Model):
_inherit = 'res.company'
- short_name = fields.Char('Short Name', related='partner_id.short_name', readonly=False)
-
- # 当传参 show_short_company 时,只显示简称
- def name_get(self):
- 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()
+ @api.model
+ def _adjust_wh_cn_name(self):
+ companys = self.env['res.company'].with_context(active_test=False, lang='zh_CN').search([])
+ for rec in companys:
+ # 修正区位名称
+ 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 = self.env['stock.location'].with_context(active_test=False).search(
+ [('name', 'like', ': Scrap'), ('company_id', '=', rec.id)])
+ ids.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 = self.env['stock.location'].with_context(active_test=False).search([
+ ('name', 'like', ': Production'), ('company_id', '=', rec.id)])
+ ids.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})
diff --git a/app_base_chinese/views/res_company_views.xml b/app_base_chinese/views/res_company_views.xml
deleted file mode 100644
index 880be72b..00000000
--- a/app_base_chinese/views/res_company_views.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
- app.res.company.form
- res.company
-
-
-
-
-
-
-
-
-
- app.res.company.form
- res.company
-
-
-
-
-
-
-
-
-