update ztree relate

This commit is contained in:
ivan deng
2021-12-06 18:57:07 +08:00
parent beb1fde6cc
commit 39e7e1dfd9
124 changed files with 2658 additions and 0 deletions

4
app_hr_ztree/__init__.py Normal file
View File

@@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
from . import models
from .hooks import post_init_hook

View File

@@ -0,0 +1,61 @@
# -*- coding: utf-8 -*-
# Created on 2018-08-15
# author: 广州尚鹏https://www.sunpop.cn
# email: 300883@qq.com
# resource of Sunpop
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# Odoo在线中文用户手册长期更新
# 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/
# description:
{
'name': "App HR department ztree, parent children tree",
'version': '14.19.09.27',
'author': 'Sunpop.cn',
'category': 'Base',
'website': 'https://www.sunpop.cn',
'license': 'LGPL-3',
'sequence': 2,
'summary': """
Use for parent children tree list select navigator. hr department employee tree.
ztree widget.
""",
'description': """
zTree widget.
Advance search with real parent children tree, ListView or KanbanView ,
eg: Product category tree ,Department tree, stock location tree.
超级方便的查询,树状视图。
""",
'price': 0.00,
'currency': 'EUR',
'depends': [
'hr',
],
'images': ['static/description/banner.gif'],
'data': [
'views/hr_views.xml',
],
'demo': [
],
'test': [
],
'css': [
],
'qweb': [
'static/src/xml/*.xml',
],
'js': [
],
'post_load': None,
'post_init_hook': 'post_init_hook',
'installable': True,
'application': True,
'auto_install': False,
}

20
app_hr_ztree/hooks.py Normal file
View File

@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Created on 2018-10-12
# author: 广州尚鹏https://www.sunpop.cn
# email: 300883@qq.com
# resource of Sunpop
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
# Odoo在线中文用户手册长期更新
# 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/
# description:
def post_init_hook(cr, pool):
pass
# cr.execute("")

View File

@@ -0,0 +1,14 @@
# Translation of Odoo Server.
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-08 14:28+0000\n"
"PO-Revision-Date: 2018-01-08 14:28+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"

View File

@@ -0,0 +1 @@
# -*- coding: utf-8 -*-

View File

@@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1,176 @@
<section class="oe_container">
<div class="oe_row oe_spaced" style="max-width: 95%;">
<h2 class="oe_slogan" style="color:#875A7B;">App ztree widget, for parent children tree list. Demo for hr department employee</h2>
<h3 class="oe_slogan">Very useful for parent child relationship, like product category, stock location, hr department</h3>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<div class="oe_span12">
<div class="alert alert-info" style="padding:8px;font-weight: 300; font-size: 20px;">
<i class="fa fa-hand-o-right"></i><b> Key features: </b>
<ul class="list-unstyled">
<li>
<i class="fa fa-check-square-o text-primary"></i>
Easy to make custom parent children tree.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
Free to Use in product category.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
Free to Use in stock location.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
Free to Use in hr department, employee.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
It's a widget, you can use it in anywhere in odoo.
</li>
</ul>
</div>
<div class="alert alert-info" style="padding:8px;font-weight: 300; font-size: 20px;">
<i class="fa fa-hand-o-right"></i><b>Extend features(Need extra module, release soon): </b>
<ul class="list-unstyled">
<li>
<i class="fa fa-check-square-o text-primary"></i>
Easy to navigate product, employee in tree or kanban view.
</li>
</ul>
</div>
<div class="alert alert-info" style="padding:8px;font-weight: 300; font-size: 20px;">
<i class="fa fa-hand-o-right"></i><b>Get relate Module </b>
<ul class="list-unstyled">
<li>
<i class="fa fa-link text-primary"></i>
<a href="http://www.odoo.com/apps/modules/14.0/app_web_widget_ztree/" target="_blank" class="text-danger">zTree widget (must need to use in following demo).</a>
</li>
<li>
<i class="fa fa-link text-primary"></i>
<a href="http://www.odoo.com/apps/modules/14.0/app_product_ztree/" target="_blank">Product and category.</a>
</li>
<li>
<i class="fa fa-link text-primary"></i>
<a href="http://www.odoo.com/apps/modules/14.0/app_stock_ztree/" target="_blank">Stock and Location.</a>
</li>
<li>
<i class="fa fa-link text-primary"></i>
<a href="http://www.odoo.com/apps/modules/14.0/app_hr_ztree/" target="_blank">hr department and employee.</a>
</li>
</ul>
</div>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Use in hr department.</h4>
<div class="oe_demo oe_screenshot">
<img src="demo4.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Use in hr employee.</h4>
<div class="oe_demo oe_screenshot">
<img src="demo5.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Use in product.</h4>
<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">Free to Use in product category.</h4>
<div class="oe_demo oe_screenshot">
<img src="demo1.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Free to Use in stock location.</h4>
<div class="oe_demo oe_screenshot">
<img src="demo3.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h1>&nbsp;</h1>
<h1 class="text-danger text-center">(!Need extra module and pay, release soon)Easy to navigator.</h1>
<h4 class="oe_slogan">Product, employee in kanban view</h4>
<div class="oe_demo oe_screenshot">
<img src="demo11.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">(!Need extra module and pay, release soon)List view</h4>
<div class="oe_demo oe_screenshot">
<img src="demo12.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Easy to setup just use widget='widget_select'. like this</h4>
<div class="oe_demo oe_screenshot">
<img src="setup1.jpg">
</div>
<h1><br/> Use follow param to setup widget:<br/></h1>
<h4>ztree_parent_key: --the key field of parent children relation.</h4>
<h4>ztree_expend_level: --how many level to expend the tree for initialize. Default is 2</h4>
<h4>limit: --how many record to show ztree. Default is 16</h4>
<h4>order: --the field to order by</h4>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced text-center">
<div class="oe_span12">
<h2 class="oe_slogan">Technical Help & Support</h2>
</div>
<div class="col-md-12 pad0">
<div class="oe_mt16">
<p><h4>
For any type of technical help & support requests, Feel free to contact us</h4></p>
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
class="btn btn-warning btn-lg" rel="nofollow" href="mailto:guohuadeng@hotmail.com"><span
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
<i class="fa fa-envelope"></i> guohuadeng@hotmail.com</a>
<p><h4>
Via QQ: 300883 (App user would not get QQ or any other IM support. Only for odoo project customize.)</h4></p>
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
class="btn btn-warning btn-lg" rel="nofollow" href="mailto:300883@qq.com"><span
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
<i class="fa fa-envelope"></i> 300883@qq.com</a>
</div>
<div class="oe_mt16">
<h4>
Visit our website for more support.</h4>
<h4>https://www.sunpop.cn</h4>
</div>
</div>
</div>
</section>

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@@ -0,0 +1,29 @@
<odoo>
<data>
<!-- hr -->
<record id="app_view_department_form" model="ir.ui.view">
<field name="name">app.hr.department.form</field>
<field name="model">hr.department</field>
<field name="inherit_id" ref="hr.view_department_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='parent_id']" position="attributes">
<!-- Add your fields or attributes here -->
<attribute name="widget">ztree_select</attribute>
<attribute name="options">{'ztree_parent_key': 'parent_id','ztree_expend_level': '1', 'ztree_name_field': 'name'}</attribute>
</xpath>
</field>
</record>
<record id="app_view_employee_form" model="ir.ui.view">
<field name="name">app.hr.employee.form</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='department_id']" position="attributes">
<!-- Add your fields or attributes here -->
<attribute name="widget">ztree_select</attribute>
<attribute name="options">{'ztree_parent_key': 'parent_id','ztree_expend_level': '1', 'ztree_name_field': 'name'}</attribute>
</xpath>
</field>
</record>
</data>
</odoo>

View File

@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import models

View File

