opt chinese

This commit is contained in:
ivan deng
2020-05-11 00:08:35 +08:00
parent 304f8faff2
commit fbb1ad3960
6 changed files with 45 additions and 15 deletions

View File

@@ -18,7 +18,7 @@
{ {
'name': "App base chinese中国化基本模块增强", 'name': "App base chinese中国化基本模块增强",
'version': '13.20.04.13', 'version': '13.20.05.11',
'author': 'Sunpop.cn', 'author': 'Sunpop.cn',
'category': 'Base', 'category': 'Base',
'website': 'https://www.sunpop.cn', 'website': 'https://www.sunpop.cn',

View File

@@ -32,17 +32,18 @@ def post_init_hook(cr, registry):
try: try:
env = api.Environment(cr, SUPERUSER_ID, {}) env = api.Environment(cr, SUPERUSER_ID, {})
ids = env['product.category'].sudo().with_context(lang='zh_CN').search([ ids = env['product.category'].sudo().with_context(lang='zh_CN').search([
('parent_id', '=', False) ('parent_id', '!=', False)
]) ], order='complete_name')
ids._compute_complete_name() for rec in ids:
rec._compute_complete_name()
ids = env['stock.location'].sudo().with_context(lang='zh_CN').search([ ids = env['stock.location'].sudo().with_context(lang='zh_CN').search([
('location_id', '=', False) ('location_id', '!=', False),
]) ('usage', '!=', 'views'),
ids._compute_complete_name() ], order='complete_name')
for rec in ids:
rec._compute_complete_name()
# 超级用户改时区为中国 # 超级用户改时区为中国
ids = env['res.users'].sudo().with_context(lang='zh_CN').search([ ids = env['res.users'].sudo().with_context(lang='zh_CN').browse([1, 2])
('id', '=', 2)
])
ids.write({'tz': "Asia/Shanghai"}) ids.write({'tz': "Asia/Shanghai"})
except Exception as e: except Exception as e:
raise Warning(e) raise Warning(e)

View File

@@ -23,7 +23,7 @@
{ {
'name': 'Customize odoo OEM (Boost, My Odoo)', 'name': 'Customize odoo OEM (Boost, My Odoo)',
'version': '13.20.04.12', 'version': '13.20.05.10',
'author': 'Sunpop.cn', 'author': 'Sunpop.cn',
'category': 'Productivity', 'category': 'Productivity',
'website': 'https://www.sunpop.cn', 'website': 'https://www.sunpop.cn',
@@ -72,6 +72,7 @@
29. Apps version compare. Add Install version in App list. Add Local updatable filter in app list. 29. Apps version compare. Add Install version in App list. Add Local updatable filter in app list.
30. 1 key export app translate file like .po file. 30. 1 key export app translate file like .po file.
31. Show or hide odoo Referral in the top menu. 31. Show or hide odoo Referral in the top menu.
32. Fix odoo bug of complete name bug of product category and stock location..
This module can help to white label the Odoo. This module can help to white label the Odoo.
Also helpful for training and support for your odoo end-user. Also helpful for training and support for your odoo end-user.
@@ -110,6 +111,7 @@
29. App版本比较快速查看可本地更新的模块 29. App版本比较快速查看可本地更新的模块
30. 一键导出翻译文件 po 30. 一键导出翻译文件 po
31. 显示或去除 odoo 推荐 31. 显示或去除 odoo 推荐
32. 增加修复品类及区位名的操作
""", """,
'images': ['static/description/banner.gif'], 'images': ['static/description/banner.gif'],
'depends': [ 'depends': [

View File

@@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 13.0+e\n" "Project-Id-Version: Odoo Server 13.0+e\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-12 10:21+0000\n" "POT-Creation-Date: 2020-05-10 15:54+0000\n"
"PO-Revision-Date: 2020-04-12 10:21+0000\n" "PO-Revision-Date: 2020-05-10 15:54+0000\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@@ -20,7 +20,7 @@ msgstr ""
#: code:addons/app_odoo_customize/static/src/xml/res_config_edition.xml:0 #: code:addons/app_odoo_customize/static/src/xml/res_config_edition.xml:0
#, python-format #, python-format
msgid "(Sunpop.cn Professional Edition)" msgid "(Sunpop.cn Professional Edition)"
msgstr "" msgstr "(Sunpop.cn 专业版)"
#. module: app_odoo_customize #. module: app_odoo_customize
#: model_terms:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings #: model_terms:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings
@@ -280,6 +280,11 @@ msgstr "您确认要删除指定数据?"
msgid "Powered by <span>odooApp</span>" msgid "Powered by <span>odooApp</span>"
msgstr "Powered by <span>Sunpop.cn</span>" msgstr "Powered by <span>Sunpop.cn</span>"
#. module: app_odoo_customize
#: model_terms:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings
msgid "Reset Category And Location Complete Name"
msgstr "重置品类及区位显示名"
#. module: app_odoo_customize #. module: app_odoo_customize
#: model:ir.model.fields,help:app_odoo_customize.field_res_config_settings__app_system_name #: model:ir.model.fields,help:app_odoo_customize.field_res_config_settings__app_system_name
msgid "Setup System Name,which replace Odoo" msgid "Setup System Name,which replace Odoo"
@@ -463,7 +468,7 @@ msgstr "个性化odoo设置"
#: model:ir.ui.menu,name:app_odoo_customize.menu_app_group #: model:ir.ui.menu,name:app_odoo_customize.menu_app_group
#, python-format #, python-format
msgid "odooApp" msgid "odooApp"
msgstr "" msgstr "odooApp"
#. module: app_odoo_customize #. module: app_odoo_customize
#: model_terms:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings #: model_terms:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings

View File

@@ -591,3 +591,23 @@ class ResConfigSettings(models.TransientModel):
self.remove_expense() self.remove_expense()
self.remove_message() self.remove_message()
return True return True
def reset_cat_loc_name(self):
ids = self.env['product.category'].search([
('parent_id', '!=', False)
], order='complete_name')
for rec in ids:
try:
rec._compute_complete_name()
except:
pass
ids = self.env['stock.location'].search([
('location_id', '!=', False),
('usage', '!=', 'views'),
], order='complete_name')
for rec in ids:
try:
rec._compute_complete_name()
except:
pass
return True

View File

@@ -166,6 +166,8 @@
| |
<button string="Clean and reset Account Chart" type="object" name="remove_account_chart" <button string="Clean and reset Account Chart" type="object" name="remove_account_chart"
confirm="Please confirm to delete the select data?" class="oe_highlight"/> confirm="Please confirm to delete the select data?" class="oe_highlight"/>
|
<button string="Reset Category And Location Complete Name" type="object" name="reset_cat_loc_name" class="oe_highlight"/>
</div> </div>
<div class="col-12 col-lg-12 mb4"> <div class="col-12 col-lg-12 mb4">
<span class="col-3 col-lg-2 text-left">All Business</span> <span class="col-3 col-lg-2 text-left">All Business</span>