release ztree

This commit is contained in:
ivan deng
2018-10-13 08:36:36 +08:00
parent ffdc3d1334
commit 21d793e021
60 changed files with 934 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: 广州尚鹏http://www.sunpop.cn
# email: 300883@qq.com
# resource of Sunpop
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# Odoo在线中文用户手册长期更新
# http://www.sunpop.cn/documentation/user/10.0/zh_CN/index.html
# Odoo10离线中文用户手册下载
# http://www.sunpop.cn/odoo10_user_manual_document_offline/
# Odoo10离线开发手册下载-含python教程jquery参考Jinja2模板PostgresSQL参考odoo开发必备
# http://www.sunpop.cn/odoo10_developer_document_offline/
# description:
{
'name': "app stock location ztree, parent children tree",
'version': '11.0.10.15',
'author': 'Sunpop.cn',
'category': 'Base',
'website': 'http://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.png'],
'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: 广州尚鹏http://www.sunpop.cn
# email: 300883@qq.com
# resource of Sunpop
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# Odoo在线中文用户手册长期更新
# http://www.sunpop.cn/documentation/user/10.0/zh_CN/index.html
# Odoo10离线中文用户手册下载
# http://www.sunpop.cn/odoo10_user_manual_document_offline/
# Odoo10离线开发手册下载-含python教程jquery参考Jinja2模板PostgresSQL参考odoo开发必备
# http://www.sunpop.cn/odoo10_developer_document_offline/
# description:
def post_init_hook(cr, pool):
pass
# cr.execute("")

View File

@@ -0,0 +1,16 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * felive_home
#
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,179 @@
<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>
Use in product category.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
Use in stock location.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
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/11.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/11.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/11.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/11.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_picture 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_picture 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_picture oe_screenshot">
<img src="demo2.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Use in product category.</h4>
<div class="oe_demo oe_picture oe_screenshot">
<img src="demo1.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Use in stock location.</h4>
<div class="oe_demo oe_picture 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_picture 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_picture 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_picture 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</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">
<p><h4>
Visit our website for more support.</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="http://www.sunpop.cn" target="_blank"><span
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
<i class="fa fa-web"></i>http://www.sunpop.cn</a>
</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,30 @@
<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="ztree_parent_key">parent_id</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="ztree_parent_key">parent_id</attribute>
</xpath>
</field>
</record>
</data>
</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: 广州尚鹏http://www.sunpop.cn
# email: 300883@qq.com
# resource of Sunpop
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# Odoo在线中文用户手册长期更新
# http://www.sunpop.cn/documentation/user/10.0/zh_CN/index.html
# Odoo10离线中文用户手册下载
# http://www.sunpop.cn/odoo10_user_manual_document_offline/
# Odoo10离线开发手册下载-含python教程jquery参考Jinja2模板PostgresSQL参考odoo开发必备
# http://www.sunpop.cn/odoo10_developer_document_offline/
# description:
{
'name': "app product category ztree, parent children tree",
'version': '11.0.10.15',
'author': 'Sunpop.cn',
'category': 'Base',
'website': 'http://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.png'],
'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: 广州尚鹏http://www.sunpop.cn
# email: 300883@qq.com
# resource of Sunpop
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# Odoo在线中文用户手册长期更新
# http://www.sunpop.cn/documentation/user/10.0/zh_CN/index.html
# Odoo10离线中文用户手册下载
# http://www.sunpop.cn/odoo10_user_manual_document_offline/
# Odoo10离线开发手册下载-含python教程jquery参考Jinja2模板PostgresSQL参考odoo开发必备
# http://www.sunpop.cn/odoo10_developer_document_offline/
# description:
def post_init_hook(cr, pool):
pass
# cr.execute("")

View File

@@ -0,0 +1,16 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * felive_home
#
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,180 @@
<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>
Use in product category.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
Use in stock location.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
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/11.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/11.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/11.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/11.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_picture oe_screenshot">
<img src="demo2.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Use in product category.</h4>
<div class="oe_demo oe_picture oe_screenshot">
<img src="demo1.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Use in stock location.</h4>
<div class="oe_demo oe_picture 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_picture 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_picture 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_picture 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_picture 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_picture 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</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">
<p><h4>
Visit our website for more support.</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="http://www.sunpop.cn" target="_blank"><span
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
<i class="fa fa-web"></i>http://www.sunpop.cn</a>
</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,34 @@
<odoo>
<data>
<!-- Product -->
<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="ztree_parent_key">parent_id</attribute>
<attribute name="ztree_expend_level">2</attribute>
<attribute name="limit">16</attribute>
<attribute 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="ztree_parent_key">parent_id</attribute>
</xpath>
</field>
</record>
</data>
</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: 广州尚鹏http://www.sunpop.cn
# email: 300883@qq.com
# resource of Sunpop
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# Odoo在线中文用户手册长期更新
# http://www.sunpop.cn/documentation/user/10.0/zh_CN/index.html
# Odoo10离线中文用户手册下载
# http://www.sunpop.cn/odoo10_user_manual_document_offline/
# Odoo10离线开发手册下载-含python教程jquery参考Jinja2模板PostgresSQL参考odoo开发必备
# http://www.sunpop.cn/odoo10_developer_document_offline/
# description:
{
'name': "app stock location ztree, parent children tree",
'version': '11.0.10.15',
'author': 'Sunpop.cn',
'category': 'Base',
'website': 'http://www.sunpop.cn',
'license': 'LGPL-3',
'sequence': 2,
'summary': """
Use for parent children tree list select navigator. stock location 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': [
'stock',
],
'images': ['static/description/banner.png'],
'data': [
'views/stock_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_stock_ztree/hooks.py Normal file
View File

@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Created on 2018-10-12
# author: 广州尚鹏http://www.sunpop.cn
# email: 300883@qq.com
# resource of Sunpop
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# Odoo在线中文用户手册长期更新
# http://www.sunpop.cn/documentation/user/10.0/zh_CN/index.html
# Odoo10离线中文用户手册下载
# http://www.sunpop.cn/odoo10_user_manual_document_offline/
# Odoo10离线开发手册下载-含python教程jquery参考Jinja2模板PostgresSQL参考odoo开发必备
# http://www.sunpop.cn/odoo10_developer_document_offline/
# description:
def post_init_hook(cr, pool):
pass
# cr.execute("")

View File

@@ -0,0 +1,16 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * felive_home
#
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,181 @@
<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 stock location.</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>
Use in product category.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
Use in stock location.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
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/11.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/11.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/11.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/11.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 stock location.</h4>
<div class="oe_demo oe_picture 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 product.</h4>
<div class="oe_demo oe_picture oe_screenshot">
<img src="demo2.jpg">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Use in product category.</h4>
<div class="oe_demo oe_picture oe_screenshot">
<img src="demo1.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_picture 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_picture 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_picture 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_picture 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_picture 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</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">
<p><h4>
Visit our website for more support.</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="http://www.sunpop.cn" target="_blank"><span
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
<i class="fa fa-web"></i>http://www.sunpop.cn</a>
</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,18 @@
<odoo>
<data>
<!-- stock -->
<record id="app_view_location_form" model="ir.ui.view">
<field name="name">app.stock.location.form</field>
<field name="model">stock.location</field>
<field name="inherit_id" ref="stock.view_location_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='location_id']" position="attributes">
<!-- Add your fields or attributes here -->
<attribute name="widget">ztree_select</attribute>
<attribute name="ztree_parent_key">location_id</attribute>
</xpath>
</field>
</record>
</data>
</odoo>