@@ -0,0 +1,75 @@
# -*- 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': 'MRP Production zChart Hierarchy, 生产单多层级结构图',
'version': '14.20.08.20',
'author': 'Sunpop.cn',
'category': 'Base',
'website': 'https://www.sunpop.cn',
'license': 'LGPL-3',
'sequence': 2,
'summary': """
Manufacture Order multi level. For Multi level MO MRP Production Order from multi bom. MRP Hierarchy. MO hierarchy
Chart Hierarchy Widget. Hierarchy Chart, Hierarchy Tree for multi level Parent Children relation tree.
""",
'description': """
MRP Hierarchy chart, MO Hierarchy chart, mrp multi level.
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': [
'mrp',
],
# 不要误装别的,避免冲突
'excludes': [
'app_mrp_production_chart',
],
'images': ['static/description/banner.gif'],
'data': [
'views/mrp_production_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,
}

View File

@@ -0,0 +1,2 @@
# -*- coding: utf-8 -*

View File

@@ -0,0 +1,53 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * app_mrp_production_zchart
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-20 13:10+0000\n"
"PO-Revision-Date: 2020-08-20 13:10+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_mrp_production_zchart
#: model:ir.model.fields,field_description:app_mrp_production_zchart.field_mrp_production__image_128
msgid "Image 128"
msgstr "图片"
#. module: app_mrp_production_zchart
#: model:ir.model.fields,field_description:app_mrp_production_zchart.field_mrp_production__child_all_count
msgid "Indirect Surbordinates Count"
msgstr "子生产单数量"
#. module: app_mrp_production_zchart
#: model:ir.model.fields,field_description:app_mrp_production_zchart.field_mrp_production__parent_id
msgid "Parent Manufacturing"
msgstr ""
#. module: app_mrp_production_zchart
#: model:ir.model.fields,field_description:app_mrp_production_zchart.field_mrp_production__parent_path
msgid "Parent Path"
msgstr "上级生产订单"
#. module: app_mrp_production_zchart
#: model:ir.model,name:app_mrp_production_zchart.model_mrp_production
msgid "Production Order"
msgstr "生产订单"
#. module: app_mrp_production_zchart
#: model:ir.model.fields,field_description:app_mrp_production_zchart.field_mrp_production__child_ids
msgid "Sub Manufacturing"
msgstr "子生产订单"
#. module: app_mrp_production_zchart
#: model:ir.model.fields,help:app_mrp_production_zchart.field_mrp_production__parent_id
msgid ""
"The parent manufacturing orders that generate this order. Follow the rule of"
" multi level bom."
msgstr "本生产订单的来源生产订单根据多级Bom生成"

View File

@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import mrp_production

View File

@@ -0,0 +1,41 @@
# -*- coding: utf-8 -*-
from odoo import api, fields, models, tools, _
import logging
_logger = logging.getLogger(__name__)
class MrpProduction(models.Model):
_inherit = 'mrp.production'
# 注意res.partner 有 parent_id 和 child_ids
_parent_name = "parent_id"
_parent_store = True
# 上级生产单
parent_id = fields.Many2one('mrp.production', 'Parent Manufacturing', index=True, ondelete='cascade',
help="The parent manufacturing orders that generate this order. Follow the rule of multi level bom.")
child_ids = fields.One2many('mrp.production', 'parent_id', string='Sub Manufacturing')
child_all_count = fields.Integer('Indirect Surbordinates Count', store=False,
compute='_compute_child_all_count')
image_128 = fields.Image(related='product_id.image_128', readonly=True)
product_name = fields.Char(related='product_id.name', readonly=True)
parent_path = fields.Char(index=True)
@api.depends('child_ids.child_all_count')
def _compute_child_all_count(self):
for rec in self:
rec.child_all_count = len(rec.child_ids) + sum(child.child_all_count for child in rec.child_ids)
@api.model
def create(self, values):
# 配置层级关系
if 'origin' in values and values['origin']:
mo = self.env['mrp.production'].search([('name', '=', values['origin'])], limit=1, order='id desc')
if len(mo) == 1:
values['parent_id'] = mo[0].id
res = super(MrpProduction, self).create(values)
return res

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

@@ -0,0 +1,213 @@
<section class="oe_container">
<div class="oe_row oe_spaced" style="max-width: 95%;">
<h2 class="oe_slogan" style="color:#875A7B;">MRP Production Chart Hierarchy, For Multi level MO MRP Production Order from multi bom.</h2>
<h3 class="oe_slogan">Very useful for show parent child relationship, like product category, stock location, hr department</h3>
</div>
<div class="oe_demo">
<img class="oe_demo oe_screenshot" src="banner.gif">
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<div class="oe_span12">
<div class="alert alert-info" style="padding:8px;font-weight: 300; font-size: 20px;">
<i class="fa fa-hand-o-right"></i><b> Key features: </b>
<ul class="list-unstyled">
<li>
<i class="fa fa-check-square-o text-primary"></i>
Easy to make show parent children Chart Hierarchy.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
Free to Use in Manufacture Order multi level. For Multi level MO MRP Production Order from multi bom.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
Free to Use in product category.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
Free to Use in stock location.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
Free to Use in hr department, employee.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
Free to Use in Account chart.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
Free to Use in User Alliance Distribution Multi level.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
It's a widget, you can use it in anywhere in odoo.
</li>
</ul>
</div>
<h1 class="text-danger text-center">Buy
<a href="https://www.odoo.com/apps/modules/14.0/app_web_chart_hierarchy/">
this 1 chart hierarchy
</a>
in odoo Store. Get free 5 related free apps.
</a>
</h1>
<div class="alert alert-info" style="padding:8px;font-weight: 300; font-size: 20px;">
<i class="fa fa-hand-o-right"></i><b>Get relate Demo </b>
<ul class="list-unstyled">
<li>
<i class="fa fa-link text-primary"></i>
<a href="http://www.odoo.com/apps/modules/14.0/app_mrp_production_zchart/" target="_blank">MRP Production Chart Hierarchy</a>
</li>
<li>
<i class="fa fa-link text-primary"></i>
<a href="http://www.odoo.com/apps/modules/14.0/app_product_category_chart/" target="_blank">Product category chart hierarchy</a>
</li>
<li>
<i class="fa fa-link text-primary"></i>
<a href="http://www.odoo.com/apps/modules/14.0/app_stock_location_chart/" target="_blank">Stock Location chart hierarchy</a>
</li>
<li>
<i class="fa fa-link text-primary"></i>
<a href="http://www.odoo.com/apps/modules/14.0/app_hr_department_chart/" target="_blank">hr department employee chart hierarchy</a>
</li>
<li>
<i class="fa fa-link text-primary"></i>
<a href="http://www.odoo.com/apps/modules/14.0/app_account_account_chart/" target="_blank">Account chart hierarchy(chinese only)</a>
</li>
<li>
<i class="fa fa-link text-primary"></i>
<a href="http://www.odoo.com/apps/modules/14.0/app_users_chart_hierarchy/" target="_blank">User Alliance Distribution Multi level</a>
</li>
</ul>
</div>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h1>&nbsp;</h1>
<h1 class="text-danger text-center">MRP Production Chart Hierarchy</h1>
<div class="oe_demo oe_screenshot">
<img src="demo1.jpg">
</div>
<h4 class="oe_slogan">If we have a multi Bom like follow:</h4>
<div class="oe_demo oe_screenshot">
<img src="demo_bom.jpg">
</div>
<h4 class="oe_slogan">Show sub manufacture order and quick access sub MO</h4>
<div class="oe_demo oe_screenshot">
<img src="demo_mo.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h1>&nbsp;</h1>
<h1 class="text-danger text-center">Product category Chart Hierarchy</h1>
<div class="oe_demo oe_screenshot">
<img src="demo1.jpg">
</div>
<h4 class="oe_slogan">Show sub category and quick access category</h4>
<div class="oe_demo oe_screenshot">
<img src="demo2.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h1>&nbsp;</h1>
<h1 class="text-danger text-center">Stock Location Chart Hierarchy</h1>
<div class="oe_demo oe_screenshot">
<img src="demo4.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h1>&nbsp;</h1>
<h1 class="text-danger text-center">HR Department Chart Hierarchy</h1>
<div class="oe_demo oe_screenshot">
<img src="demo5.jpg">
</div>
<h1 class="text-danger text-center">HR Emploee Chart Hierarchy (this is include in odoo)</h1>
<div class="oe_demo oe_screenshot">
<img src="demo6.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h1>&nbsp;</h1>
<h1 class="text-danger text-center">Account Chart Hierarchy</h1>
<div class="oe_demo oe_screenshot">
<img src="demo7.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h1>&nbsp;</h1>
<h1 class="text-danger text-center">User Alliance Distribution Multi level</h1>
<div class="oe_demo oe_screenshot">
<img src="demo9.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Easy to setup just use widget='web_chart_hierarchy'. like this</h4>
<div class="oe_demo oe_screenshot">
<img src="setup1.jpg">
</div>
<h4 class="oe_slogan">Also need to change view for better ui</h4>
<div class="oe_demo oe_screenshot">
<img src="setup2.jpg">
</div>
<h1><br/> Use follow param to setup widget:<br/></h1>
<h4>image: --the field of image.</h4>
<h4>desc: --the field of subtitle.</h4>
<h4>direct_sub: --the field of sub node.</h4>
<h4>child_all_count: --the field of node count.</h4>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced text-center">
<div class="oe_span12">
<h2 class="oe_slogan">Technical Help & Support</h2>
</div>
<div class="col-md-12 pad0">
<div class="oe_mt16">
<p><h4>
For any type of technical help & support requests, Feel free to contact us</h4></p>
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
class="btn btn-warning btn-lg" rel="nofollow" href="mailto:guohuadeng@hotmail.com"><span
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
<i class="fa fa-envelope"></i> guohuadeng@hotmail.com</a>
<p><h4>
Via QQ: 300883 (App user would not get QQ or any other IM support. Only for odoo project customize.)</h4></p>
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
class="btn btn-warning btn-lg" rel="nofollow" href="mailto:300883@qq.com"><span
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
<i class="fa fa-envelope"></i> 300883@qq.com</a>
</div>
<div class="oe_mt16">
<h4>
Visit our website for more support.</h4>
<h4>https://www.sunpop.cn</h4>
</div>
</div>
</div>
</section>

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record model="ir.ui.view" id="app_mrp_production_form_view">
<field name="name">app.mrp.production.form</field>
<field name="model">mrp.production</field>
<field name="inherit_id" ref="mrp.mrp_production_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='origin']" position="after">
<field name="parent_id" groups="base.group_no_one" readonly="0"/>
</xpath>
<xpath expr="//div[hasclass('oe_title')]" position="before">
<field name="image_128" widget="image" class="oe_avatar"
options="{'preview_image': 'image_128', 'size': [90, 90]}"/>
</xpath>
<xpath expr="//group[1]" position="inside">
<group>
<field name="child_ids" widget="ztree_chart" nolabel="1"/>
</group>
</xpath>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,6 @@
# -*- coding: utf-8 -*-
from . import models
from .hooks import pre_init_hook
from .hooks import post_init_hook
from .hooks import uninstall_hook

View File

@@ -0,0 +1,88 @@
# -*- coding: utf-8 -*-
# Created on 2019-05-26
# 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/zh_CN/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/
##############################################################################
# Copyright (C) 2009-TODAY Sunpop.cn Ltd. https://www.sunpop.cn
# Author: Ivan Deng300883@qq.com
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
# See <http://www.gnu.org/licenses/>.
#
# It is forbidden to publish, distribute, sublicense, or sell copies
# of the Software or modified copies of the Software.
##############################################################################
{
'name': "MRP Workcenter zChart Parent Child Hierarchy,工作中心分级",
'version': '14.20.08.20',
'author': 'Sunpop.cn',
'category': 'Base',
'website': 'https://www.sunpop.cn',
'license': 'LGPL-3',
'sequence': 2,
'price': 0.00,
'currency': 'EUR',
'images': ['static/description/banner.png'],
'depends': [
'mrp_workorder',
'app_mrp_superbar',
],
# 不要误装别的,避免冲突
'excludes': [
'app_mrp_production_chart',
],
'summary': """
Odoo App of Sunpop.cn
""",
'description': """
Support Odoo 14,13,12,11, Enterprise and Community Edition
1. D
2.
11. Multi-language Support.
12. Multi-Company Support.
==========
1.
2.
11. 多语言支持
12. 多公司支持
""",
'data': [
# 'security/*.xml',
# 'security/ir.model.access.csv.csv',
# 'data/*.xml',
'views/mrp_workcenter_views.xml',
'views/mrp_workorder_views.xml',
],
'qweb': [
'static/src/xml/*.xml',
],
'demo': [],
'test': [],
'css': [],
'js': [],
# 'pre_init_hook': 'pre_init_hook',
# 'post_init_hook': 'post_init_hook',
# 'uninstall_hook': 'uninstall_hook',
'installable': True,
'application': True,
'auto_install': False,
}

View File

@@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
# Created on 2018-10-12
# author: 广州尚鹏https://www.sunpop.cn
# email: 300883@qq.com
# resource of Sunpop
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
# Odoo在线中文用户手册长期更新
# 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/
# description:
from odoo import api, SUPERUSER_ID, _
def pre_init_hook(cr):
pass
# cr.execute("")
def post_init_hook(cr, registry):
pass
# cr.execute("")
def uninstall_hook(cr, registry):
pass
# cr.execute("")

View File

@@ -0,0 +1,52 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * app_mrp_workcenter_zchart
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-20 13:30+0000\n"
"PO-Revision-Date: 2020-08-20 13:30+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_mrp_workcenter_zchart
#: model:ir.model.fields,field_description:app_mrp_workcenter_zchart.field_mrp_workcenter__child_ids
msgid "Child WCs"
msgstr "下级工作中心"
#. module: app_mrp_workcenter_zchart
#: model:ir.model.fields,field_description:app_mrp_workcenter_zchart.field_mrp_workcenter__child_all_count
msgid "Indirect Surbordinates Count"
msgstr "非直属下级数量"
#. module: app_mrp_workcenter_zchart
#: model:ir.model.fields,field_description:app_mrp_workcenter_zchart.field_mrp_workcenter__parent_path
msgid "Parent Path"
msgstr "父级路径"
#. module: app_mrp_workcenter_zchart
#: model:ir.model.fields,field_description:app_mrp_workcenter_zchart.field_mrp_workcenter__parent_id
#: model_terms:ir.ui.view,arch_db:app_mrp_workcenter_zchart.app_view_mrp_workcenter_search
msgid "Parent WC"
msgstr "上级工作中心"
#. module: app_mrp_workcenter_zchart
#: model:ir.model,name:app_mrp_workcenter_zchart.model_mrp_workcenter
msgid "Work Center"
msgstr "工作中心"
#. module: app_mrp_workcenter_zchart
#: model_terms:ir.ui.view,arch_db:app_mrp_workcenter_zchart.app_view_mrp_workcenter_search
msgid "code"
msgstr "编码"
#. module: app_mrp_workcenter_zchart
#: model:ir.model.fields,field_description:app_mrp_workcenter_zchart.field_mrp_workcenter__level
msgid "Level"
msgstr "级别"

View File

@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import mrp_workcenter

View File

@@ -0,0 +1,48 @@
# -*- coding: utf-8 -*-
from odoo import api, fields, models, tools, _
import logging
_logger = logging.getLogger(__name__)
class MrpWorkCenter(models.Model):
_inherit = 'mrp.workcenter'
# 建立层级关系
_parent_name = "parent_id"
_parent_store = True
_parent_order = 'code'
parent_id = fields.Many2one('mrp.workcenter', 'Parent WC', index=True, ondelete='cascade')
parent_path = fields.Char(index=True)
child_ids = fields.One2many('mrp.workcenter', 'parent_id', 'Child WCs')
child_all_count = fields.Integer(
'Indirect Surbordinates Count',
compute='_compute_child_all_count', store=False)
level = fields.Integer('Level', compute='_compute_level', inverse='_set_level', default=0, store=True)
@api.depends('child_ids.child_all_count')
def _compute_child_all_count(self):
for rec in self:
rec.child_all_count = len(rec.child_ids) + sum(child.child_all_count for child in rec.child_ids)
@api.onchange('parent_id')
def _onchange_level(self):
level = 0
if self.parent_id:
level = self.parent_id.level + 1
self.level = level
@api.depends('parent_id', 'parent_id.level')
def _compute_level(self):
for rec in self:
level = 0
if rec.parent_id:
level = rec.parent_id.level + 1
rec.level = level
def _set_level(self):
pass

View File

@@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-

View File

@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- model权限 -->
<record id="acc_module" model="ir.model.access">
<field name="name">acc_module_user</field>
<field name="model_id" ref="model_app_order"/>
<field name="group_id" ref="base.group_user"/>
<field name="perm_read" eval="1"/>
<field name="perm_write" eval="1"/>
<field name="perm_create" eval="1"/>
<field name="perm_unlink" eval="1"/>
</record>
<!-- 应用权限目录 -->
<record model="ir.module.category" id="app_module_category_1">
<field name="name">App...</field>
<field name="description">Helps you manage your ...</field>
<field name="sequence">8</field>
</record>
<!-- 权限用户 -->
<!-- 普通 -->
<record id="group_app_user" model="res.groups">
<field name="name">App User</field>
<field name="category_id" ref="app_module_category_1"/>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
<field name="comment">The user will be able to ...</field>
</record>
<!-- 管理员,可以配置 -->
<record id="group_app_admin" model="res.groups">
<field name="name">App Admin</field>
<field name="category_id" ref="app_module_category_1"/>
<field name="implied_ids" eval="[(4, ref('group_app_user'))]"/>
<field name="comment">The user will be able to config ...</field>
</record>
<!-- group_erp_manager自动有完整权限 -->
<record id="base.group_erp_manager" model="res.groups">
<field name="implied_ids" eval="[(4, ref('group_app_admin'))]"/>
</record>
<!-- Rules -->
<record id="rule_user" model="ir.rule">
<field name="name">Users are allowed to access their own m///</field>
<field name="model_id" ref="model_app_order"/>
<field name="domain_force">['|', ('partner_id', 'in', [user.partner_id.id]), ('user_id.id', '=', user.id)]</field>
<field name="groups" eval="[(4, ref('base.group_user'))]"/>
</record>
<!--End -->
</data>
</odoo>

View File

@@ -0,0 +1 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

View File

@@ -0,0 +1,70 @@
<section class="oe_container">
<div class="oe_row oe_spaced" >
<div class="oe_span12">
<h2 class="oe_slogan"> </h2>
<h3 class="oe_slogan"> </h3>
<div class="oe_row">
<h3>Lastest update: v12.19.04.28</h3>
<div class="oe_span12">
<img class="oe_demo oe_screenshot" style="max-height: 100%;" src="banner.png">
</div>
<div class="oe_span12 oe_spaced">
<div class="alert alert-info" style="padding:8px;font-weight: 300; font-size: 20px;">
<i class="fa fa-hand-o-right"></i><b> Key features: </b>
<ul class="list-unstyled">
<li>
<i class="fa fa-check-square-o text-primary"></i>
Put key function here.
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h1 class="text-danger text-center">So Easy to navigator and search any data.</h1>
<h4 class="oe_slogan"> </h4>
<div class="oe_demo oe_screenshot">
<img src=".jpg"/>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced text-center">
<div class="oe_span12">
<h2 class="oe_slogan">Technical Help & Support</h2>
</div>
<div class="col-md-12 pad0">
<div class="oe_mt16">
<p><h4>
For any type of technical help & support requests, Feel free to contact us</h4></p>
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
class="btn btn-warning btn-lg" rel="nofollow" href="mailto:guohuadeng@hotmail.com"><span
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
<i class="fa fa-envelope"></i> guohuadeng@hotmail.com</a>
<p><h4>
Via QQ: 300883 (App user would not get QQ or any other IM support. Only for odoo project customize.)</h4></p>
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
class="btn btn-warning btn-lg" rel="nofollow" href="mailto:300883@qq.com"><span
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
<i class="fa fa-envelope"></i> 300883@qq.com</a>
</div>
<div class="oe_mt16">
<h4>
Visit our website for more support.</h4>
<h4>https://www.sunpop.cn</h4>
</div>
</div>
</div>
<div class="oe_row oe_spaced text-center">
<h1>More Powerful addons, Make your odoo very easy to use, easy customize:
<a class="btn btn-primary mb16" href="http://www.odoo.com/apps/modules/browse?author=Sunpop.cn">Supop.cn Odoo Addons</a>
</h1>
</div>
</section>

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="app_mrp_workcenter_view" model="ir.ui.view">
<field name="name">mrp.workcenter.form</field>
<field name="model">mrp.workcenter</field>
<field name="inherit_id" ref="mrp.mrp_workcenter_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='name']" position="after">
<field name="parent_id" widget="ztree_select"/>
<field name="level"/>
</xpath>
<!-- 引入树结构图 -->
<xpath expr="//group[1]" position="inside">
<group>
<field name="child_ids" widget="ztree_chart" nolabel="1"/>
</group>
</xpath>
</field>
</record>
<record id="app_mrp_workcenter_tree_view" model="ir.ui.view">
<field name="name">mrp.workcenter.tree</field>
<field name="model">mrp.workcenter</field>
<field name="inherit_id" ref="mrp.mrp_workcenter_tree_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='name']" position="after">
<field name="parent_id"/>
<field name="level"/>
<field name="note"/>
</xpath>
</field>
</record>
<!--常规kanban-->
<record id="app_mrp_workcenter_view_kanban" model="ir.ui.view">
<field name="name">app.mrp.workcenter.kanban1</field>
<field name="model">mrp.workcenter</field>
<field name="inherit_id" ref="mrp.mrp_workcenter_view_kanban"/>
<field name="arch" type="xml">
<xpath expr="//kanban" position="attributes">
<attribute name="default_group_by">parent_id</attribute>
</xpath>
</field>
</record>
<!-- 工单kanban-->
<record id="app_mrp_workcenter_kanban" model="ir.ui.view">
<field name="name">app.mrp.workcenter.kanban2</field>
<field name="model">mrp.workcenter</field>
<field name="inherit_id" ref="mrp.mrp_workcenter_kanban"/>
<field name="arch" type="xml">
<xpath expr="//kanban/field[1]" position="after">
<field name="code"/>
<field name="note"/>
</xpath>
<xpath expr="//templates//field[@name='name']" position="before">
<span t-if="record.code.raw_value">[<field name="code"/>]</span>
</xpath>
</field>
</record>
<!-- 增加字段superbar -->
<record id="app_view_mrp_workcenter_search" model="ir.ui.view">
<field name="name">mrp.workcenter.search</field>
<field name="model">mrp.workcenter</field>
<field name="inherit_id" ref="mrp.view_mrp_workcenter_search"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='name']" position="after">
<field name="code" string="code"/>
</xpath>
<xpath expr="//group" position="inside">
<filter string="Parent WC" name="group_by_parent_id" context="{'group_by':'parent_id'}"/>
</xpath>
<xpath expr="//search" position="inside">
<searchpanel view_types="kanban,tree">
<field name="parent_id" filter_domain="[('child_ids', '!=', False)]"/>
</searchpanel>
</xpath>
</field>
</record>
<record id="mrp.mrp_workcenter_kanban_action" model="ir.actions.act_window">
<field name="context">{'search_default_group_by_parent_id':1}</field>
</record>
</odoo>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!--搜索加 superbar-->
<record model="ir.ui.view" id="app_view_mrp_production_workorder_form_view_filter">
<field name="name">app.mrp.production.work.order.select</field>
<field name="model">mrp.workorder</field>
<field name="inherit_id" ref="app_mrp_superbar.app_view_mrp_production_workorder_form_view_filter"/>
<field name="arch" type="xml">
<xpath expr="//searchpanel//field[@name='workcenter_id']" position="replace">
<field name="workcenter_id"/>
</xpath>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import models

View File

@@ -0,0 +1,70 @@
# -*- 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': 'Category zChart Hierarchy, 产品目录多层级结构图',
'version': '14.20.08.17',
'author': 'Sunpop.cn',
'category': 'Base',
'website': 'https://www.sunpop.cn',
'license': 'LGPL-3',
'sequence': 2,
'summary': """
Chart Hierarchy Widget. Hierarchy Chart, Hierarchy Tree for multi level Parent Children relation tree.
Free for category Hierarchy chart, stock Hierarchy chart. account 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': [
'product',
],
'images': ['static/description/banner.gif'],
'data': [
'views/product_category_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,
}

