diff --git a/app_base_company_zchart/__init__.py b/app_base_company_zchart/__init__.py new file mode 100644 index 00000000..cde864ba --- /dev/null +++ b/app_base_company_zchart/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import models diff --git a/app_base_company_zchart/__manifest__.py b/app_base_company_zchart/__manifest__.py new file mode 100644 index 00000000..f9147511 --- /dev/null +++ b/app_base_company_zchart/__manifest__.py @@ -0,0 +1,96 @@ +# -*- coding: utf-8 -*- + +# Created on 2023-10-06 +# author: 欧度智能,https://www.odooai.cn +# email: 300883@qq.com +# Copyright (C) 2009~2023 odooAi.cn + +# Odoo16在线用户手册(长期更新) +# https://www.odooai.cn/documentation/16.0/zh_CN/index.html + +# Odoo16在线开发者手册(长期更新) +# https://www.odooai.cn/documentation/16.0/zh_CN/developer.html + +# 行业应用说明,应该是带 Industry 的就会放入 + +############################################################################## +# Copyright (C) 2009-TODAY odooAi.cn Ltd. https://www.odooai.cn +# Author: Ivan Deng,300883@qq.com +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# See . +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +############################################################################## + +{ + 'name': 'Group Company Multi Level Chart Hierarchy, 集团公司多层级结构图zChart', + 'version': '16.24.05.06', + 'author': 'odooai.cn', + 'category': 'Base', + 'website': 'https://www.odooai.cn', + 'live_test_url': 'https://demo.odooapp.cn', + 'license': 'LGPL-3', + 'sequence': 2, + 'price': 999.00, + 'currency': 'EUR', + 'images': ['static/description/banner.png'], + 'summary': ''' + Group Company Chart Hierarchy with zchart Widget. Hierarchy Chart, Hierarchy Tree for multi level Parent Children relation tree. + Free for Multi company Hierarchy chart category Hierarchy chart, stock Hierarchy chart. account chart. user multi level chart. + ''', + 'description': ''' +Need extra paid apps https://www.odoo.com/apps/modules/16.0/app_web_widget_ztree/ +This module extend to show a Hierarchy chart + 1. app of odooapp.cn + 2. + 3. + 4. + 5. + 6. + 11. Multi-language Support. Multi-Company Support. + 12. Support Odoo 17,16,15,14,13,12, Enterprise and Community and odoo.sh Edition. + 13. Full Open Source. + ========== 中文说明 + 1. + 2. + 3. + 4. + 11. 多语言支持,多公司支持 + 12. Odoo 17,16,15,14,13,12, 企业版,社区版,在线SaaS.sh版,等全版本支持 + 13. 代码完全开源 + ''', + 'depends': [ + 'app_common', + # 'website', + ], + 'data': [ + # please add your file + # please comment follow on ur produce odoo + # 'security/app_security.xml', + # 'security/ir.model.access.csv', + # 'views/model_new_views.xml', + # 'report/model_new_report_views.xml', + # 'views/menu_views.xml', + # 'views/website_templates.xml', + ], + 'assets': { + 'web.assets_frontend': [ + # 'app_/static/src/scss/style.scss', + ], + 'web.assets_backend': [ + # 'app_/static/src/js/*.js', + ], + }, + 'demo': [ + 'security/res_group.xml', + 'views/res_company_views.xml', + ], + # 'pre_init_hook': 'pre_init_hook', + # 'post_init_hook': 'post_init_hook', + # 'uninstall_hook': 'uninstall_hook', + 'installable': True, + 'application': True, + 'auto_install': False, +} diff --git a/app_base_company_zchart/__manifest__1.py b/app_base_company_zchart/__manifest__1.py new file mode 100644 index 00000000..a69c55c1 --- /dev/null +++ b/app_base_company_zchart/__manifest__1.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- + +# Created on 2019-01-04 +# author: 欧度智能,https://www.odooai.cn +# email: 300883@qq.com +# resource of odooai +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +# Odoo12在线用户手册(长期更新) +# https://www.odooai.cn/documentation/user/12.0/en/index.html + +# Odoo12在线开发者手册(长期更新) +# https://www.odooai.cn/documentation/12.0/index.html + +# Odoo10在线中文用户手册(长期更新) +# https://www.odooai.cn/documentation/user/10.0/zh_CN/index.html + +# Odoo10离线中文用户手册下载 +# https://www.odooai.cn/odoo10_user_manual_document_offline/ +# Odoo10离线开发手册下载-含python教程,jquery参考,Jinja2模板,PostgresSQL参考(odoo开发必备) +# https://www.odooai.cn/odoo10_developer_document_offline/ + + +{ + 'name': 'Group Company Multi Level Chart Hierarchy, 集团公司多层级结构图zChart', + 'version': '16.24.05.06', + 'author': 'odooai.cn', + 'category': 'Sales', + 'website': 'https://www.odooai.cn', + 'license': 'LGPL-3', + 'sequence': 2, + 'summary': """ + Group Company Chart Hierarchy with zchart Widget. Hierarchy Chart, Hierarchy Tree for multi level Parent Children relation tree. + Free for Multi company Hierarchy chart category Hierarchy chart, stock Hierarchy chart. account chart. user multi level chart. + """, + 'description': """ +Need extra paid apps https://www.odoo.com/apps/modules/16.0/app_web_widget_ztree/ +This module extend to show a Hierarchy chart. +(N+1, N+2, direct subordinates) + """, + 'price': 0.00, + 'currency': 'EUR', + 'depends': [ + 'base', + ], + 'images': ['static/description/banner.png'], + 'data': [ + # 'security/res_group.xml', + # 'views/res_company_views.xml', + ], + 'installable': True, + 'application': True, + 'auto_install': False, +} + diff --git a/app_base_company_zchart/controllers/__init__.py b/app_base_company_zchart/controllers/__init__.py new file mode 100644 index 00000000..7ec351fe --- /dev/null +++ b/app_base_company_zchart/controllers/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -* + diff --git a/app_base_company_zchart/i18n/zh_CN.po b/app_base_company_zchart/i18n/zh_CN.po new file mode 100644 index 00000000..b0255d71 --- /dev/null +++ b/app_base_company_zchart/i18n/zh_CN.po @@ -0,0 +1,26 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * app_base_company_zchart +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0-20231112\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-05-06 09:45+0000\n" +"PO-Revision-Date: 2024-05-06 09:45+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: app_base_company_zchart +#: model:ir.model,name:app_base_company_zchart.model_res_company +msgid "Companies" +msgstr "" + +#. module: app_base_company_zchart +#: model_terms:ir.ui.view,arch_db:app_base_company_zchart.app_view_company_form +msgid "Group Company Chart" +msgstr "集团公司架构" diff --git a/app_base_company_zchart/models/__init__.py b/app_base_company_zchart/models/__init__.py new file mode 100644 index 00000000..3c155279 --- /dev/null +++ b/app_base_company_zchart/models/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +# from . import res_company diff --git a/app_base_company_zchart/models/res_company.py b/app_base_company_zchart/models/res_company.py new file mode 100644 index 00000000..58b24eac --- /dev/null +++ b/app_base_company_zchart/models/res_company.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- + +from odoo import api, fields, models, tools, _ + + +class Company(models.Model): + _inherit = "res.company" + + # 注意,res.partner 有 parent_id 和 child_ids + diff --git a/app_base_company_zchart/security/res_group.xml b/app_base_company_zchart/security/res_group.xml new file mode 100644 index 00000000..9e24c066 --- /dev/null +++ b/app_base_company_zchart/security/res_group.xml @@ -0,0 +1,13 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app_base_company_zchart/static/description/banner.gif b/app_base_company_zchart/static/description/banner.gif new file mode 100644 index 00000000..43754cbf Binary files /dev/null and b/app_base_company_zchart/static/description/banner.gif differ diff --git a/app_base_company_zchart/static/description/banner.png b/app_base_company_zchart/static/description/banner.png new file mode 100644 index 00000000..7716c0fe Binary files /dev/null and b/app_base_company_zchart/static/description/banner.png differ diff --git a/app_base_company_zchart/static/description/banner1.png b/app_base_company_zchart/static/description/banner1.png new file mode 100644 index 00000000..91d450c8 Binary files /dev/null and b/app_base_company_zchart/static/description/banner1.png differ diff --git a/app_base_company_zchart/static/description/demo1.jpg b/app_base_company_zchart/static/description/demo1.jpg new file mode 100644 index 00000000..539bb88b Binary files /dev/null and b/app_base_company_zchart/static/description/demo1.jpg differ diff --git a/app_base_company_zchart/static/description/icon.png b/app_base_company_zchart/static/description/icon.png new file mode 100644 index 00000000..adc7a494 Binary files /dev/null and b/app_base_company_zchart/static/description/icon.png differ diff --git a/app_base_company_zchart/static/description/icon1.png b/app_base_company_zchart/static/description/icon1.png new file mode 100644 index 00000000..a5a31dfd Binary files /dev/null and b/app_base_company_zchart/static/description/icon1.png differ diff --git a/app_base_company_zchart/static/description/index.html b/app_base_company_zchart/static/description/index.html new file mode 100644 index 00000000..139723d5 --- /dev/null +++ b/app_base_company_zchart/static/description/index.html @@ -0,0 +1,430 @@ + + + + +
+

