diff --git a/app_base_chinese/__manifest__.py b/app_base_chinese/__manifest__.py
index 56876a72..792904d1 100644
--- a/app_base_chinese/__manifest__.py
+++ b/app_base_chinese/__manifest__.py
@@ -18,7 +18,7 @@
{
'name': "App base chinese,中国化基本模块增强",
- 'version': '14.21.03.22',
+ 'version': '14.23.02.02',
'author': 'Sunpop.cn',
'category': 'Base',
'website': 'https://www.sunpop.cn',
@@ -49,13 +49,15 @@
12. 翻译导出默认中文,默认po
13. 在 base 模型增加 name_en_US 字段,赋值后同时改翻译值
14. 常用小数精度调整
- 21. todo:中文演示数据(只有demo模式才加载)
+ 15. 销售团队改为中国
+ 21. todo:中文演示数据(只有demo模式才加载)
""",
'pre_init_hook': 'pre_init_hook',
'post_init_hook': 'post_init_hook',
'depends': [
'app_base',
'account',
+ 'sales_team',
'stock',
],
'images': ['static/description/banner.jpg'],
@@ -65,6 +67,7 @@
'views/sale_order_views.xml',
'views/account_move_views.xml',
'views/ir_default_views.xml',
+ 'views/menu_views.xml',
'views/templates.xml',
'wizard/sale_make_invoice_advance_views.xml',
'data/ir_default_data.xml',
@@ -76,6 +79,7 @@
'data/product_data.xml',
'data/product_pricelist_data.xml',
'data/stock_location_data.xml',
+ 'data/sales_team_data.xml',
],
'demo': [
],
diff --git a/app_base_chinese/data/res_country_data.xml b/app_base_chinese/data/res_country_data.xml
index cef3b7f1..69abe44f 100644
--- a/app_base_chinese/data/res_country_data.xml
+++ b/app_base_chinese/data/res_country_data.xml
@@ -3,7 +3,7 @@
-
+
diff --git a/app_base_chinese/data/sales_team_data.xml b/app_base_chinese/data/sales_team_data.xml
new file mode 100644
index 00000000..b1a5030d
--- /dev/null
+++ b/app_base_chinese/data/sales_team_data.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app_base_chinese/data/stock.location.csv b/app_base_chinese/data/stock.location.csv
new file mode 100644
index 00000000..7c599d1d
--- /dev/null
+++ b/app_base_chinese/data/stock.location.csv
@@ -0,0 +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,内部中转区位
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/demo/res_partner_demo.xml b/app_base_chinese/demo/res_partner_demo.xml
index b5ead63c..795824e1 100644
--- a/app_base_chinese/demo/res_partner_demo.xml
+++ b/app_base_chinese/demo/res_partner_demo.xml
@@ -1,6 +1,6 @@
-
+
diff --git a/app_base_chinese/demo/res_partner_image_demo.xml b/app_base_chinese/demo/res_partner_image_demo.xml
index 541f38ea..da8c2841 100644
--- a/app_base_chinese/demo/res_partner_image_demo.xml
+++ b/app_base_chinese/demo/res_partner_image_demo.xml
@@ -1,6 +1,6 @@
-
+
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/models/res_currency.py b/app_base_chinese/models/res_currency.py
index 3f55e337..e78aec28 100644
--- a/app_base_chinese/models/res_currency.py
+++ b/app_base_chinese/models/res_currency.py
@@ -26,7 +26,7 @@ class ResCurrency(models.Model):
xflag = value
value = abs(value)
# 先把value 数字进行格式化保留两位小数,转成字符串然后去除小数点
- nums = map(int, list(str('%0.2f' % value).replace('.', '')))
+ nums = list(map(int, list(str('%0.2f' % value).replace('.', ''))))
words = []
zflag = 0 # 标记连续0次数,以删除万字,或适时插入零字
start = len(nums) - 3
diff --git a/app_base_chinese/views/account_move_views.xml b/app_base_chinese/views/account_move_views.xml
index 728d8a79..fea58dd5 100644
--- a/app_base_chinese/views/account_move_views.xml
+++ b/app_base_chinese/views/account_move_views.xml
@@ -8,12 +8,38 @@
account.move
-
+
Post Entry
+
+
+ 应收发票
+
+
+ 应收退款-红字发票
+
+
+ 应收收据(无销售订单)
+
+
+ 应收支付
+
+
+
+ 应付账单
+
+
+ 应付退款
+
+
+ 应付收据(无采购订单)
+
+
+ 应付支付
+
diff --git a/app_base_chinese/views/ir_default_views.xml b/app_base_chinese/views/ir_default_views.xml
index da1be17a..d14570d7 100644
--- a/app_base_chinese/views/ir_default_views.xml
+++ b/app_base_chinese/views/ir_default_views.xml
@@ -1,6 +1,6 @@
-
+
app.res.currency.tree
diff --git a/app_base_chinese/views/menu_views.xml b/app_base_chinese/views/menu_views.xml
new file mode 100644
index 00000000..e641eace
--- /dev/null
+++ b/app_base_chinese/views/menu_views.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app_base_chinese/views/res_currency_views.xml b/app_base_chinese/views/res_currency_views.xml
index d2616545..51fe143e 100644
--- a/app_base_chinese/views/res_currency_views.xml
+++ b/app_base_chinese/views/res_currency_views.xml
@@ -1,6 +1,6 @@
-
+
app.ir.default tree view
diff --git a/app_base_chinese/views/res_partner_views.xml b/app_base_chinese/views/res_partner_views.xml
index c4aa5de5..348c0475 100644
--- a/app_base_chinese/views/res_partner_views.xml
+++ b/app_base_chinese/views/res_partner_views.xml
@@ -1,6 +1,6 @@
-
+
app.res.partner.form
@@ -54,7 +54,10 @@
-
+
+
+
+
@@ -62,6 +65,7 @@
+
@@ -113,7 +117,7 @@
-
+