View File

@@ -0,0 +1,2 @@
# -*- coding: utf-8 -*

View File

@@ -0,0 +1,67 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * app_product_category_chart
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0+e-20190301\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-04-09 00:38+0000\n"
"PO-Revision-Date: 2019-04-09 00:38+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_product_category_chart
#: model_terms:ir.ui.view,arch_db:app_product_category_chart.app_product_category_form_view
msgid "Hierarchy Chart"
msgstr "目录结构图"
#. module: app_product_category_chart
#: model:ir.model.fields,field_description:app_product_category_chart.field_product_category__image
msgid "Image"
msgstr "图像"
#. module: app_product_category_chart
#: model:ir.model.fields,field_description:app_product_category_chart.field_product_category__child_all_count
msgid "Indirect Surbordinates Count"
msgstr "非直接下属数量"
#. module: app_product_category_chart
#: model:ir.model.fields,field_description:app_product_category_chart.field_product_category__image_medium
msgid "Medium-sized image"
msgstr "中等尺寸图像"
#. module: app_product_category_chart
#: model:ir.model.fields,help:app_product_category_chart.field_product_category__image_medium
msgid "Medium-sized image of this Category. It is automatically resized as a 128x128px image, with aspect ratio preserved. Use this field in form views or some kanban views."
msgstr ""
#. module: app_product_category_chart
#: model_terms:ir.ui.view,arch_db:app_product_category_chart.app_product_category_form_view
msgid "Please get widget from https://apps.odoo.com/apps/modules/13.0/app_web_chart_hierarchy/"
msgstr ""
#. module: app_product_category_chart
#: model:ir.model,name:app_product_category_chart.model_product_category
msgid "Product Category"
msgstr "产品种类"
#. module: app_product_category_chart
#: model:ir.model.fields,field_description:app_product_category_chart.field_product_category__image_small
msgid "Small-sized image"
msgstr "小尺寸图像"
#. module: app_product_category_chart
#: model:ir.model.fields,help:app_product_category_chart.field_product_category__image_small
msgid "Small-sized image of this Category. It is automatically resized as a 64x64px image, with aspect ratio preserved. Use this field anywhere a small image is required."
msgstr ""
#. module: app_product_category_chart
#: model:ir.model.fields,help:app_product_category_chart.field_product_category__image
msgid "This field holds the image used as avatar for this category, limited to 1024x1024px"
msgstr "目录图像最大为 1024x1024px"