Odoo Module Template. App sample with widget.

+

Odoo开发规范模板,Widget清单与使用样例

+

Sample Description of app. video and brief and detail demo snap and text

+
+ + + +
+
+

Just Clone this sample to your name to quick create your odoo addons

+

- Sample Local Video. Change to your video -

+
+ + +
+ +
+ +
+
+

- Sample Video on youtube remote. Change to your video -

+
+
+
+
+ +
+


+
+
+ Click above Play. or go + Youtube Video of odoo Advance Search Superbar +
+
+

Demo Gif Animation if you can not get video

+ +
+
+ + + +
+

- Features -

+
+
+
+
+
+
+
+ 1 +
+

+ A full Sample module app of odoo addons. +

+

All the code, views, data ,banner, icon and description sample follow the odoo rule.

+
+
+
+ 2 +
+

+ Sample manifest file. +

+

Including structure and name and description etc, all field sample. Security xml and csv file for role group access rule. Follow most odoo rule follow

+

https://www.odooai.cn/documentation/16.0/contributing/development/coding_guidelines.html

+
+
+
+ 3 +
+

+ Sample .py models file +

+

for new model and inherit model

+
+
+
+ 4 +
+

+ Sample .xml views file for models +

+

Sample xml views file for models, with list, kanban, form, search

