update app_customize, add auto_sub

This commit is contained in:
ivan deng
2018-01-10 20:09:17 +08:00
parent 44277a12b7
commit 6cc515a91f
14 changed files with 143 additions and 32 deletions

View File

@@ -44,6 +44,8 @@ You can config odoo, make it look like your own platform.
13. Change Powered by Odoo in login screen.(Please change '../views/app_odoo_customize_view.xml' #15)
14. Quick delete test data in Apps: Sales/POS/Purchase/MRP/Inventory/Accounting/Message/Workflow etc.
15. Reset All the Sequence to beginning of 1: SO/PO/MO/Invoice...
16. Fix odoo reload module translation bug while enable english language
17. Stop Odoo Auto Subscribe(Performance Improve)
This module can help to white label the Odoo.
Also helpful for training and support for your odoo end-user.
@@ -51,7 +53,7 @@ The user can get the help document just by one click.
""",
'images': ['static/description/banner.png'],
'depends': ['web'],
'depends': ['web','mail'],
'data': [
'views/app_odoo_customize_view.xml',
'views/app_theme_config_settings_view.xml',

View File

@@ -42,6 +42,10 @@
<field name="key">app_show_poweredby</field>
<field name="value">False</field>
</record>
<record id="app_stop_subscribe" model="ir.config_parameter">
<field name="key">app_stop_subscribe</field>
<field name="value">False</field>
</record>
<record id="app_documentation_url" model="ir.config_parameter">
<field name="key">app_documentation_url</field>

View File

@@ -4,10 +4,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0+e-20171014\n"
"Project-Id-Version: Odoo Server 10.0+e-20171107\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-19 20:57+0000\n"
"PO-Revision-Date: 2017-12-19 20:57+0000\n"
"POT-Creation-Date: 2018-01-10 11:41+0000\n"
"PO-Revision-Date: 2018-01-10 11:41+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -54,10 +54,15 @@ msgstr "基础模型数据"
msgid "Cancel"
msgstr "取消"
#. module: app_odoo_customize
#: model:ir.model.fields,help:app_odoo_customize.field_app_theme_config_settings_app_stop_subscribe
msgid "Check to stop Odoo Subscribe function"
msgstr "Check to stop Odoo Subscribe function"
#. module: app_odoo_customize
#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_create_uid
msgid "Created by"
msgstr "创建"
msgstr "创建"
#. module: app_odoo_customize
#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_create_date
@@ -151,7 +156,12 @@ msgstr "显示名称"
#. module: app_odoo_customize
#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_documentation_url
msgid "Documentation Url"
msgstr "文档链接"
msgstr "用户手册链接"
#. module: app_odoo_customize
#: model:ir.model,name:app_odoo_customize.model_mail_thread
msgid "Email Thread"
msgstr "Email线程"
#. module: app_odoo_customize
#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_id
@@ -166,7 +176,7 @@ msgstr "安装语言"
#. module: app_odoo_customize
#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings
msgid "Inventory"
msgstr "库"
msgstr "库"
#. module: app_odoo_customize
#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings
@@ -283,6 +293,11 @@ msgstr "显示分享Odoo"
msgid "Show Support"
msgstr "显示支持"
#. module: app_odoo_customize
#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_stop_subscribe
msgid "Stop Odoo Subscribe(Performance Improve)"
msgstr "停用Odoo自动订阅(提高性能)"
#. module: app_odoo_customize
#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_support_url
msgid "Support Url"
@@ -297,17 +312,17 @@ msgstr "系统名称"
#. module: app_odoo_customize
#: model:ir.model.fields,help:app_odoo_customize.field_app_theme_config_settings_app_show_enterprise
msgid "Uncheck to hide the Enterprise tag"
msgstr "不勾选则不显示企业版标签"
msgstr "Uncheck to hide the Enterprise tag"
#. module: app_odoo_customize
#: model:ir.model.fields,help:app_odoo_customize.field_app_theme_config_settings_app_show_share
msgid "Uncheck to hide the Odoo Share Dashboard"
msgstr "不勾选则不显示odoo分享"
msgstr "Uncheck to hide the Odoo Share Dashboard"
#. module: app_odoo_customize
#: model:ir.model.fields,help:app_odoo_customize.field_app_theme_config_settings_app_show_poweredby
msgid "Uncheck to hide the Powered by text"
msgstr "不勾选则不显示Powered by字样"
msgstr "不勾选则不显示Odoo Powered by"
#. module: app_odoo_customize
#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings
@@ -357,7 +372,7 @@ msgstr "启用后,会显示快速调试菜单"
#. module: app_odoo_customize
#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings
msgid "White Label Setting"
msgstr "个性化Odoo设置"
msgstr "个性化odoo设置"
#. module: app_odoo_customize
#: model:ir.model,name:app_odoo_customize.model_ir_ui_view
@@ -367,8 +382,8 @@ msgstr "ir.ui.view"
#. module: app_odoo_customize
#: model:ir.actions.act_window,name:app_odoo_customize.action_app_theme_config
#: model:ir.ui.menu,name:app_odoo_customize.menu_app_theme_config
msgid "odoo Customize"
msgstr "odoo 定制"
msgid "odooApp Customize"
msgstr "odooApp 定制"
#. module: app_odoo_customize
#: model:ir.ui.menu,name:app_odoo_customize.menu_app_group

View File

@@ -3,3 +3,4 @@
import ir_ui_view
import app_theme_config_settings
import base_language_install
import mail_thread

View File

@@ -24,6 +24,7 @@ class AppThemeConfigSettings(models.TransientModel):
app_show_enterprise = fields.Boolean('Show Enterprise Tag', help=u"Uncheck to hide the Enterprise tag")
app_show_share = fields.Boolean('Show Share Dashboard', help=u"Uncheck to hide the Odoo Share Dashboard")
app_show_poweredby = fields.Boolean('Show Powered by Odoo', help=u"Uncheck to hide the Powered by text")
app_stop_subscribe = fields.Boolean('Stop Odoo Subscribe(Performance Improve)', help=u"Check to stop Odoo Subscribe function")
app_documentation_url = fields.Char('Documentation Url')
app_documentation_dev_url = fields.Char('Developer Documentation Url')
@@ -45,6 +46,7 @@ class AppThemeConfigSettings(models.TransientModel):
app_show_enterprise = True if ir_config.get_param('app_show_enterprise') == "True" else False
app_show_share = True if ir_config.get_param('app_show_share') == "True" else False
app_show_poweredby = True if ir_config.get_param('app_show_poweredby') == "True" else False
app_stop_subscribe = True if ir_config.get_param('app_stop_subscribe') == "True" else False
app_documentation_url = ir_config.get_param('app_documentation_url',
default='http://www.sunpop.cn/documentation/user/10.0/en/index.html')
@@ -64,6 +66,8 @@ class AppThemeConfigSettings(models.TransientModel):
app_show_enterprise=app_show_enterprise,
app_show_share=app_show_share,
app_show_poweredby=app_show_poweredby,
app_stop_subscribe=app_stop_subscribe,
app_documentation_url=app_documentation_url,
app_documentation_dev_url=app_documentation_dev_url,
app_support_url=app_support_url,
@@ -85,6 +89,7 @@ class AppThemeConfigSettings(models.TransientModel):
ir_config.set_param("app_show_enterprise", self.app_show_enterprise or "False")
ir_config.set_param("app_show_share", self.app_show_share or "False")
ir_config.set_param("app_show_poweredby", self.app_show_poweredby or "False")
ir_config.set_param("app_stop_subscribe", self.app_stop_subscribe or "False")
ir_config.set_param("app_documentation_url",
self.app_documentation_url or "http://www.sunpop.cn/documentation/user/10.0/en/index.html")

View File

@@ -0,0 +1,39 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Jarvis (www.odoomod.com)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo import api, fields, models, _
class MailThread(models.AbstractModel):
_inherit = "mail.thread"
@api.multi
def message_subscribe(self, partner_ids=None, channel_ids=None, subtype_ids=None, force=True):
""" 停用订阅功能. """
ir_config = self.env['ir.config_parameter']
app_stop_subscribe = True if ir_config.get_param('app_stop_subscribe') == "True" else False
if app_stop_subscribe:
return
else:
return super(MailThread, self).message_subscribe(partner_ids, channel_ids, subtype_ids, force)
@api.multi
def message_auto_subscribe(self, updated_fields, values=None):
""" 停用订阅功能. """
ir_config = self.env['ir.config_parameter']
app_stop_subscribe = True if ir_config.get_param('app_stop_subscribe') == "True" else False
if app_stop_subscribe:
return
else:
return super(MailThread, self).message_auto_subscribe(updated_fields, values)
@api.multi
def _message_auto_subscribe_notify(self, partner_ids):
""" 停用订阅功能. """
ir_config = self.env['ir.config_parameter']
app_stop_subscribe = True if ir_config.get_param('app_stop_subscribe') == "True" else False
if app_stop_subscribe:
return
else:
return super(MailThread, self)._message_auto_subscribe_notify(partner_ids)

View File

@@ -0,0 +1,39 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Jarvis (www.odoomod.com)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo import api, fields, models, _
class MailThread(models.AbstractModel):
_inherit = "mail.thread"
@api.multi
def message_subscribe(self, partner_ids=None, channel_ids=None, subtype_ids=None, force=True):
""" 停用订阅功能. """
ir_config = self.env['ir.config_parameter']
app_stop_subscribe = True if ir_config.get_param('app_stop_subscribe') == "True" else False
if app_stop_subscribe:
return
else:
return super(MailThread, self).message_subscribe(partner_ids, channel_ids, subtype_ids, force)
@api.multi
def message_auto_subscribe(self, updated_fields, values=None):
""" 停用订阅功能. """
ir_config = self.env['ir.config_parameter']
app_stop_subscribe = True if ir_config.get_param('app_stop_subscribe') == "True" else False
if app_stop_subscribe:
return
else:
return super(MailThread, self).message_auto_subscribe(updated_fields, values)
@api.multi
def _message_auto_subscribe_notify(self, partner_ids):
""" 停用订阅功能. """
ir_config = self.env['ir.config_parameter']
app_stop_subscribe = True if ir_config.get_param('app_stop_subscribe') == "True" else False
if app_stop_subscribe:
return
else:
return super(MailThread, self)._message_auto_subscribe_notify(partner_ids)

View File

@@ -18,6 +18,7 @@ You can config odoo, make it look like your own platform.
14. Quick delete test data in Apps: Sales/POS/Purchase/MRP/Inventory/Accounting/Message/Workflow etc.
15. Reset All the Sequence to beginning of 1: SO/PO/MO/Invoice...
16. Fix odoo reload module translation bug while enable english language
17. Stop Odoo Auto Subscribe(Performance Improve)
This module can help to white label the Odoo.
Also helpful for training and support for your odoo end-user.
The user can get the help document just by one click.
@@ -42,7 +43,8 @@ http://www.sunpop.cn
13. 自定义登陆界面中的 Powered by Odoo
14. 快速删除测试数据,支持模块包括:销售/POS门店/采购/生产/库存/会计/消息与工作流等.
15. 将各类单据的序号重置从1开始包括SO/PO/MO/Invoice 等
16. 修复odoo启用英文后模块显示的Bug
16. 修复odoo启用英文后模块显示中文的Bug
17. 可停用odoo自动订阅功能避免“同样对象关注2次”bug同时提升性能
使用方法:将解压后的 app_odoo_customize 放到 odoo的 addons目录下激活开发者模式应用-->更新应用列表,
找到 "App odoo Customize"模块,安装即可。

View File

@@ -22,8 +22,8 @@
<li>13. Change Powered by Odoo in login screen.(Please change '../views/app_odoo_customize_view.xml' #15)</li>
<li>14. Quick delete test data in Apps: Sales/POS/Purchase/MRP/Inventory/Accounting/Base Models.</li>
<li>15. Reset All the Sequence to beginning of 1: SO/PO/MO/Invoice...</li>
<li>16.Fix odoo reload module translation bug while enable english language
</li>
<li>16. Fix odoo reload module translation bug while enable english language</li>
<li>17. Stop Odoo Auto Subscribe(Performance Improve)</li>
</ul>
<p>
This module can help to white label the Odoo.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

@@ -60,6 +60,10 @@
<field name="app_show_poweredby"/>
<label for="app_show_poweredby"/>
</div>
<div>
<field name="app_stop_subscribe"/>
<label for="app_stop_subscribe"/>
</div>
</div>
</group>
<group string="User Menu Content">
@@ -137,7 +141,7 @@
</record>
<record id="action_app_theme_config" model="ir.actions.act_window">
<field name="name">odoo Customize</field>
<field name="name">odooApp Customize</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">app.theme.config.settings</field>
<field name="view_mode">form</field>