add stock picking group
8
app_stock_picking_type_group/__init__.py
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from . import models
|
||||||
|
from . import ir
|
||||||
|
from . import res
|
||||||
|
|
||||||
|
from .hooks import pre_init_hook
|
||||||
|
from .hooks import post_init_hook
|
||||||
58
app_stock_picking_type_group/__manifest__.py
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Created on 2017-11-05
|
||||||
|
# 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 picking type group,库存作业类型分组",
|
||||||
|
'version': '12.0.12.26',
|
||||||
|
'author': 'Sunpop.cn',
|
||||||
|
'category': 'Base',
|
||||||
|
'website': 'http://www.sunpop.cn',
|
||||||
|
'license': 'LGPL-3',
|
||||||
|
'sequence': 2,
|
||||||
|
'summary': """
|
||||||
|
广州尚鹏,Sunpop.cn 的odoo模块。用于将库存作业分组,UI更方便。
|
||||||
|
""",
|
||||||
|
'description': """
|
||||||
|
模块开发模板,目录结构与文件定义。
|
||||||
|
""",
|
||||||
|
'depends': ['stock'],
|
||||||
|
'images': ['static/description/demo1.jpg'],
|
||||||
|
'currency': 'EUR',
|
||||||
|
'price': 18,
|
||||||
|
'data': [
|
||||||
|
'security/ir.model.access.csv',
|
||||||
|
'views/stock_picking_type_group_views.xml',
|
||||||
|
'views/stock_picking_type_views.xml',
|
||||||
|
'data/stock_picking_type_group_data.xml'
|
||||||
|
],
|
||||||
|
'demo': [
|
||||||
|
],
|
||||||
|
'test': [
|
||||||
|
],
|
||||||
|
'css': [
|
||||||
|
],
|
||||||
|
'qweb': [
|
||||||
|
],
|
||||||
|
'js': [
|
||||||
|
],
|
||||||
|
'installable': True,
|
||||||
|
'application': True,
|
||||||
|
'auto_install': False,
|
||||||
|
'pre_init_hook': 'pre_init_hook',
|
||||||
|
'post_init_hook': 'post_init_hook',
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
<data noupdate="1">
|
||||||
|
<record id="g_purchase1" model="stock.picking.type.group">
|
||||||
|
<field name="name">采购</field>
|
||||||
|
<field name="sequence">3</field>
|
||||||
|
</record>
|
||||||
|
<record id="g_mrp1" model="stock.picking.type.group">
|
||||||
|
<field name="name">制造</field>
|
||||||
|
<field name="sequence">4</field>
|
||||||
|
</record>
|
||||||
|
<record id="g_stock1" model="stock.picking.type.group">
|
||||||
|
<field name="name">内部库存调拨</field>
|
||||||
|
<field name="sequence">5</field>
|
||||||
|
</record>
|
||||||
|
<record id="g_sale1" model="stock.picking.type.group">
|
||||||
|
<field name="name">销售</field>
|
||||||
|
<field name="sequence">6</field>
|
||||||
|
</record>
|
||||||
|
</data>
|
||||||
|
</odoo>
|
||||||
42
app_stock_picking_type_group/hooks.py
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Created on 2017-11-05
|
||||||
|
# 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, SUPERUSER_ID, _
|
||||||
|
|
||||||
|
def pre_init_hook(cr):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def post_init_hook(cr, registry):
|
||||||
|
try:
|
||||||
|
env = api.Environment(cr, SUPERUSER_ID, {})
|
||||||
|
g = env.ref('app_stock_picking_type_group.g_sale1', raise_if_not_found=False).id
|
||||||
|
cr.execute("UPDATE stock_picking_type SET picking_type_group_id = %s WHERE code='outgoing';" % g)
|
||||||
|
|
||||||
|
env = api.Environment(cr, SUPERUSER_ID, {})
|
||||||
|
g = env.ref('app_stock_picking_type_group.g_purchase1', raise_if_not_found=False).id
|
||||||
|
cr.execute("UPDATE stock_picking_type SET picking_type_group_id = %s WHERE code='incoming';" % g)
|
||||||
|
|
||||||
|
env = api.Environment(cr, SUPERUSER_ID, {})
|
||||||
|
g = env.ref('app_stock_picking_type_group.g_mrp1', raise_if_not_found=False).id
|
||||||
|
cr.execute("UPDATE stock_picking_type SET picking_type_group_id = %s WHERE code='mrp_operation';" % g)
|
||||||
|
|
||||||
|
env = api.Environment(cr, SUPERUSER_ID, {})
|
||||||
|
g = env.ref('app_stock_picking_type_group.g_stock1', raise_if_not_found=False).id
|
||||||
|
cr.execute("UPDATE stock_picking_type SET picking_type_group_id = %s WHERE code='internal';" % g)
|
||||||
|
pass
|
||||||
|
except Exception as e:
|
||||||
|
raise Warning(e)
|
||||||
140
app_stock_picking_type_group/i18n/zh_CN.po
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * app_stock_picking_type_group
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 11.0+e-20180915\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2018-11-04 18:47+0000\n"
|
||||||
|
"PO-Revision-Date: 2018-11-04 18:47+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_stock_picking_type_group
|
||||||
|
#: model:ir.model.fields,field_description:app_stock_picking_type_group.field_stock_picking_type_group_active
|
||||||
|
msgid "Active"
|
||||||
|
msgstr "有效"
|
||||||
|
|
||||||
|
#. module: app_stock_picking_type_group
|
||||||
|
#: model:ir.actions.act_window,name:app_stock_picking_type_group.action_picking_type_group_list
|
||||||
|
msgid "All Picking Types Group"
|
||||||
|
msgstr "作业类型分组"
|
||||||
|
|
||||||
|
#. module: app_stock_picking_type_group
|
||||||
|
#: model:ir.actions.act_window,help:app_stock_picking_type_group.action_picking_type_group_list
|
||||||
|
msgid "Click to define a new picking type group."
|
||||||
|
msgstr "点击创建一条新的记录."
|
||||||
|
|
||||||
|
#. module: app_stock_picking_type_group
|
||||||
|
#: model:ir.model.fields,field_description:app_stock_picking_type_group.field_stock_picking_type_group_color
|
||||||
|
msgid "Color"
|
||||||
|
msgstr "颜色"
|
||||||
|
|
||||||
|
#. module: app_stock_picking_type_group
|
||||||
|
#: model:ir.model.fields,field_description:app_stock_picking_type_group.field_stock_picking_type_group_create_uid
|
||||||
|
msgid "Created by"
|
||||||
|
msgstr "创建人"
|
||||||
|
|
||||||
|
#. module: app_stock_picking_type_group
|
||||||
|
#: model:ir.model.fields,field_description:app_stock_picking_type_group.field_stock_picking_type_group_create_date
|
||||||
|
msgid "Created on"
|
||||||
|
msgstr "创建时间"
|
||||||
|
|
||||||
|
#. module: app_stock_picking_type_group
|
||||||
|
#: model:ir.model.fields,field_description:app_stock_picking_type_group.field_stock_picking_type_group_display_name
|
||||||
|
msgid "Display Name"
|
||||||
|
msgstr "显示名称"
|
||||||
|
|
||||||
|
#. module: app_stock_picking_type_group
|
||||||
|
#: model:ir.ui.view,arch_db:app_stock_picking_type_group.app_view_pickingtype_filter
|
||||||
|
msgid "Group By"
|
||||||
|
msgstr "分组"
|
||||||
|
|
||||||
|
#. module: app_stock_picking_type_group
|
||||||
|
#: model:ir.model,name:app_stock_picking_type_group.model_stock_picking_type_group
|
||||||
|
msgid "Group the picking view"
|
||||||
|
msgstr "作业类型分组"
|
||||||
|
|
||||||
|
#. module: app_stock_picking_type_group
|
||||||
|
#: model:ir.model.fields,field_description:app_stock_picking_type_group.field_stock_picking_type_group_id
|
||||||
|
msgid "ID"
|
||||||
|
msgstr "ID"
|
||||||
|
|
||||||
|
#. module: app_stock_picking_type_group
|
||||||
|
#: model:ir.model.fields,field_description:app_stock_picking_type_group.field_stock_picking_type_group___last_update
|
||||||
|
msgid "Last Modified on"
|
||||||
|
msgstr "最后修改时间"
|
||||||
|
|
||||||
|
#. module: app_stock_picking_type_group
|
||||||
|
#: model:ir.model.fields,field_description:app_stock_picking_type_group.field_stock_picking_type_group_write_uid
|
||||||
|
msgid "Last Updated by"
|
||||||
|
msgstr "最后更新者"
|
||||||
|
|
||||||
|
#. module: app_stock_picking_type_group
|
||||||
|
#: model:ir.model.fields,field_description:app_stock_picking_type_group.field_stock_picking_type_group_write_date
|
||||||
|
msgid "Last Updated on"
|
||||||
|
msgstr "最后更新时间"
|
||||||
|
|
||||||
|
#. module: app_stock_picking_type_group
|
||||||
|
#: model:stock.picking.type.group,name:app_stock_picking_type_group.stock_picking_type_group_mrp
|
||||||
|
msgid "Manufacturing"
|
||||||
|
msgstr "制造组"
|
||||||
|
|
||||||
|
#. module: app_stock_picking_type_group
|
||||||
|
#: model:ir.model.fields,field_description:app_stock_picking_type_group.field_stock_picking_type_picking_type_group_id
|
||||||
|
#: model:ir.ui.view,arch_db:app_stock_picking_type_group.app_view_pickingtype_filter
|
||||||
|
msgid "Picking Type Group"
|
||||||
|
msgstr "作业类型分组"
|
||||||
|
|
||||||
|
#. module: app_stock_picking_type_group
|
||||||
|
#: model:ir.model.fields,field_description:app_stock_picking_type_group.field_stock_picking_type_group_name
|
||||||
|
msgid "Picking Type Group Name"
|
||||||
|
msgstr "分组名称"
|
||||||
|
|
||||||
|
#. module: app_stock_picking_type_group
|
||||||
|
#: model:ir.ui.menu,name:app_stock_picking_type_group.menu_pickingtype_group
|
||||||
|
#: model:ir.ui.view,arch_db:app_stock_picking_type_group.app_view_picking_type_group_form
|
||||||
|
#: model:ir.ui.view,arch_db:app_stock_picking_type_group.app_view_picking_type_group_tree
|
||||||
|
msgid "Picking Types Group"
|
||||||
|
msgstr "作业类型分组"
|
||||||
|
|
||||||
|
#. module: app_stock_picking_type_group
|
||||||
|
#: model:stock.picking.type.group,name:app_stock_picking_type_group.stock_picking_type_group_purchase
|
||||||
|
msgid "Purchase"
|
||||||
|
msgstr "采购组"
|
||||||
|
|
||||||
|
#. module: app_stock_picking_type_group
|
||||||
|
#: model:stock.picking.type.group,name:app_stock_picking_type_group.stock_picking_type_group_sale
|
||||||
|
msgid "Sales"
|
||||||
|
msgstr "销售组"
|
||||||
|
|
||||||
|
#. module: app_stock_picking_type_group
|
||||||
|
#: model:ir.model.fields,field_description:app_stock_picking_type_group.field_stock_picking_type_group_sequence
|
||||||
|
msgid "Sequence"
|
||||||
|
msgstr "序列"
|
||||||
|
|
||||||
|
#. module: app_stock_picking_type_group
|
||||||
|
#: model:stock.picking.type.group,name:app_stock_picking_type_group.stock_picking_type_group_stock
|
||||||
|
msgid "Stock"
|
||||||
|
msgstr "库存组"
|
||||||
|
|
||||||
|
#. module: app_stock_picking_type_group
|
||||||
|
#: model:ir.model,name:app_stock_picking_type_group.model_stock_picking_type
|
||||||
|
msgid "The operation type determines the picking view"
|
||||||
|
msgstr "操作类型决定分拣视图"
|
||||||
|
|
||||||
|
#. module: app_stock_picking_type_group
|
||||||
|
#: model:ir.model.fields,help:app_stock_picking_type_group.field_stock_picking_type_group_sequence
|
||||||
|
msgid "Used to order the 'All Operations' kanban view"
|
||||||
|
msgstr "用于订购“所有作业”看板视图"
|
||||||
|
|
||||||
|
#. module: app_stock_picking_type_group
|
||||||
|
#: model:ir.ui.view,arch_db:app_stock_picking_type_group.app_view_pickingtype_filter
|
||||||
|
msgid "Warehouse"
|
||||||
|
msgstr "仓库"
|
||||||
|
|
||||||
1
app_stock_picking_type_group/ir/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
4
app_stock_picking_type_group/models/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from . import stock_picking_type_group
|
||||||
|
from . import stock_picking_type
|
||||||
11
app_stock_picking_type_group/models/stock_picking_type.py
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from odoo import api, fields, models, _
|
||||||
|
from odoo.exceptions import UserError
|
||||||
|
|
||||||
|
|
||||||
|
class PickingType(models.Model):
|
||||||
|
_inherit = "stock.picking.type"
|
||||||
|
|
||||||
|
picking_type_group_id = fields.Many2one('stock.picking.type.group', 'Picking Type Group')
|
||||||
|
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||||
|
|
||||||
|
from collections import namedtuple
|
||||||
|
import json
|
||||||
|
import time
|
||||||
|
|
||||||
|
from odoo import api, fields, models, _
|
||||||
|
from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT
|
||||||
|
from odoo.exceptions import UserError
|
||||||
|
|
||||||
|
|
||||||
|
class PickingTypeGroup(models.Model):
|
||||||
|
_name = "stock.picking.type.group"
|
||||||
|
_description = "Group the picking view"
|
||||||
|
_order = 'sequence, id'
|
||||||
|
|
||||||
|
name = fields.Char('Picking Type Group Name', required=True, translate=True)
|
||||||
|
color = fields.Integer('Color')
|
||||||
|
sequence = fields.Integer('Sequence', help="Used to order the 'All Operations' kanban view")
|
||||||
|
active = fields.Boolean('Active', default=True)
|
||||||
2
app_stock_picking_type_group/report/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
1
app_stock_picking_type_group/res/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||||
|
access_stock_picking_type_group_all,stock.picking.type.group all users,model_stock_picking_type_group,base.group_user,1,0,0,0
|
||||||
|
access_stock_picking_type_group_user,stock.picking.type.group user,model_stock_picking_type_group,stock.group_stock_user,1,0,0,0
|
||||||
|
access_stock_picking_type_group_manager,stock.picking.type.group manager,model_stock_picking_type_group,stock.group_stock_manager,1,1,1,1
|
||||||
|
BIN
app_stock_picking_type_group/static/description/demo1.jpg
Normal file
|
After Width: | Height: | Size: 60 KiB |
BIN
app_stock_picking_type_group/static/description/demo2.jpg
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
app_stock_picking_type_group/static/description/demo4.jpg
Normal file
|
After Width: | Height: | Size: 60 KiB |
BIN
app_stock_picking_type_group/static/description/icon.png
Normal file
|
After Width: | Height: | Size: 88 KiB |
71
app_stock_picking_type_group/static/description/index.html
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
<section class="oe_container">
|
||||||
|
<div class="oe_row oe_spaced" style="max-width: 95%;">
|
||||||
|
<div class="oe_span12">
|
||||||
|
<h2 class="oe_slogan">App stock picking type group </h2>
|
||||||
|
<div class="oe_demo" style=" margin: 30px auto 0; padding: 0 15px 0 0; border:none; width: 96%;">
|
||||||
|
<p>This moduld allows user to . </p>
|
||||||
|
<h1>More Powerful addons:
|
||||||
|
<a class="btn btn-primary mb16" href="http://www.odoo.com/apps/modules/browse?author=Sunpop.cn">Supop.cn Odoo Addons</a>
|
||||||
|
</h1>
|
||||||
|
<br>
|
||||||
|
<h3>Lastest update: v10.0.3.27, 2018-03-27</h3>
|
||||||
|
<ul>
|
||||||
|
<li>1. Manager picking type groups</li>
|
||||||
|
<li>2. Group by picking type groups in stock dashboard</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="oe_demo oe_screenshot">
|
||||||
|
<h3>Base setup: </h3>
|
||||||
|
<ul>
|
||||||
|
<li>1. Go to Inventory->Configuration->Warehouse Management</li>
|
||||||
|
<li>2. Set Picking Type Group for the certain type</li>
|
||||||
|
</ul>
|
||||||
|
<img src="setup.jpg" style="border:1px solid black"/>
|
||||||
|
<br/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="oe_demo oe_screenshot">
|
||||||
|
<h3>After setup, the view would look like:</h3>
|
||||||
|
<img src="demo1.jpg" style="border:1px solid black"/>
|
||||||
|
<br/>
|
||||||
|
</div>
|
||||||
|
<div class="oe_demo oe_screenshot mt32">
|
||||||
|
<img src="demo2.jpg" style="border:1px solid black"/>
|
||||||
|
<br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
BIN
app_stock_picking_type_group/static/description/setup.jpg
Normal file
|
After Width: | Height: | Size: 94 KiB |
@@ -0,0 +1,55 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
<record model="ir.ui.view" id="app_view_picking_type_group_tree">
|
||||||
|
<field name="name">Picking types group</field>
|
||||||
|
<field name="model">stock.picking.type.group</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<tree string="Picking Types Group">
|
||||||
|
<field name="sequence" widget="handle"/>
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="active" invisible="1"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record model="ir.ui.view" id="app_view_picking_type_group_form">
|
||||||
|
<field name="name">Picking types group</field>
|
||||||
|
<field name="model">stock.picking.type.group</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form string="Picking Types Group">
|
||||||
|
<sheet>
|
||||||
|
<div class="oe_button_box" name="button_box">
|
||||||
|
<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive">
|
||||||
|
<field name="active" widget="boolean_button" options='{"terminology": "archive"}'/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<group>
|
||||||
|
<group>
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="sequence"/>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
</sheet>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="action_picking_type_group_list" model="ir.actions.act_window">
|
||||||
|
<field name="name">All Picking Types Group</field>
|
||||||
|
<field name="res_model">stock.picking.type.group</field>
|
||||||
|
<field name="type">ir.actions.act_window</field>
|
||||||
|
<field name="view_type">form</field>
|
||||||
|
<field name="view_mode">list,form</field>
|
||||||
|
<field name="help" type="html">
|
||||||
|
<p class="oe_view_nocontent_create">
|
||||||
|
Click to define a new picking type group.
|
||||||
|
</p>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<menuitem id="menu_pickingtype_group" name="Picking Types Group" parent="stock.menu_warehouse_config" action="action_picking_type_group_list" sequence="4"
|
||||||
|
groups="stock.group_stock_multi_locations"/>
|
||||||
|
</odoo>
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
<record id="app_view_pickingtype_filter" model="ir.ui.view">
|
||||||
|
<field name="name">stock.picking.type.filter</field>
|
||||||
|
<field name="model">stock.picking.type</field>
|
||||||
|
<field name="inherit_id" ref="stock.view_pickingtype_filter"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//group" position="inside">
|
||||||
|
<filter name="groupby_picking_type_group_id" string="Picking Type Group" context="{'group_by':'picking_type_group_id'}"/>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record model="ir.ui.view" id="app_view_picking_type_tree">
|
||||||
|
<field name="name">Picking types</field>
|
||||||
|
<field name="model">stock.picking.type</field>
|
||||||
|
<field name="inherit_id" ref="stock.view_picking_type_tree"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//tree" position="inside">
|
||||||
|
<field name="picking_type_group_id"/>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record model="ir.ui.view" id="app_view_picking_type_form">
|
||||||
|
<field name="name">Operation Types</field>
|
||||||
|
<field name="model">stock.picking.type</field>
|
||||||
|
<field name="inherit_id" ref="stock.view_picking_type_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//field[@name='warehouse_id']" position="after">
|
||||||
|
<field name="picking_type_group_id"/>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="stock.stock_picking_type_action" model="ir.actions.act_window">
|
||||||
|
<field name="context">{"search_default_groupby_picking_type_group_id":1}</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!--<record id="app_stock_picking_type_kanban" model="ir.ui.view">-->
|
||||||
|
<!--<field name="name">app.stock.picking.type.kanban</field>-->
|
||||||
|
<!--<field name="model">stock.picking.type</field>-->
|
||||||
|
<!--<field name="inherit_id" ref="stock.stock_picking_type_kanban"/>-->
|
||||||
|
<!--<field name="arch" type="xml">-->
|
||||||
|
<!--<xpath expr="//kanban" position="attributes">-->
|
||||||
|
<!--<attribute name="group_create">0</attribute>-->
|
||||||
|
<!--<attribute name="group_edit">0</attribute>-->
|
||||||
|
<!--<attribute name="group_delete">0</attribute>-->
|
||||||
|
<!--<attribute name="quick_create">0</attribute>-->
|
||||||
|
<!--</xpath>-->
|
||||||
|
<!--<xpath expr="//field[@name='warehouse_id']" position="attributes">-->
|
||||||
|
<!--<attribute name="invisible">1</attribute>-->
|
||||||
|
<!--</xpath>-->
|
||||||
|
<!--</field>-->
|
||||||
|
<!--</record>-->
|
||||||
|
|
||||||
|
</odoo>
|
||||||
4
app_stock_superbar/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from . import models
|
||||||
|
from .hooks import post_init_hook
|
||||||
61
app_stock_superbar/__manifest__.py
Normal 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': "Stock Superbar ztree, parent children tree",
|
||||||
|
'version': '12.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.gif'],
|
||||||
|
'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_superbar/hooks.py
Normal 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("")
|
||||||
14
app_stock_superbar/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_stock_superbar/models/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
2
app_stock_superbar/report/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
BIN
app_stock_superbar/static/description/banner.gif
Normal file
|
After Width: | Height: | Size: 3.0 MiB |
BIN
app_stock_superbar/static/description/demo1.jpg
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
app_stock_superbar/static/description/demo11.jpg
Normal file
|
After Width: | Height: | Size: 100 KiB |
BIN
app_stock_superbar/static/description/demo12.jpg
Normal file
|
After Width: | Height: | Size: 98 KiB |
BIN
app_stock_superbar/static/description/demo2.jpg
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
app_stock_superbar/static/description/demo3.jpg
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
app_stock_superbar/static/description/demo4.jpg
Normal file
|
After Width: | Height: | Size: 60 KiB |
BIN
app_stock_superbar/static/description/demo5.jpg
Normal file
|
After Width: | Height: | Size: 62 KiB |
BIN
app_stock_superbar/static/description/icon.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
181
app_stock_superbar/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 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/12.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/12.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/12.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/12.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> </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>
|
||||||
|
|
||||||
BIN
app_stock_superbar/static/description/setup1.jpg
Normal file
|
After Width: | Height: | Size: 47 KiB |
BIN
app_stock_superbar/static/img/icon_sunpop.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
app_stock_superbar/static/img/logo_sunpop.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
18
app_stock_superbar/views/stock_views.xml
Normal 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>
|
||||||