View File

@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import product_category

View File

@@ -0,0 +1,7 @@
# -*- coding: utf-8 -*-
from odoo import api, fields, models, tools, _
class ProductCategory(models.Model):
_inherit = "product.category"

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

@@ -0,0 +1,212 @@
<section class="oe_container">
<div class="oe_row oe_spaced" style="max-width: 95%;">
<h2 class="oe_slogan" style="color:#875A7B;">Product Category Chart Hierarchy</h2>
<h3 class="oe_slogan">Very useful for show parent child relationship, like product category, stock location, hr department</h3>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<div class="oe_span12">
<div class="alert alert-info" style="padding:8px;font-weight: 300; font-size: 20px;">
<i class="fa fa-hand-o-right"></i><b> Key features: </b>
<ul class="list-unstyled">
<li>
<i class="fa fa-check-square-o text-primary"></i>
Easy to make show parent children Chart Hierarchy.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
Free to Use in Manufacture Order multi level. For Multi level MO MRP Production Order from multi bom.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
Free to Use in product category.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
Free to Use in stock location.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
Free to Use in hr department, employee.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
Free to Use in Account chart.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
Free to Use in User Alliance Distribution Multi level.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
It's a widget, you can use it in anywhere in odoo.
</li>
</ul>
</div>
<h1 class="text-danger text-center">Buy
<a href="https://www.odoo.com/apps/modules/14.0/app_web_chart_hierarchy/">
this 1 chart hierarchy
</a>
in odoo Store. Get free 5 related free apps.
</a>
</h1>
<div class="oe_demo">
<img class="oe_demo oe_screenshot" src="banner.gif">
</div>
<div class="alert alert-info" style="padding:8px;font-weight: 300; font-size: 20px;">
<i class="fa fa-hand-o-right"></i><b>Get relate Demo </b>
<ul class="list-unstyled">
<li>
<i class="fa fa-link text-primary"></i>
<a href="http://www.odoo.com/apps/modules/14.0/app_mrp_production_chart/" target="_blank">MRP Production Chart Hierarchy</a>
</li>
<li>
<i class="fa fa-link text-primary"></i>
<a href="http://www.odoo.com/apps/modules/14.0/app_product_category_chart/" target="_blank">Product category chart hierarchy</a>
</li>
<li>
<i class="fa fa-link text-primary"></i>
<a href="http://www.odoo.com/apps/modules/14.0/app_stock_location_chart/" target="_blank">Stock Location chart hierarchy</a>
</li>
<li>
<i class="fa fa-link text-primary"></i>
<a href="http://www.odoo.com/apps/modules/14.0/app_hr_department_chart/" target="_blank">hr department employee chart hierarchy</a>
</li>
<li>
<i class="fa fa-link text-primary"></i>
<a href="http://www.odoo.com/apps/modules/14.0/app_account_account_chart/" target="_blank">Account chart hierarchy(chinese only)</a>
</li>
<li>
<i class="fa fa-link text-primary"></i>
<a href="http://www.odoo.com/apps/modules/14.0/app_users_chart_hierarchy/" target="_blank">User Alliance Distribution Multi level</a>
</li>
</ul>
</div>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h1>&nbsp;</h1>
<h1 class="text-danger text-center">MRP Production Chart Hierarchy</h1>
<div class="oe_demo oe_screenshot">
<img src="demo1.jpg">
</div>
<h4 class="oe_slogan">If we have a multi Bom like follow:</h4>
<div class="oe_demo oe_screenshot">
<img src="demo_bom.jpg">
</div>
<h4 class="oe_slogan">Show sub manufacture order and quick access sub MO</h4>
<div class="oe_demo oe_screenshot">
<img src="demo_mo.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h1>&nbsp;</h1>
<h1 class="text-danger text-center">Product category Chart Hierarchy</h1>
<div class="oe_demo oe_screenshot">
<img src="demo1.jpg">
</div>
<h4 class="oe_slogan">Show sub category and quick access category</h4>
<div class="oe_demo oe_screenshot">
<img src="demo2.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h1>&nbsp;</h1>
<h1 class="text-danger text-center">Stock Location Chart Hierarchy</h1>
<div class="oe_demo oe_screenshot">
<img src="demo4.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h1>&nbsp;</h1>
<h1 class="text-danger text-center">HR Department Chart Hierarchy</h1>
<div class="oe_demo oe_screenshot">
<img src="demo5.jpg">
</div>
<h1 class="text-danger text-center">HR Emploee Chart Hierarchy (this is include in odoo)</h1>
<div class="oe_demo oe_screenshot">
<img src="demo6.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h1>&nbsp;</h1>
<h1 class="text-danger text-center">Account Chart Hierarchy</h1>
<div class="oe_demo oe_screenshot">
<img src="demo7.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h1>&nbsp;</h1>
<h1 class="text-danger text-center">User Alliance Distribution Multi level</h1>
<div class="oe_demo oe_screenshot">
<img src="demo9.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Easy to setup just use widget='web_chart_hierarchy'. like this</h4>
<div class="oe_demo oe_screenshot">
<img src="setup1.jpg">
</div>
<h4 class="oe_slogan">Also need to change view for better ui</h4>
<div class="oe_demo oe_screenshot">
<img src="setup2.jpg">
</div>
<h1><br/> Use follow param to setup widget:<br/></h1>
<h4>image: --the field of image.</h4>
<h4>desc: --the field of subtitle.</h4>
<h4>direct_sub: --the field of sub node.</h4>
<h4>child_all_count: --the field of node count.</h4>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced text-center">
<div class="oe_span12">
<h2 class="oe_slogan">Technical Help & Support</h2>
</div>
<div class="col-md-12 pad0">
<div class="oe_mt16">
<p><h4>
For any type of technical help & support requests, Feel free to contact us</h4></p>
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
class="btn btn-warning btn-lg" rel="nofollow" href="mailto:guohuadeng@hotmail.com"><span
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
<i class="fa fa-envelope"></i> guohuadeng@hotmail.com</a>
<p><h4>
Via QQ: 300883 (App user would not get QQ or any other IM support. Only for odoo project customize.)</h4></p>
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
class="btn btn-warning btn-lg" rel="nofollow" href="mailto:300883@qq.com"><span
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
<i class="fa fa-envelope"></i> 300883@qq.com</a>
</div>
<div class="oe_mt16">
<h4>
Visit our website for more support.</h4>
<h4>https://www.sunpop.cn</h4>
</div>
</div>
</div>
</section>

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="app_product_category_form_view" model="ir.ui.view">
<field name="name">app.product.category.form</field>
<field name="model">product.category</field>
<field name="inherit_id" ref="product.product_category_form_view"/>
<field name="arch" type="xml">
<xpath expr="//div[@class='oe_button_box']" position="after">
<div id="o_node_container">
<div id="o_node_main">
<span id="add_title"/>
<span id="add_group"/>
</div>
<div id="o_node_right">
<field name="child_id" widget="ztree_chart" nolabel="1"/>
</div>
</div>
</xpath>
<xpath expr="//span[@id='add_title']" position="after">
<xpath expr="//div[@class='oe_title']" position="move"/>
</xpath>
<xpath expr="//span[@id='add_group']" position="after">
<xpath expr="//group[1]" position="move"/>
</xpath>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
from . import models
from .hooks import post_init_hook

