diff --git a/app_users_zchart/__init__.py b/app_users_zchart/__init__.py new file mode 100644 index 00000000..cde864ba --- /dev/null +++ b/app_users_zchart/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import models diff --git a/app_users_zchart/__manifest__.py b/app_users_zchart/__manifest__.py new file mode 100644 index 00000000..3f8b4d23 --- /dev/null +++ b/app_users_zchart/__manifest__.py @@ -0,0 +1,71 @@ +# -*- coding: utf-8 -*- + +# Created on 2019-01-04 +# author: 广州尚鹏,https://www.sunpop.cn +# email: 300883@qq.com +# resource of Sunpop +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +# Odoo12在线用户手册(长期更新) +# https://www.sunpop.cn/documentation/user/12.0/en/index.html + +# Odoo12在线开发者手册(长期更新) +# https://www.sunpop.cn/documentation/12.0/index.html + +# Odoo10在线中文用户手册(长期更新) +# https://www.sunpop.cn/documentation/user/10.0/zh_CN/index.html + +# Odoo10离线中文用户手册下载 +# https://www.sunpop.cn/odoo10_user_manual_document_offline/ +# Odoo10离线开发手册下载-含python教程,jquery参考,Jinja2模板,PostgresSQL参考(odoo开发必备) +# https://www.sunpop.cn/odoo10_developer_document_offline/ + + +{ + 'name': 'User Alliance Distribution Chart Hierarchy with zchart, 多层级用户', + 'version': '14.21.12.05', + 'author': 'Sunpop.cn', + 'category': 'Sales', + 'website': 'https://www.sunpop.cn', + 'license': 'LGPL-3', + 'sequence': 2, + 'summary': """ + Chart Hierarchy Widget. Hierarchy Chart, use zchart with ztree, Hierarchy Tree for multi level Parent Children relation tree. + Free for category Hierarchy chart, stock Hierarchy chart. account chart. user multi level chart. + """, + 'description': """ +Need extra paid apps https://www.odoo.com/apps/modules/14.0/app_web_chart_hierarchy/ +This module extend to show a Hierarchy chart. +(N+1, N+2, direct subordinates) +image: image_field, +desc: descript_field, +direct_sub: children_field, must be one2many, +child_all_count: child_all_count field, count of direct and indirect children. + """, + 'price': 0.00, + 'currency': 'EUR', + 'depends': [ + 'sales_team', + ], + 'images': ['static/description/banner.gif'], + 'data': [ + 'views/res_users_views.xml', + ], + 'demo': [ + ], + 'test': [ + ], + 'css': [ + ], + 'qweb': [ + 'static/src/xml/*.xml', + ], + 'js': [ + ], + 'post_load': None, + 'post_init_hook': None, + 'installable': True, + 'application': True, + 'auto_install': False, +} + diff --git a/app_users_zchart/controllers/__init__.py b/app_users_zchart/controllers/__init__.py new file mode 100644 index 00000000..7ec351fe --- /dev/null +++ b/app_users_zchart/controllers/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -* + diff --git a/app_users_zchart/i18n/zh_CN.po b/app_users_zchart/i18n/zh_CN.po new file mode 100644 index 00000000..9786419a --- /dev/null +++ b/app_users_zchart/i18n/zh_CN.po @@ -0,0 +1,36 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * app_users_zchart +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0+e-20210816\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-12-05 13:31+0000\n" +"PO-Revision-Date: 2021-12-05 13:31+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_users_zchart +#: model:ir.model.fields,field_description:app_users_zchart.field_res_users__parent_path +msgid "Parent Path" +msgstr "" + +#. module: app_users_zchart +#: model:ir.model.fields,field_description:app_users_zchart.field_res_users__user_parent_id +msgid "Parent User" +msgstr "上级用户" + +#. module: app_users_zchart +#: model:ir.model.fields,field_description:app_users_zchart.field_res_users__user_child_ids +msgid "Sub Users" +msgstr "下级用户" + +#. module: app_users_zchart +#: model:ir.model,name:app_users_zchart.model_res_users +msgid "Users" +msgstr "用户" diff --git a/app_users_zchart/models/__init__.py b/app_users_zchart/models/__init__.py new file mode 100644 index 00000000..12efd2f2 --- /dev/null +++ b/app_users_zchart/models/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import res_users diff --git a/app_users_zchart/models/res_users.py b/app_users_zchart/models/res_users.py new file mode 100644 index 00000000..d9c2a0b6 --- /dev/null +++ b/app_users_zchart/models/res_users.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- + +from odoo import api, fields, models, tools, _ + + +class Users(models.Model): + _inherit = "res.users" + + # 注意,res.partner 有 parent_id 和 child_ids + _parent_name = "user_parent_id" + _parent_store = True + parent_path = fields.Char(index=True) + + user_parent_id = fields.Many2one('res.users', string='Parent User', index=True) + user_child_ids = fields.One2many('res.users', 'user_parent_id', string='Sub Users', domain=[('active', '=', True)]) + diff --git a/app_users_zchart/static/description/banner.gif b/app_users_zchart/static/description/banner.gif new file mode 100644 index 00000000..f8c072eb Binary files /dev/null and b/app_users_zchart/static/description/banner.gif differ diff --git a/app_users_zchart/static/description/banner.png b/app_users_zchart/static/description/banner.png new file mode 100644 index 00000000..2c704580 Binary files /dev/null and b/app_users_zchart/static/description/banner.png differ diff --git a/app_users_zchart/static/description/demo1.jpg b/app_users_zchart/static/description/demo1.jpg new file mode 100644 index 00000000..03fb1e02 Binary files /dev/null and b/app_users_zchart/static/description/demo1.jpg differ diff --git a/app_users_zchart/static/description/demo2.jpg b/app_users_zchart/static/description/demo2.jpg new file mode 100644 index 00000000..632e5db3 Binary files /dev/null and b/app_users_zchart/static/description/demo2.jpg differ diff --git a/app_users_zchart/static/description/demo4.jpg b/app_users_zchart/static/description/demo4.jpg new file mode 100644 index 00000000..99cec169 Binary files /dev/null and b/app_users_zchart/static/description/demo4.jpg differ diff --git a/app_users_zchart/static/description/demo5.jpg b/app_users_zchart/static/description/demo5.jpg new file mode 100644 index 00000000..de5add33 Binary files /dev/null and b/app_users_zchart/static/description/demo5.jpg differ diff --git a/app_users_zchart/static/description/demo6.jpg b/app_users_zchart/static/description/demo6.jpg new file mode 100644 index 00000000..533468d7 Binary files /dev/null and b/app_users_zchart/static/description/demo6.jpg differ diff --git a/app_users_zchart/static/description/demo9.jpg b/app_users_zchart/static/description/demo9.jpg new file mode 100644 index 00000000..43468388 Binary files /dev/null and b/app_users_zchart/static/description/demo9.jpg differ diff --git a/app_users_zchart/static/description/demo_bom.jpg b/app_users_zchart/static/description/demo_bom.jpg new file mode 100644 index 00000000..22b68079 Binary files /dev/null and b/app_users_zchart/static/description/demo_bom.jpg differ diff --git a/app_users_zchart/static/description/demo_mo.jpg b/app_users_zchart/static/description/demo_mo.jpg new file mode 100644 index 00000000..129af853 Binary files /dev/null and b/app_users_zchart/static/description/demo_mo.jpg differ diff --git a/app_users_zchart/static/description/icon.png b/app_users_zchart/static/description/icon.png new file mode 100644 index 00000000..a5a31dfd Binary files /dev/null and b/app_users_zchart/static/description/icon.png differ diff --git a/app_users_zchart/static/description/index.html b/app_users_zchart/static/description/index.html new file mode 100644 index 00000000..46ca17f9 --- /dev/null +++ b/app_users_zchart/static/description/index.html @@ -0,0 +1,185 @@ +
+
+

