diff --git a/app_product_superbar/__manifest__.py b/app_product_superbar/__manifest__.py index 8e87b0bb..da73cdca 100644 --- a/app_product_superbar/__manifest__.py +++ b/app_product_superbar/__manifest__.py @@ -16,8 +16,8 @@ # description: { - 'name': "app product browse by category navigator", - 'version': '12.0.10.29', + 'name': "App product browse by category navigator", + 'version': '11.0.10.15', 'author': 'Sunpop.cn', 'category': 'Base', 'website': 'http://www.sunpop.cn', @@ -25,11 +25,11 @@ 'sequence': 2, 'summary': """ Browse Product by category tree. Use for parent children tree list kanban navigator. - ztree widget. + ztree widget.Hierarchy Tree.Parent Children relation tree.. """, 'description': """ - Superbar, zTree widget. - Advance search with real parent children tree, ListView or KanbanView , + Superbar, zTree widget. + Advance search with real parent children tree, ListView or KanbanView. parent tree, children tree, eg: Product category tree ,Department tree, stock location tree. 超级方便的查询,树状视图。 """, diff --git a/app_product_superbar/models/__init__.py b/app_product_superbar/models/__init__.py index 40a96afc..cfc06edc 100644 --- a/app_product_superbar/models/__init__.py +++ b/app_product_superbar/models/__init__.py @@ -1 +1,4 @@ # -*- coding: utf-8 -*- + +# from . import product_category + diff --git a/app_product_superbar/models/product_category.py b/app_product_superbar/models/product_category.py new file mode 100644 index 00000000..0db2bc6e --- /dev/null +++ b/app_product_superbar/models/product_category.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- + +# Created on 2017-11-28 +# 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: + +from odoo import api, fields, models, exceptions, _ + +class ProductCategory(models.Model): + _inherit = 'product.category' + + # 更新 complete_name 算法,当有context: show_short =1 时,只显示短名 + @api.multi + def name_get(self): + if self._context.get('category_show_short'): + 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() \ No newline at end of file diff --git a/app_product_superbar/static/description/banner.png b/app_product_superbar/static/description/banner.png index 37d3a64d..1f96341d 100644 Binary files a/app_product_superbar/static/description/banner.png and b/app_product_superbar/static/description/banner.png differ diff --git a/app_product_superbar/static/description/index.html b/app_product_superbar/static/description/index.html index 43702e3a..e08a5200 100644 --- a/app_product_superbar/static/description/index.html +++ b/app_product_superbar/static/description/index.html @@ -1,12 +1,16 @@
-

Product Super Sidebar for Advance Search with Parent Children Tree

-

Advance Search, Advance Filter with Parent Children Tree. - Easy to navigator and browser any data. Support list, kanban, pivot, graph view.

+

ProductApp Super Sidebar for Advance Search with Parent Children Tree

!This moduld Do Need extra paid Apps - - Click to download. -

+ + Click to download. + +

Advance Search, Filter with Parent Children Tree.

+

Easy to navigator and browser any data. Support list, kanban, pivot, graph view.

+

Online demo user/password: demo/demo + + Click to get demo. +

@@ -80,45 +84,12 @@

 

So Easy to navigator and search any data.

Product by category or type in kanban view

-
+
-
-
-

 

-

How to use! This app do need extra module. The price already included

-

1. Install zTree widget - - Click to download. - -

-

2. Install app_web_superbar. Important! Reboot odoo after installed. -

-
- -
-

3. If you want to customize, Use follow param to setup widget:

-
-
- -
-
-

In searchview xml, Write the <superbar> tag,

-

position: [left, right]

-

view_mode: [kanban,tree, pivot, graph view.]

-

parent_key: key field name of parent child relation. leave blank would auto set.

-

level: how many level to expend the tree for initialize. Default is 2

-

limit: how many record to show ztree. Default is 16

-

order: the field name to order by

-

domain: set the domain for data, eg: [[('is_company', '=', 1)]]

-
-
-
-
-

Use in product category.

@@ -155,6 +126,126 @@
+
+
+

Use in contacts.

+
+ +
+
+
+ +
+
+

 

+

How to use! This app do need extra module. The price already included

+
+

1. Install zTree widget. + + Click to download. + +

+
+
+

2. Install app_web_superbar. Important! Reboot odoo after installed. +

+
+
+

3. Easy use of superbar

+
+

Show superbar in list view.

+
+
+
+ +
+
+
+

Show superbar in kanban view.

+
+
+
+ +
+
+
+

