diff --git a/app_base_chinese/__init__.py b/app_base_chinese/__init__.py index b801727f..0190a7f5 100644 --- a/app_base_chinese/__init__.py +++ b/app_base_chinese/__init__.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- from .hooks import pre_init_hook +from .hooks import post_init_hook from . import controllers from . import models from . import ir diff --git a/app_base_chinese/__manifest__.py b/app_base_chinese/__manifest__.py index 530d9974..8a56925d 100644 --- a/app_base_chinese/__manifest__.py +++ b/app_base_chinese/__manifest__.py @@ -18,7 +18,7 @@ { 'name': "App base chinese,中国化基本模块增强", - 'version': '12.19.03.01', + 'version': '12.19.03.04', 'author': 'Sunpop.cn', 'category': 'Base', 'website': 'http://www.sunpop.cn', @@ -36,10 +36,12 @@ 2. 客户加简称,地址显示中文化,客户编码显示优先 3. 客户地址显示增加手机号与电话号码 4. 货币处理,增加排序显示 - 5. todo:中文演示数据(只有demo模式才加载) + 5. 修正不产品类别的列表及m2o字段中不显示中文目录名的Bug + 11. todo:中文演示数据(只有demo模式才加载) """, 'pre_init_hook': 'pre_init_hook', + 'post_init_hook': 'post_init_hook', 'depends': [ 'base', 'product', diff --git a/app_base_chinese/hooks.py b/app_base_chinese/hooks.py index 14d46a56..01f1a1d0 100644 --- a/app_base_chinese/hooks.py +++ b/app_base_chinese/hooks.py @@ -15,13 +15,29 @@ # http://www.sunpop.cn/odoo10_developer_document_offline/ # description: -from odoo import api, SUPERUSER_ID +from odoo import api, SUPERUSER_ID, _ def pre_init_hook(cr): """ 数据初始化,只在安装时执行,更新时不执行 """ + pass + +def post_init_hook(cr, registry): + """ + 数据初始化,只在安装后执行,更新时不执行 + """ try: + env = api.Environment(cr, SUPERUSER_ID, {}) + # oname = env['product.category'].with_context(lang='zh_CN').browse(1).name + # if oname: + # env['product.category'].with_context(lang='zh_CN').browse(1).write({ + # 'name': oname + 'sunpop.cn', + # }) + # env['product.category'].with_context(lang='zh_CN').browse(1).write({ + # 'name': oname, + # }) + env['product.category'].with_context(lang='zh_CN').browse(1)._compute_complete_name() pass except Exception as e: raise Warning(e) diff --git a/app_base_chinese/static/description/cnreadme.jpg b/app_base_chinese/static/description/cnreadme.jpg new file mode 100644 index 00000000..01c14dc4 Binary files /dev/null and b/app_base_chinese/static/description/cnreadme.jpg differ diff --git a/app_base_chinese/static/description/demo1.jpg b/app_base_chinese/static/description/demo1.jpg index d2fe97dc..3eb8d87b 100644 Binary files a/app_base_chinese/static/description/demo1.jpg and b/app_base_chinese/static/description/demo1.jpg differ diff --git a/app_base_chinese/static/description/demo2.jpg b/app_base_chinese/static/description/demo2.jpg new file mode 100644 index 00000000..d79f409d Binary files /dev/null and b/app_base_chinese/static/description/demo2.jpg differ diff --git a/app_base_chinese/static/description/demo3.jpg b/app_base_chinese/static/description/demo3.jpg new file mode 100644 index 00000000..d990d41c Binary files /dev/null and b/app_base_chinese/static/description/demo3.jpg differ diff --git a/app_base_chinese/static/description/index.html b/app_base_chinese/static/description/index.html index 86da00f8..1685888d 100644 --- a/app_base_chinese/static/description/index.html +++ b/app_base_chinese/static/description/index.html @@ -24,17 +24,42 @@ Set partner to chinese format. +
  • + + Fix Category Display not in english bug. +
  • - +
    +
    +
    +

    Set Default country, state, timezone, currency.

    +
    + +
    +
    + +
    +
    +
    + +
    +
    +

    Fix Category Display not in english bug.

    +
    + +
    +
    +
    +
    diff --git a/app_product_weight_sale/__manifest__.py b/app_product_weight_sale/__manifest__.py index 296501b8..919c8d70 100644 --- a/app_product_weight_sale/__manifest__.py +++ b/app_product_weight_sale/__manifest__.py @@ -3,7 +3,7 @@ { 'name': 'Weight in Sales Order', - 'version': '12.19.01.29', + 'version': '12.19.03.04', 'summary': 'Add Product sku weight in Sale Order, product weight, sale weight, sale order weight, total weight, kg kg(s) lb lb(s) support', 'sequence': 10, 'license': 'LGPL-3',