upgrade app_hr_ztree 16
4
app_hr_ztree/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import models
|
||||
from .hooks import post_init_hook
|
||||
74
app_hr_ztree/__manifest__.py
Normal file
@@ -0,0 +1,74 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Created on 2023-10-23
|
||||
# author: 欧度智能,https://www.odooai.cn
|
||||
# email: 300883@qq.com
|
||||
# resource of odooai
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
# Odoo16在线用户手册(长期更新)
|
||||
# https://www.odooai.cn/documentation/16.0/zh_CN/index.html
|
||||
|
||||
# Odoo16在线开发者手册(长期更新)
|
||||
# https://www.odooai.cn/documentation/16.0/zh_CN/developer.html
|
||||
|
||||
# Odoo13在线用户手册(长期更新)
|
||||
# https://www.odooai.cn/documentation/user/13.0/zh_CN/index.html
|
||||
|
||||
# Odoo13在线开发者手册(长期更新)
|
||||
# https://www.odooai.cn/documentation/13.0/index.html
|
||||
|
||||
# Odoo在线中文用户手册(长期更新)
|
||||
# https://www.odooai.cn/documentation/user/10.0/zh_CN/index.html
|
||||
|
||||
# Odoo10离线中文用户手册下载
|
||||
# https://www.odooai.cn/odoo10_user_manual_document_offline/
|
||||
# Odoo10离线开发手册下载-含python教程,jquery参考,Jinja2模板,PostgresSQL参考(odoo开发必备)
|
||||
# https://www.odooai.cn/odoo10_developer_document_offline/
|
||||
# description:
|
||||
|
||||
{
|
||||
'name': "App HR department ztree, parent children tree",
|
||||
'version': '16.23.10.23',
|
||||
'author': 'odooai.cn',
|
||||
'category': 'Base',
|
||||
'website': 'https://www.odooai.cn',
|
||||
'live_test_url': 'https://demo.odooapp.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,
|
||||
}
|
||||
32
app_hr_ztree/hooks.py
Normal file
@@ -0,0 +1,32 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Created on 2018-10-12
|
||||
# author: 欧度智能,https://www.odooai.cn
|
||||
# email: 300883@qq.com
|
||||
# resource of odooai
|
||||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
|
||||
|
||||
# Odoo16在线用户手册(长期更新)
|
||||
# https://www.odooai.cn/documentation/16.0/zh_CN/index.html
|
||||
|
||||
# Odoo16在线开发者手册(长期更新)
|
||||
# https://www.odooai.cn/documentation/16.0/zh_CN/developer.html
|
||||
|
||||
# Odoo13在线用户手册(长期更新)
|
||||
# https://www.odooai.cn/documentation/user/13.0/zh_CN/index.html
|
||||
|
||||
# Odoo13在线开发者手册(长期更新)
|
||||
# https://www.odooai.cn/documentation/13.0/index.html
|
||||
|
||||
# Odoo在线中文用户手册(长期更新)
|
||||
# https://www.odooai.cn/documentation/user/10.0/zh_CN/index.html
|
||||
|
||||
# Odoo10离线中文用户手册下载
|
||||
# https://www.odooai.cn/odoo10_user_manual_document_offline/
|
||||
# Odoo10离线开发手册下载-含python教程,jquery参考,Jinja2模板,PostgresSQL参考(odoo开发必备)
|
||||
# https://www.odooai.cn/odoo10_developer_document_offline/
|
||||
# description:
|
||||
|
||||
def post_init_hook(cr, pool):
|
||||
pass
|
||||
# cr.execute("")
|
||||
14
app_hr_ztree/i18n/zh_CN.po
Normal 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"
|
||||
1
app_hr_ztree/models/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
2
app_hr_ztree/report/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
BIN
app_hr_ztree/static/description/banner.gif
Normal file
|
After Width: | Height: | Size: 3.0 MiB |
BIN
app_hr_ztree/static/description/demo1.jpg
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
app_hr_ztree/static/description/demo11.jpg
Normal file
|
After Width: | Height: | Size: 100 KiB |
BIN
app_hr_ztree/static/description/demo12.jpg
Normal file
|
After Width: | Height: | Size: 98 KiB |
BIN
app_hr_ztree/static/description/demo2.jpg
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
app_hr_ztree/static/description/demo3.jpg
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
app_hr_ztree/static/description/demo4.jpg
Normal file
|
After Width: | Height: | Size: 60 KiB |
BIN
app_hr_ztree/static/description/demo5.jpg
Normal file
|
After Width: | Height: | Size: 62 KiB |
BIN
app_hr_ztree/static/description/icon.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
181
app_hr_ztree/static/description/index.html
Normal 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 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>
|
||||
<a href="http://www.odoo.com/apps/modules/15.0/app_web_superbar/" target="_blank" class="text-danger">
|
||||
Extend features. superbar advance search navigator
|
||||
</a>
|
||||
</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/15.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/15.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/15.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/15.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 img-fluid">
|
||||
<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 img-fluid">
|
||||
<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 img-fluid">
|
||||
<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 img-fluid">
|
||||
<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 img-fluid">
|
||||
<img src="demo3.jpg">
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container">
|
||||
<div class="oe_row oe_spaced">
|
||||
<h1> </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 img-fluid">
|
||||
<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 img-fluid">
|
||||
<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 img-fluid">
|
||||
<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:odoo@china.com"><span
|
||||
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
|
||||
<i class="fa fa-envelope"></i> odoo@china.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.odooai.cn</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
BIN
app_hr_ztree/static/description/setup1.jpg
Normal file
|
After Width: | Height: | Size: 47 KiB |
BIN
app_hr_ztree/static/img/icon_sunpop.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
app_hr_ztree/static/img/logo_sunpop.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
29
app_hr_ztree/views/hr_views.xml
Normal 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>
|
||||