View File

@@ -0,0 +1,61 @@
# -*- coding: utf-8 -*-
# Created on 2018-08-15
# author: 广州尚鹏https://www.sunpop.cn
# email: 300883@qq.com
# resource of Sunpop
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# Odoo在线中文用户手册长期更新
# 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/
# description:
{
'name': "App Product category ztree, parent children tree",
'version': '14.20.05.03',
'author': 'Sunpop.cn',
'category': 'Base',
'website': 'https://www.sunpop.cn',
'license': 'LGPL-3',
'sequence': 2,
'summary': """
Use for parent children tree list select navigator. Product category tree.
ztree widget.
""",
'description': """
zTree widget.
Advance search with real parent children tree, ListView or KanbanView ,
eg: Product category tree ,Department tree, stock location tree.
超级方便的查询,树状视图。
""",
'price': 0.00,
'currency': 'EUR',
'depends': [
'product',
],
'images': ['static/description/banner.gif'],
'data': [
'views/product_views.xml',
],
'demo': [
],
'test': [
],
'css': [
],
'qweb': [
'static/src/xml/*.xml',
],
'js': [
],
'post_load': None,
'post_init_hook': 'post_init_hook',
'installable': True,
'application': True,
'auto_install': False,
}

View File

@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Created on 2018-10-12
# author: 广州尚鹏https://www.sunpop.cn
# email: 300883@qq.com
# resource of Sunpop
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# Odoo在线中文用户手册长期更新
# 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/
# description:
def post_init_hook(cr, pool):
pass
# cr.execute("")