+
+
+
+ 5 +
+

+ Sample controllers file +

+

for website data publish and api developer. including how inherit odoo portal home

+
+
+
+
+
+
+
+ 6 +
+

+ Sample report design file +

+

.py file with how sql define. .xml file for graph and pivot

+
+
+
+ 7 +
+

+ Sample action and menu file +

+

Root menu and menu group and action menu

+
+
+
+ 8 +
+

+ Ui misc sample +

+

Alert like info and special field setup.

+
+
+
+ 9 +
+

+ Odoo Widget sample +

+

170+ widget list document and Frequently Used Sample.

+
+
+
+ 10 +
+

+ Quick access odoo developer Tutorials online. +

+

Document online for chinese and english. Fast visit in China.

+
+
+
+ 11 +
+

+ Full Open Source.Multi-language Support. Multi-Company Support +

+

Support Odoo 17,16,15,14,13,12, Enterprise and Community and odoo.sh Edition.

+

代码完全开源,多语言支持,多公司支持。Odoo 17,16,15,14,13,12, 企业版,社区版,在线SaaS.sh版,等全版本支持

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

So Easy to navigator and search any data.

+

+
+ +
+
+
+ + + +
+
+

- Feature Guide -

+
+
+
+
+
+ +
+
+

+ A full Sample module app of odoo addons. +

+

All the code, views, data ,banner, icon and description sample follow the odoo rule.

+
+ +
+
+
+

+ Sample manifest file. +

+

Including structure and name and description etc, all field sample.

+

Security xml and csv file for role group access rule. + Sample icon, banner, index.html, install/uninstall hooks. + Follow most odoo rule follow

+

https://www.odooai.cn/documentation/16.0/contributing/development/coding_guidelines.html

+
+ +
+
+
+

+ Sample .py models file, for new model and inherit model +