Show superbar in pivot view.

+
+
+
+ +
+
+
+

Show superbar in graph view.

+
+
+
+ +
+
+
+

Click switch to show or hide superbar.

+
+
+
+ +
+
+
+

Click checkbox to set whether to show child nodes data.

+
+
+
+ +
+
+
+

Press Ctrl(Windows) / Cmd(Mac) to Select Multi Nodes

+
+
+
+ +
+
+
+

Set multi field to search or filter

+
+
+
+ +
+
+
+

Set super bar position, left or right.

+
+
+
+ +
+
+
+
+

4. If you want to customize, Use follow param to setup widget:

+
+
+ +
+
    +
  • In search view xml, Write the <superbar> tag,
  • +
  • position: [left, right]
  • +
  • view_mode: [kanban,tree, pivot, graph view.]
  • +
  • parent_key: key field name of parent child relation. leave blank would auto set.
  • +
  • level: how many level to expend the tree for initialize. Default is 2
  • +
  • limit: how many record to show ztree. Default is 16
  • +
  • order: the field name to order by
  • +
  • domain: set the domain for data, eg: [[('is_company', '=', 1)]]
  • +
+
+
+
+
+
diff --git a/app_product_superbar/static/description/superbar.gif b/app_product_superbar/static/description/superbar.gif index 132c4231..48f55f93 100644 Binary files a/app_product_superbar/static/description/superbar.gif and b/app_product_superbar/static/description/superbar.gif differ diff --git a/app_product_superbar/static/description/superbar_use.png b/app_product_superbar/static/description/superbar_use.png new file mode 100644 index 00000000..d5ffc980 Binary files /dev/null and b/app_product_superbar/static/description/superbar_use.png differ diff --git a/app_product_superbar/static/description/use1.jpg b/app_product_superbar/static/description/use1.jpg new file mode 100644 index 00000000..b951024b Binary files /dev/null and b/app_product_superbar/static/description/use1.jpg differ diff --git a/app_product_superbar/static/description/use2.jpg b/app_product_superbar/static/description/use2.jpg new file mode 100644 index 00000000..4d46d705 Binary files /dev/null and b/app_product_superbar/static/description/use2.jpg differ diff --git a/app_product_superbar/static/description/use3.jpg b/app_product_superbar/static/description/use3.jpg new file mode 100644 index 00000000..fe8b7ef7 Binary files /dev/null and b/app_product_superbar/static/description/use3.jpg differ diff --git a/app_product_superbar/static/description/use4.jpg b/app_product_superbar/static/description/use4.jpg new file mode 100644 index 00000000..606a5ce6 Binary files /dev/null and b/app_product_superbar/static/description/use4.jpg differ diff --git a/app_product_superbar/static/description/use5.jpg b/app_product_superbar/static/description/use5.jpg new file mode 100644 index 00000000..18b0d1b4 Binary files /dev/null and b/app_product_superbar/static/description/use5.jpg differ diff --git a/app_product_superbar/static/description/use6.jpg b/app_product_superbar/static/description/use6.jpg new file mode 100644 index 00000000..f900ded8 Binary files /dev/null and b/app_product_superbar/static/description/use6.jpg differ diff --git a/app_product_superbar/static/description/use7.jpg b/app_product_superbar/static/description/use7.jpg new file mode 100644 index 00000000..93fc8d4d Binary files /dev/null and b/app_product_superbar/static/description/use7.jpg differ diff --git a/app_product_superbar/static/description/use8.jpg b/app_product_superbar/static/description/use8.jpg new file mode 100644 index 00000000..41a2796e Binary files /dev/null and b/app_product_superbar/static/description/use8.jpg differ diff --git a/app_product_superbar/static/description/use9.jpg b/app_product_superbar/static/description/use9.jpg new file mode 100644 index 00000000..9b442b4a Binary files /dev/null and b/app_product_superbar/static/description/use9.jpg differ diff --git a/app_product_superbar/static/description/usea.jpg b/app_product_superbar/static/description/usea.jpg new file mode 100644 index 00000000..3c27fb9e Binary files /dev/null and b/app_product_superbar/static/description/usea.jpg differ diff --git a/app_product_superbar/views/product_views.xml b/app_product_superbar/views/product_views.xml index 091c219a..92e3bb90 100644 --- a/app_product_superbar/views/product_views.xml +++ b/app_product_superbar/views/product_views.xml @@ -9,11 +9,23 @@ + parent_key="parent_id" level="0"/> + + + + + + + + + + + + \ No newline at end of file