View File

@@ -0,0 +1,14 @@
# Translation of Odoo Server.
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-08 14:28+0000\n"
"PO-Revision-Date: 2018-01-08 14:28+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"

View File

@@ -0,0 +1 @@
# -*- coding: utf-8 -*-

View File

@@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
# Created on 2017-11-28
# author: 广州尚鹏https://www.sunpop.cn
# email: 300883@qq.com
# resource of Sunpop
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
# Odoo在线中文用户手册长期更新
# 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/
# description:
from odoo import api, fields, models, exceptions, _
class ProductCategory(models.Model):
_inherit = 'product.category'
# 更新 complete_name 算法当有context: show_short_category =1 时,只显示短名
def name_get(self):
if self._context.get('show_short_category'):
new_res = []
for category in self:
name = category.name
new_res.append((category.id, name))
return new_res
else:
return super(ProductCategory, self).name_get()

View File

@@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1,177 @@
<section class="oe_container">
<div class="oe_row oe_spaced" style="max-width: 95%;">
<h2 class="oe_slogan" style="color:#875A7B;">App ztree widget, for parent children tree list. Demo for product category</h2>
<h3 class="oe_slogan">Very useful for parent child relationship, like product category, stock location, hr department</h3>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<div class="oe_span12">
<div class="alert alert-info" style="padding:8px;font-weight: 300; font-size: 20px;">
<i class="fa fa-hand-o-right"></i><b> Key features: </b>
<ul class="list-unstyled">
<li>
<i class="fa fa-check-square-o text-primary"></i>
Easy to make custom parent children tree.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
Free to Use in product category.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
Free to Use in stock location.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
Free to Use in hr department, employee.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
It's a widget, you can use it in anywhere in odoo.
</li>
</ul>
</div>
<div class="alert alert-info" style="padding:8px;font-weight: 300; font-size: 20px;">
<i class="fa fa-hand-o-right"></i><b>Extend features(Need extra module, release soon): </b>
<ul class="list-unstyled">
<li>
<i class="fa fa-check-square-o text-primary"></i>
Easy to navigate product, employee in tree or kanban view.
</li>
</ul>
</div>
<div class="alert alert-info" style="padding:8px;font-weight: 300; font-size: 20px;">
<i class="fa fa-hand-o-right"></i><b>Get relate Demo </b>
<ul class="list-unstyled">
<li>
<i class="fa fa-link text-primary"></i>
<a href="http://www.odoo.com/apps/modules/14.0/app_web_widget_ztree/" target="_blank" class="text-danger">zTree widget (must need to use in following demo).</a>
</li>
<li>
<i class="fa fa-link text-primary"></i>
<a href="http://www.odoo.com/apps/modules/14.0/app_product_ztree/" target="_blank">Product and category.</a>
</li>
<li>
<i class="fa fa-link text-primary"></i>
<a href="http://www.odoo.com/apps/modules/14.0/app_stock_ztree/" target="_blank">Stock and Location.</a>
</li>
<li>
<i class="fa fa-link text-primary"></i>
<a href="http://www.odoo.com/apps/modules/14.0/app_hr_ztree/" target="_blank">hr department and employee.</a>
</li>
</ul>
</div>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Use in product.</h4>
<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">Free to Use in product category.</h4>
<div class="oe_demo oe_screenshot">
<img src="demo1.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Free to Use in stock location.</h4>
<div class="oe_demo oe_screenshot">
<img src="demo3.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Use in hr department.</h4>
<div class="oe_demo oe_screenshot">
<img src="demo4.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Use in hr employee.</h4>
<div class="oe_demo oe_screenshot">
<img src="demo5.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h1>&nbsp;</h1>
<h1 class="text-danger text-center">(!Need extra module and pay, release soon)Easy to navigator.</h1>
<h4 class="oe_slogan">Product, employee in kanban view</h4>
<div class="oe_demo oe_screenshot">
<img src="demo11.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">(!Need extra module and pay, release soon)List view</h4>
<div class="oe_demo oe_screenshot">
<img src="demo12.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Easy to setup just use widget='widget_select'. like this</h4>
<div class="oe_demo oe_screenshot">
<img src="setup1.jpg">
</div>
<h1><br/> Use follow param to setup widget:<br/></h1>
<h4>ztree_parent_key: --the key field of parent children relation.</h4>
<h4>ztree_expend_level: --how many level to expend the tree for initialize. Default is 2</h4>
<h4>limit: --how many record to show ztree. Default is 16</h4>
<h4>order: --the field to order by</h4>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced text-center">
<div class="oe_span12">
<h2 class="oe_slogan">Technical Help & Support</h2>
</div>
<div class="col-md-12 pad0">
<div class="oe_mt16">
<p><h4>
For any type of technical help & support requests, Feel free to contact us</h4></p>
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
class="btn btn-warning btn-lg" rel="nofollow" href="mailto:guohuadeng@hotmail.com"><span
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
<i class="fa fa-envelope"></i> guohuadeng@hotmail.com</a>
<p><h4>
Via QQ: 300883 (App user would not get QQ or any other IM support. Only for odoo project customize.)</h4></p>
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
class="btn btn-warning btn-lg" rel="nofollow" href="mailto:300883@qq.com"><span
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
<i class="fa fa-envelope"></i> 300883@qq.com</a>
</div>
<div class="oe_mt16">
<h4>
Visit our website for more support.</h4>
<h4>https://www.sunpop.cn</h4>
</div>
</div>
</div>
</section>

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@@ -0,0 +1,54 @@
<odoo>
<data>
<!-- Product template -->
<record id="app_product_template_tree_view" model="ir.ui.view">
<field name="name">app.product.template.tree</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_tree_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='categ_id']" position="attributes">
<!-- Add your fields or attributes here -->
<attribute name="widget">ztree_select</attribute>
<attribute name="options">{'ztree_parent_key': 'parent_id','ztree_expend_level': '2', 'ztree_name_field': 'name', 'order': 'name' }</attribute>
</xpath>
</field>
</record>
<record id="app_product_template_form_view" model="ir.ui.view">
<field name="name">app.product.template.form</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='categ_id']" position="attributes">
<!-- Add your fields or attributes here -->
<attribute name="widget">ztree_select</attribute>
<attribute name="options">{'ztree_parent_key': 'parent_id','ztree_expend_level': '2', 'ztree_name_field': 'name', 'order': 'name' }</attribute>
</xpath>
</field>
</record>
<!-- Product product -->
<record id="app_product_product_tree_view" model="ir.ui.view">
<field name="name">app.product.product.tree</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_product_tree_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='categ_id']" position="attributes">
<!-- Add your fields or attributes here -->
<attribute name="widget">ztree_select</attribute>
<attribute name="options">{'ztree_parent_key': 'parent_id','ztree_expend_level': '2', 'ztree_name_field': 'name', 'order': 'name' }</attribute>
</xpath>
</field>
</record>
<record id="app_product_category_form_view" model="ir.ui.view">
<field name="name">app.product.category.form</field>
<field name="model">product.category</field>
<field name="inherit_id" ref="product.product_category_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='parent_id']" position="attributes">
<!-- Add your fields or attributes here -->
<attribute name="widget">ztree_select</attribute>
<attribute name="options">{'ztree_parent_key': 'parent_id','ztree_expend_level': '2', 'order': 'name' }</attribute>
</xpath>
</field>
</record>
</data>
</odoo>