+

Please comment the inherit .py file of product_template.py in produce odoo.

+
+ +
+
+
+

+ Sample .xml views file for models, with list, kanban, form, search +

+

List

+
+ +
+

Kanban

+
+ +
+

Form

+
+ +
+

Search

+
+ +
+
+
+

+ Sample controllers file for website data publish and api developer +

+

including how inherit odoo portal home.

+
+ +
+
+
+

+ Sample report design file. +

+

.py file with how sql define.

+
+ +
+

.xml file for graph and pivot.

+
+ +
+
+ +
+
+
+

+ Sample action and menu file. +

+

Root menu and menu group and action menu.

+
+ +
+
+
+

+ Ui misc sample. Alert like info and special field setup. +

+
+ +
+
+
+

+ Odoo Widget sample. +

+

170+ widget list document

+
+ +
+

Frequently Used Sample.

+
+ +
+
+
+

+ Quick access odoo developer Tutorials online. +

+

Click alert info to visit. Document online for chinese and english. Fast visit in China.

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

- How to setup and use -

+

This app need no extra module. The price already included

+
+
+
+

+ 1. Buy and Install +

+

+ 2. Input the extra information +

+

+ 3. Enjoy and easy use +

+
+
+ +
+
+

4. More information in our FAQ

+
+ https://www.odooai.cn/faq +
+
+
+ + + + + + +
+
+
+

Technical Help & Support

+
+
+
+

+ For any type of technical help & support requests, Feel free to contact us

+ + odoo@china.com +

+ Via QQ: 300883 (App user would not get QQ or any other IM support. Only for odoo project customize.)

+ + 300883@qq.com +
+
+

Visit our website for more support.

+

https://www.odooai.cn

+
+
+
+
+ + \ No newline at end of file diff --git a/app_base_company_zchart/static/description/qr.png b/app_base_company_zchart/static/description/qr.png new file mode 100644 index 00000000..b7433fc9 Binary files /dev/null and b/app_base_company_zchart/static/description/qr.png differ diff --git a/app_base_company_zchart/static/img/icon_odooai.png b/app_base_company_zchart/static/img/icon_odooai.png new file mode 100644 index 00000000..a022f8d0 Binary files /dev/null and b/app_base_company_zchart/static/img/icon_odooai.png differ diff --git a/app_base_company_zchart/static/img/icon_odooapp.png b/app_base_company_zchart/static/img/icon_odooapp.png new file mode 100644 index 00000000..775a12ee Binary files /dev/null and b/app_base_company_zchart/static/img/icon_odooapp.png differ diff --git a/app_base_company_zchart/static/img/logo_odooai.png b/app_base_company_zchart/static/img/logo_odooai.png new file mode 100644 index 00000000..482f2a50 Binary files /dev/null and b/app_base_company_zchart/static/img/logo_odooai.png differ diff --git a/app_base_company_zchart/static/src/js/odooai.cn b/app_base_company_zchart/static/src/js/odooai.cn new file mode 100644 index 00000000..e69de29b diff --git a/app_base_company_zchart/static/src/scss/odooai.cn b/app_base_company_zchart/static/src/scss/odooai.cn new file mode 100644 index 00000000..e69de29b diff --git a/app_base_company_zchart/static/src/scss/style.scss b/app_base_company_zchart/static/src/scss/style.scss new file mode 100644 index 00000000..02d893e9 --- /dev/null +++ b/app_base_company_zchart/static/src/scss/style.scss @@ -0,0 +1,18 @@ +// scss sample, 样例navbar在下方的特殊处理 +.o_web_client { + //userMenu + .o_burger_menu { + width: 80%; + .o_burger_menu_topbar { + height: var(--o-navbar-height); + } + &.flex-column { + flex-direction: column-reverse!important; + } + .oi:before, .fa:before, .dropdown-toggle { + font-size: 2em; + line-height: var(--o-navbar-height); + } + } +} + diff --git a/app_base_company_zchart/static/src/xml/odooai.cn b/app_base_company_zchart/static/src/xml/odooai.cn new file mode 100644 index 00000000..e69de29b diff --git a/app_base_company_zchart/views/res_company_views.xml b/app_base_company_zchart/views/res_company_views.xml new file mode 100644 index 00000000..284804ce --- /dev/null +++ b/app_base_company_zchart/views/res_company_views.xml @@ -0,0 +1,44 @@ + + + + + app.res.company.tree + res.company + + + + + + + + + + app.res.company.form + res.company + + + +
+
+ + + +
+
+

