add purchase weight report

This commit is contained in:
ivan deng
2019-03-04 21:06:31 +08:00
parent 408559c9f8
commit ce4d7a4bc2
9 changed files with 49 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from .hooks import pre_init_hook from .hooks import pre_init_hook
from .hooks import post_init_hook
from . import controllers from . import controllers
from . import models from . import models
from . import ir from . import ir

View File

@@ -18,7 +18,7 @@
{ {
'name': "App base chinese中国化基本模块增强", 'name': "App base chinese中国化基本模块增强",
'version': '12.19.03.01', 'version': '12.19.03.04',
'author': 'Sunpop.cn', 'author': 'Sunpop.cn',
'category': 'Base', 'category': 'Base',
'website': 'http://www.sunpop.cn', 'website': 'http://www.sunpop.cn',
@@ -36,10 +36,12 @@
2. 客户加简称,地址显示中文化,客户编码显示优先 2. 客户加简称,地址显示中文化,客户编码显示优先
3. 客户地址显示增加手机号与电话号码 3. 客户地址显示增加手机号与电话号码
4. 货币处理,增加排序显示 4. 货币处理,增加排序显示
5. todo:中文演示数据(只有demo模式才加载) 5. 修正不产品类别的列表及m2o字段中不显示中文目录名的Bug
11. todo:中文演示数据(只有demo模式才加载)
""", """,
'pre_init_hook': 'pre_init_hook', 'pre_init_hook': 'pre_init_hook',
'post_init_hook': 'post_init_hook',
'depends': [ 'depends': [
'base', 'base',
'product', 'product',

View File

@@ -15,13 +15,29 @@
# http://www.sunpop.cn/odoo10_developer_document_offline/ # http://www.sunpop.cn/odoo10_developer_document_offline/
# description: # description:
from odoo import api, SUPERUSER_ID from odoo import api, SUPERUSER_ID, _
def pre_init_hook(cr): def pre_init_hook(cr):
""" """
数据初始化,只在安装时执行,更新时不执行 数据初始化,只在安装时执行,更新时不执行
""" """
pass
def post_init_hook(cr, registry):
"""
数据初始化,只在安装后执行,更新时不执行
"""
try: 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 pass
except Exception as e: except Exception as e:
raise Warning(e) raise Warning(e)

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

View File

@@ -24,17 +24,42 @@
<i class="fa fa-check-square-o text-primary"></i> <i class="fa fa-check-square-o text-primary"></i>
Set partner to chinese format. Set partner to chinese format.
</li> </li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
Fix Category Display not in english bug.
</li>
</ul> </ul>
</div> </div>
</div> </div>
<div class="oe_span12"> <div class="oe_span12">
<img class="oe_demo oe_picture oe_screenshot" src="demo1.jpg"> <img class="oe_demo oe_picture oe_screenshot" src="cnreadme.jpg">
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</section> </section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Set Default country, state, timezone, currency.</h4>
<div class="oe_demo oe_screenshot">
<img src="demo1.jpg">
</div>
<div class="oe_demo oe_screenshot">
<img src="demo2.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Fix Category Display not in english bug.</h4>
<div class="oe_demo oe_screenshot">
<img src="demo3.jpg">
</div>
</div>
</section>
<section class="oe_container oe_dark"> <section class="oe_container oe_dark">
<div class="oe_row oe_spaced text-center"> <div class="oe_row oe_spaced text-center">
<div class="oe_span12"> <div class="oe_span12">

View File

@@ -3,7 +3,7 @@
{ {
'name': 'Weight in Sales Order', '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', '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, 'sequence': 10,
'license': 'LGPL-3', 'license': 'LGPL-3',