View File

@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import models

View File

@@ -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': 'Stock Location Chart Hierarchy, 仓库库位多层级结构图',
'version': '13.21.12.05',
'author': 'Sunpop.cn',
'category': 'Stock',
'website': 'https://www.sunpop.cn',
'license': 'LGPL-3',
'sequence': 2,
'summary': """
Chart Hierarchy Widget. Hierarchy Chart, Hierarchy Tree for multi level Parent Children relation tree.
Free for category Hierarchy chart, stock Hierarchy chart. account chart.
""",
'description': """
Need extra paid apps https://www.odoo.com/apps/modules/13.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': [
'stock',
],
'images': ['static/description/banner.gif'],
'data': [
'views/stock_location_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,
}

View File

@@ -0,0 +1,2 @@
# -*- coding: utf-8 -*

View File

@@ -0,0 +1,112 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * app_stock_location_zchart
#
# Translators:
# Martin Trigaux, 2018
# 珠海-杜哥 <liangjia@qq.com>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~11.5\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-18 09:49+0000\n"
"PO-Revision-Date: 2018-09-18 09:49+0000\n"
"Last-Translator: 珠海-杜哥 <liangjia@qq.com>, 2018\n"
"Language-Team: Chinese (China) (https://www.transifex.com/odoo/teams/41243/zh_CN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#. module: app_stock_location_zchart
#. openerp-web
#: code:addons/app_stock_location_zchart/static/src/js/app_stock_location_zchart.js:137
#, python-format
msgid "Direct Subordinates of %s"
msgstr "%s的直接下属"
#. module: app_stock_location_zchart
#. openerp-web
#: code:addons/app_stock_location_zchart/static/src/xml/app_stock_location_zchart.xml:126
#, python-format
msgid "Direct subordinates"
msgstr "直接下属"
#. module: app_stock_location_zchart
#: model:ir.model,name:app_stock_location_zchart.model_product.category
msgid "node"
msgstr "员工"
#. module: app_stock_location_zchart
#. openerp-web
#: code:addons/app_stock_location_zchart/static/src/xml/app_stock_location_zchart.xml:89
#, python-format
msgid "In order to get an organigram, set a parent and save the record."
msgstr "为了获取组织图,请设置一个上司然后保存"
#. module: app_stock_location_zchart
#. openerp-web
#: code:addons/app_stock_location_zchart/static/src/js/app_stock_location_zchart.js:147
#, python-format
msgid "Indirect Subordinates of %s"
msgstr "%s的非直接下属"
#. module: app_stock_location_zchart
#: model:ir.model.fields,field_description:app_stock_location_zchart.field_product.category__child_all_count
msgid "Indirect Surbordinates Count"
msgstr "非直接下属数量"
#. module: app_stock_location_zchart
#. openerp-web
#: code:addons/app_stock_location_zchart/static/src/xml/app_stock_location_zchart.xml:136
#, python-format
msgid "Indirect subordinates"
msgstr "非直接下属"
#. module: app_stock_location_zchart
#. openerp-web
#: code:addons/app_stock_location_zchart/static/src/xml/app_stock_location_zchart.xml:66
#, python-format
msgid "More parents"
msgstr "更多管理员"
#. module: app_stock_location_zchart
#. openerp-web
#: code:addons/app_stock_location_zchart/static/src/xml/app_stock_location_zchart.xml:87
#, python-format
msgid "No hierarchy position."
msgstr "没有层级位置"
#. module: app_stock_location_zchart
#: model_terms:ir.ui.view,arch_db:app_stock_location_zchart.product.category_view_form_inherit_chart_hierarchy
msgid "Organization Chart"
msgstr "组织图表"
#. module: app_stock_location_zchart
#. openerp-web
#: code:addons/app_stock_location_zchart/static/src/xml/app_stock_location_zchart.xml:155
#, python-format
msgid "Redirect"
msgstr "重定向"
#. module: app_stock_location_zchart
#. openerp-web
#: code:addons/app_stock_location_zchart/static/src/js/app_stock_location_zchart.js:140
#, python-format
msgid "Subordinates of %s"
msgstr "%s的下属"
#. module: app_stock_location_zchart
#. openerp-web
#: code:addons/app_stock_location_zchart/static/src/xml/app_stock_location_zchart.xml:88
#, python-format
msgid "This employee has no parent or subordinate."
msgstr "该员工没有上司或下属"
#. module: app_stock_location_zchart
#. openerp-web
#: code:addons/app_stock_location_zchart/static/src/xml/app_stock_location_zchart.xml:144
#, python-format
msgid "Total"
msgstr "合计"

View File

@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import stock_location

View File

@@ -0,0 +1,8 @@
# -*- coding: utf-8 -*-
from odoo import api, fields, models, tools, _
class Location(models.Model):
_name = "stock.location"
_inherit = ['stock.location', 'image.mixin']

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

@@ -0,0 +1,212 @@
<section class="oe_container">
<div class="oe_row oe_spaced" style="max-width: 95%;">
<h2 class="oe_slogan" style="color:#875A7B;">Stock Location Chart Hierarchy for Multi Level</h2>
<h3 class="oe_slogan">Very useful for show parent child relationship, like product category, stock location, hr department</h3>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<div class="oe_span12">
<div class="alert alert-info" style="padding:8px;font-weight: 300; font-size: 20px;">
<i class="fa fa-hand-o-right"></i><b> Key features: </b>
<ul class="list-unstyled">
<li>
<i class="fa fa-check-square-o text-primary"></i>
Easy to make show parent children Chart Hierarchy.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
Free to Use in Manufacture Order multi level. For Multi level MO MRP Production Order from multi bom.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
Free to Use in product category.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
Free to Use in stock location.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
Free to Use in hr department, employee.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
Free to Use in Account chart.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
Free to Use in User Alliance Distribution Multi level.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
It's a widget, you can use it in anywhere in odoo.
</li>
</ul>
</div>
<h1 class="text-danger text-center">Buy
<a href="https://www.odoo.com/apps/modules/13.0/app_web_chart_hierarchy/">
this 1 chart hierarchy
</a>
in odoo Store. Get free 5 related free apps.
</a>
</h1>
<div class="oe_demo">
<img class="oe_demo oe_screenshot" src="banner.gif">
</div>
<div class="alert alert-info" style="padding:8px;font-weight: 300; font-size: 20px;">
<i class="fa fa-hand-o-right"></i><b>Get relate Demo </b>
<ul class="list-unstyled">
<li>
<i class="fa fa-link text-primary"></i>
<a href="http://www.odoo.com/apps/modules/13.0/app_mrp_production_chart/" target="_blank">MRP Production Chart Hierarchy</a>
</li>
<li>
<i class="fa fa-link text-primary"></i>
<a href="http://www.odoo.com/apps/modules/13.0/app_product_category_chart/" target="_blank">Product category chart hierarchy</a>
</li>
<li>
<i class="fa fa-link text-primary"></i>
<a href="http://www.odoo.com/apps/modules/13.0/app_stock_location_zchart/" target="_blank">Stock Location chart hierarchy</a>
</li>
<li>
<i class="fa fa-link text-primary"></i>
<a href="http://www.odoo.com/apps/modules/13.0/app_hr_department_chart/" target="_blank">hr department employee chart hierarchy</a>
</li>
<li>
<i class="fa fa-link text-primary"></i>
<a href="http://www.odoo.com/apps/modules/13.0/app_account_account_chart/" target="_blank">Account chart hierarchy(chinese only)</a>
</li>
<li>
<i class="fa fa-link text-primary"></i>
<a href="http://www.odoo.com/apps/modules/13.0/app_users_chart_hierarchy/" target="_blank">User Alliance Distribution Multi level</a>
</li>
</ul>
</div>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h1>&nbsp;</h1>
<h1 class="text-danger text-center">MRP Production Chart Hierarchy</h1>
<div class="oe_demo oe_screenshot">
<img src="demo1.jpg">
</div>
<h4 class="oe_slogan">If we have a multi Bom like follow:</h4>
<div class="oe_demo oe_screenshot">
<img src="demo_bom.jpg">
</div>
<h4 class="oe_slogan">Show sub manufacture order and quick access sub MO</h4>
<div class="oe_demo oe_screenshot">
<img src="demo_mo.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h1>&nbsp;</h1>
<h1 class="text-danger text-center">Product category Chart Hierarchy</h1>
<div class="oe_demo oe_screenshot">
<img src="demo1.jpg">
</div>
<h4 class="oe_slogan">Show sub category and quick access category</h4>
<div class="oe_demo oe_screenshot">
<img src="demo2.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h1>&nbsp;</h1>
<h1 class="text-danger text-center">Stock Location Chart Hierarchy</h1>
<div class="oe_demo oe_screenshot">
<img src="demo4.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h1>&nbsp;</h1>
<h1 class="text-danger text-center">HR Department Chart Hierarchy</h1>
<div class="oe_demo oe_screenshot">
<img src="demo5.jpg">
</div>
<h1 class="text-danger text-center">HR Emploee Chart Hierarchy (this is include in odoo)</h1>
<div class="oe_demo oe_screenshot">
<img src="demo6.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h1>&nbsp;</h1>
<h1 class="text-danger text-center">Account Chart Hierarchy</h1>
<div class="oe_demo oe_screenshot">
<img src="demo7.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h1>&nbsp;</h1>
<h1 class="text-danger text-center">User Alliance Distribution Multi level</h1>
<div class="oe_demo oe_screenshot">
<img src="demo9.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Easy to setup just use widget='web_chart_hierarchy'. like this</h4>
<div class="oe_demo oe_screenshot">
<img src="setup1.jpg">
</div>
<h4 class="oe_slogan">Also need to change view for better ui</h4>
<div class="oe_demo oe_screenshot">
<img src="setup2.jpg">
</div>
<h1><br/> Use follow param to setup widget:<br/></h1>
<h4>image: --the field of image.</h4>
<h4>desc: --the field of subtitle.</h4>
<h4>direct_sub: --the field of sub node.</h4>
<h4>child_all_count: --the field of node count.</h4>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced text-center">
<div class="oe_span12">
<h2 class="oe_slogan">Technical Help & Support</h2>
</div>
<div class="col-md-12 pad0">
<div class="oe_mt16">
<p><h4>
For any type of technical help & support requests, Feel free to contact us</h4></p>
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
class="btn btn-warning btn-lg" rel="nofollow" href="mailto:guohuadeng@hotmail.com"><span
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
<i class="fa fa-envelope"></i> guohuadeng@hotmail.com</a>
<p><h4>
Via QQ: 300883 (App user would not get QQ or any other IM support. Only for odoo project customize.)</h4></p>
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
class="btn btn-warning btn-lg" rel="nofollow" href="mailto:300883@qq.com"><span
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
<i class="fa fa-envelope"></i> 300883@qq.com</a>
</div>
<div class="oe_mt16">
<h4>
Visit our website for more support.</h4>
<h4>https://www.sunpop.cn</h4>
</div>
</div>
</div>
</section>

Some files were not shown because too many files have changed in this diff Show More