diff --git a/app_base_chinese/__manifest__.py b/app_base_chinese/__manifest__.py
index a04bcf6d..3043450f 100644
--- a/app_base_chinese/__manifest__.py
+++ b/app_base_chinese/__manifest__.py
@@ -18,7 +18,7 @@
{
'name': "App base chinese,中国化基本模块增强",
- 'version': '15.22.07.20',
+ 'version': '13.21.01.02',
'author': 'Sunpop.cn',
'category': 'Base',
'website': 'https://www.sunpop.cn',
@@ -67,8 +67,7 @@
'views/sale_order_views.xml',
'views/account_move_views.xml',
'views/ir_default_views.xml',
- # todo: set assets
- # 'views/templates.xml',
+ 'views/templates.xml',
'wizard/sale_make_invoice_advance_views.xml',
'data/ir_default_data.xml',
'data/base_data.xml',
@@ -92,7 +91,6 @@
],
'js': [
],
- 'post_init_hook': 'post_init_hook',
'installable': True,
'application': True,
'auto_install': False,
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_partner_views.xml b/app_base_chinese/views/res_partner_views.xml
index 4d6deedb..404b8521 100644
--- a/app_base_chinese/views/res_partner_views.xml
+++ b/app_base_chinese/views/res_partner_views.xml
@@ -94,25 +94,25 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ app.res.partner.form
+ res.partner
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
app.res.partner.view.form.private