User Alliance distribution Chart Hierarchy for Multi Level

+

Very useful for show parent child relationship, like product category, stock location, hr department

+
+
+
+
+
+
+ Key features: +
    +
  • + + Easy to make show parent children Chart Hierarchy. +
  • +
  • + + Free to Use in Manufacture Order multi level. For Multi level MO MRP Production Order from multi bom. +
  • +
  • + + Free to Use in product category. +
  • +
  • + + Free to Use in stock location. +
  • +
  • + + Free to Use in hr department, employee. +
  • +
  • + + Free to Use in Account chart. +
  • +
  • + + Free to Use in User Alliance Distribution Multi level. +
  • +
  • + + It's a widget, you can use it in anywhere in odoo. +
  • +
+
+ +

Buy + + this 1 zchart hierarchy + + in odoo Store. Get free 5 related free apps. + +

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

 

+

MRP Production Chart Hierarchy

+
+ +
+

If we have a multi Bom like follow:

+
+ +
+

Show sub manufacture order and quick access sub MO

+
+ +
+
+
+ +
+
+

 

+

Product category Chart Hierarchy

+
+ +
+

Show sub category and quick access category

+
+ +
+
+
+
+
+

 

+

Stock Location Chart Hierarchy

+
+ +
+
+
+ +
+
+

 

+

User Alliance Distribution Multi level

+
+ +
+
+
+ +
+
+

Easy to setup just use widget='ztree_chart'. like this

+
+ +
+

Also need to change view for better ui

+
+ +
+


Use follow param to setup widget:

+

image: --the field of image.

+

desc: --the field of subtitle.

+

direct_sub: --the field of sub node.

+

child_all_count: --the field of node count.

+
+
+ +
+
+
+

Technical Help & Support

+
+
+
+

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

+ + guohuadeng@hotmail.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.sunpop.cn

+
+
+
+
+ diff --git a/app_users_zchart/static/description/setup1.jpg b/app_users_zchart/static/description/setup1.jpg new file mode 100644 index 00000000..68e807d6 Binary files /dev/null and b/app_users_zchart/static/description/setup1.jpg differ diff --git a/app_users_zchart/static/description/setup2.jpg b/app_users_zchart/static/description/setup2.jpg new file mode 100644 index 00000000..058253ed Binary files /dev/null and b/app_users_zchart/static/description/setup2.jpg differ diff --git a/app_users_zchart/views/res_users_views.xml b/app_users_zchart/views/res_users_views.xml new file mode 100644 index 00000000..2996d42a --- /dev/null +++ b/app_users_zchart/views/res_users_views.xml @@ -0,0 +1,48 @@ + + + + app.res.users.simplified.form + res.users + + + + + + + +
+
+ + + +
+
+ +
+
+
+ + + + + + + + + +
+
+ + + app.res.users.base.form + res.users + + + + + + + + +