Group Company Chart

+ +
+
+
+ + + + + + + + + +
+
+
diff --git a/app_product_brand/__manifest__.py b/app_product_brand/__manifest__.py index 0921f7d9..7b6583f9 100644 --- a/app_product_brand/__manifest__.py +++ b/app_product_brand/__manifest__.py @@ -47,7 +47,7 @@ { 'name': 'Product Brand Manager,产品品牌管理', - 'version': '16.23.12.29', + 'version': '16.24.05.06', 'author': 'odooai.cn', 'category': 'Base', 'website': 'https://www.odooai.cn', @@ -80,6 +80,8 @@ 'depends': [ 'app_purchase_pro', 'app_sale_pro', + 'app_product_variant_pro', + 'app_website_sale', ], 'data': [ 'security/ir.model.access.csv', diff --git a/app_product_brand/models/__init__.py b/app_product_brand/models/__init__.py index a476e455..0f53533a 100644 --- a/app_product_brand/models/__init__.py +++ b/app_product_brand/models/__init__.py @@ -2,3 +2,4 @@ from . import product_brand from . import product_template +from . import sale_order_line diff --git a/app_product_brand/models/product_product.py b/app_product_brand/models/product_product.py new file mode 100644 index 00000000..4f01c99e --- /dev/null +++ b/app_product_brand/models/product_product.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- + +from odoo import api, fields, models, _ + + +class ProductProduct(models.Model): + _inherit = 'product.product' + + # 当前不处理到 sku + product_brand_id = fields.Many2one( + 'product.brand', + string='Brand', + help='Select a brand for this product' + ) diff --git a/app_product_brand/report/sale_report.py b/app_product_brand/report/sale_report.py index 5416e610..3c88415d 100644 --- a/app_product_brand/report/sale_report.py +++ b/app_product_brand/report/sale_report.py @@ -9,8 +9,12 @@ class SaleReport(models.Model): product_brand_id = fields.Many2one('product.brand', string='Product Brand', readonly=True) + def _select_additional_fields(self): + res = super()._select_additional_fields() + res['product_brand_id'] = "l.product_brand_id" + return res - def _query(self, with_clause='', fields={}, groupby='', from_clause=''): - fields['product_brand_id'] = ", t.product_brand_id as product_brand_id" - groupby += ', t.product_brand_id' - return super(SaleReport, self)._query(with_clause, fields, groupby, from_clause) + def _group_by_sale(self): + res = super()._group_by_sale() + res = res + ",l.product_brand_id" + return res diff --git a/app_product_brand/reports/sale_report.py b/app_product_brand/reports/sale_report.py deleted file mode 100644 index f6edf470..00000000 --- a/app_product_brand/reports/sale_report.py +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 2018 Tecnativa - David Vidal -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) - -from odoo import fields, models - - -class SaleReport(models.Model): - _inherit = "sale.report" - - product_brand_id = fields.Many2one('product.brand', string='Brand') - - # pylint:disable=dangerous-default-value - def _query(self, with_clause='', fields={}, groupby='', from_clause=''): - fields['product_brand_id'] = ", t.product_brand_id as product_brand_id" - groupby += ', t.product_brand_id' - return super(SaleReport, self)._query( - with_clause, fields, groupby, from_clause - ) diff --git a/app_product_brand/reports/sale_report_view.xml b/app_product_brand/reports/sale_report_view.xml deleted file mode 100644 index 6be6e5c9..00000000 --- a/app_product_brand/reports/sale_report_view.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - sale.report - - - - - - - - diff --git a/app_product_brand/views/product_template_views.xml b/app_product_brand/views/product_template_views.xml index cbe523c1..e3f7593c 100644 --- a/app_product_brand/views/product_template_views.xml +++ b/app_product_brand/views/product_template_views.xml @@ -32,9 +32,9 @@ product.template - -
- +