diff --git a/app_odoo_customize/__openerp__.py b/app_odoo_customize/__openerp__.py index 27839de3..62dd5a59 100644 --- a/app_odoo_customize/__openerp__.py +++ b/app_odoo_customize/__openerp__.py @@ -29,19 +29,21 @@ App Odoo Customize(Debranding Title,Language,Documentation,Quick Debug) ============ White label odoo. You can config odoo, make it look like your own platform. -1.Deletes Odoo label in footer -2.Replaces "Odoo" in Windows title -3.Customize Documentation, Support, About links and title in usermenu -4.Adds "Developer mode" link to the top right-hand User Menu. -5.Adds Quick Language Switcher to the top right-hand User Menu. -6.Adds Country flags to the top right-hand User Menu. -7.Adds English and Chinese user documentation access to the top right-hand User Menu. -8.Adds developer documentation access to the top right-hand User Menu. -9.Customize "My odoo.com account" button -10.Standalone setting panel, easy to setup. -11.Provide 236 country flags. -12.Multi-language Support. -13.Change Powered by Odoo in login screen.(Please change '../views/app_odoo_customize_view.xml' #15) +1. Deletes Odoo label in footer +2. Replaces "Odoo" in Windows title +3. Customize Documentation, Support, About links and title in usermenu +4. Adds "Developer mode" link to the top right-hand User Menu. +5. Adds Quick Language Switcher to the top right-hand User Menu. +6. Adds Country flags to the top right-hand User Menu. +7. Adds English and Chinese user documentation access to the top right-hand User Menu. +8. Adds developer documentation access to the top right-hand User Menu. +9. Customize "My odoo.com account" button +10. Standalone setting panel, easy to setup. +11. Provide 236 country flags. +12. Multi-language Support. +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... This module can help to white label the Odoo. Also helpful for training and support for your odoo end-user. diff --git a/app_odoo_customize/i18n/zh_CN.po b/app_odoo_customize/i18n/zh_CN.po index ce4ae5d2..0da47293 100644 --- a/app_odoo_customize/i18n/zh_CN.po +++ b/app_odoo_customize/i18n/zh_CN.po @@ -4,10 +4,10 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 10.0+e-20171107\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-09-14 18:53+0000\n" -"PO-Revision-Date: 2017-09-14 18:53+0000\n" +"POT-Creation-Date: 2017-11-15 22:58+0000\n" +"PO-Revision-Date: 2017-11-15 22:58+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -15,6 +15,11 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. module: app_odoo_customize +#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings +msgid "Accounting" +msgstr "会计" + #. module: app_odoo_customize #. openerp-web #: code:addons/app_odoo_customize/static/src/xml/customize_user_menu.xml:7 @@ -39,11 +44,31 @@ msgstr "App Odoo 自定义设置" msgid "Apply" msgstr "应用" +#. module: app_odoo_customize +#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings +msgid "Base Models" +msgstr "基础模型数据" + #. module: app_odoo_customize #: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings msgid "Cancel" msgstr "取消" +#. module: app_odoo_customize +#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_create_uid +msgid "Created by" +msgstr "创建人" + +#. module: app_odoo_customize +#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_create_date +msgid "Created on" +msgstr "创建时间" + +#. module: app_odoo_customize +#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings +msgid "Data Clearing (Be careful to do that!)" +msgstr "数据清理(请谨慎操作!)" + #. module: app_odoo_customize #. openerp-web #: code:addons/app_odoo_customize/static/src/xml/customize_user_menu.xml:13 @@ -51,6 +76,66 @@ msgstr "取消" msgid "Deactivate the developer mode" msgstr "取消激活开发者模式" +#. module: app_odoo_customize +#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings +msgid "Delete All BOM" +msgstr "删除所有物料清单" + +#. module: app_odoo_customize +#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings +msgid "Delete All Manufacturing Order" +msgstr "删除所有生产单" + +#. module: app_odoo_customize +#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings +msgid "Delete All Message" +msgstr "删除所有消息" + +#. module: app_odoo_customize +#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings +msgid "Delete All Move/Picking/Package/Lot" +msgstr "删除所有库存调拨/拣货/包装/批次数据" + +#. module: app_odoo_customize +#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings +msgid "Delete All POS Order" +msgstr "删除所有POS订单" + +#. module: app_odoo_customize +#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings +msgid "Delete All Product" +msgstr "删除所有产品及变体" + +#. module: app_odoo_customize +#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings +msgid "Delete All Product Attribute" +msgstr "删除所有产品属性" + +#. module: app_odoo_customize +#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings +msgid "Delete All Purchase Order" +msgstr "删除所有采购单" + +#. module: app_odoo_customize +#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings +msgid "Delete All Sales Order" +msgstr "删除所有报价单、销售单" + +#. module: app_odoo_customize +#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings +msgid "Delete All Voucher/Invoice/Bill" +msgstr "删除所有收据/发票/账单" + +#. module: app_odoo_customize +#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings +msgid "Delete All Workflow" +msgstr "删除所有工作流" + +#. module: app_odoo_customize +#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_documentation_dev_url +msgid "Developer Documentation Url" +msgstr "开发者手册链接" + #. module: app_odoo_customize #. openerp-web #: code:addons/app_odoo_customize/static/src/xml/customize_user_menu.xml:16 @@ -58,32 +143,167 @@ msgstr "取消激活开发者模式" msgid "Developer Manual" msgstr "开发者手册" +#. module: app_odoo_customize +#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_display_name +msgid "Display Name" +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 "用户手册链接" + +#. module: app_odoo_customize +#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_id +msgid "ID" +msgstr "ID" + +#. module: app_odoo_customize +#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings +msgid "Inventory" +msgstr "库存" + #. module: app_odoo_customize #: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings msgid "Item to Show" msgstr "显示/隐藏菜单项" +#. module: app_odoo_customize +#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings___last_update +msgid "Last Modified on" +msgstr "最后修改日" + +#. module: app_odoo_customize +#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_write_uid +msgid "Last Updated by" +msgstr "最后更新人" + +#. module: app_odoo_customize +#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_write_date +msgid "Last Updated on" +msgstr "最后更新时间" + +#. module: app_odoo_customize +#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings +msgid "MRP" +msgstr "生产" + +#. module: app_odoo_customize +#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_account_title +msgid "My Odoo.com Account Title" +msgstr "我的帐户显示标题" + +#. module: app_odoo_customize +#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_account_url +msgid "My Odoo.com Account Url" +msgstr "我的帐户链接" + #. module: app_odoo_customize #: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings msgid "Online Support" msgstr "系统支持" +#. module: app_odoo_customize +#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings +msgid "POS" +msgstr "POS门店" + +#. module: app_odoo_customize +#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings +msgid "Please confirm to delete the select data?" +msgstr "确认删除指定数据?" + #. module: app_odoo_customize #: model:ir.ui.view,arch_db:app_odoo_customize.replace_login msgid "Powered by odooApp" msgstr "技术支持 odooApp" +#. module: app_odoo_customize +#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings +msgid "Purchase" +msgstr "采购" + +#. module: app_odoo_customize +#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings +msgid "Sales" +msgstr "销售" + #. module: app_odoo_customize #: model:ir.model.fields,help:app_odoo_customize.field_app_theme_config_settings_app_system_name msgid "Setup System Name,which replace Odoo" msgstr "设置系统名称,取代Odoo" +#. module: app_odoo_customize +#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_show_documentation_dev +msgid "Show Developer Documentation" +msgstr "显示开发者文档" + +#. module: app_odoo_customize +#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_show_documentation +msgid "Show Documentation" +msgstr "显示文档" + +#. module: app_odoo_customize +#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_show_enterprise +msgid "Show Enterprise Tag" +msgstr "显示升级企业版标签提醒" + +#. module: app_odoo_customize +#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_show_account +msgid "Show My Account" +msgstr "显示我的帐户" + +#. module: app_odoo_customize +#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_show_poweredby +msgid "Show Powered by Odoo" +msgstr "显示Powered by Odoo" + +#. module: app_odoo_customize +#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_show_debug +msgid "Show Quick Debug" +msgstr "显示快速调试" + +#. module: app_odoo_customize +#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_show_lang +msgid "Show Quick Language Switcher" +msgstr "显示快速多语言切换" + +#. module: app_odoo_customize +#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_show_share +msgid "Show Share Dashboard" +msgstr "显示分享Odoo" + +#. module: app_odoo_customize +#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_show_support +msgid "Show Support" +msgstr "显示支持" + +#. module: app_odoo_customize +#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_support_url +msgid "Support Url" +msgstr "支持链接" + #. module: app_odoo_customize #: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_system_name #: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings msgid "System Name" 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 "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 "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 "Uncheck to hide the Powered by text" + #. module: app_odoo_customize #: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings msgid "User Menu" @@ -99,11 +319,46 @@ msgstr "菜单项具体操作设置" msgid "Visit our website for more apps and Support. http://www.sunpop.cn" msgstr "请访问我们的网站获取更多支持. http://www.sunpop.cn" +#. module: app_odoo_customize +#: model:ir.model.fields,help:app_odoo_customize.field_app_theme_config_settings_app_show_account +msgid "When enable,User can login to your website" +msgstr "When enable,User can login to your website" + +#. module: app_odoo_customize +#: model:ir.model.fields,help:app_odoo_customize.field_app_theme_config_settings_app_show_lang +msgid "When enable,User can quick switch language in user menu" +msgstr "When enable,User can quick switch language in user menu" + +#. module: app_odoo_customize +#: model:ir.model.fields,help:app_odoo_customize.field_app_theme_config_settings_app_show_documentation_dev +msgid "When enable,User can visit development documentation" +msgstr "When enable,User can visit development documentation" + +#. module: app_odoo_customize +#: model:ir.model.fields,help:app_odoo_customize.field_app_theme_config_settings_app_show_documentation +msgid "When enable,User can visit user manual" +msgstr "When enable,User can visit user manual" + +#. module: app_odoo_customize +#: model:ir.model.fields,help:app_odoo_customize.field_app_theme_config_settings_app_show_support +msgid "When enable,User can vist your support site" +msgstr "When enable,User can vist your support site" + +#. module: app_odoo_customize +#: model:ir.model.fields,help:app_odoo_customize.field_app_theme_config_settings_app_show_debug +msgid "When enable,everyone login can see the debug menu" +msgstr "When enable,everyone login can see the debug menu" + #. module: app_odoo_customize #: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings msgid "White Label Setting" msgstr "个性化Odoo设置" +#. module: app_odoo_customize +#: model:ir.model,name:app_odoo_customize.model_ir_ui_view +msgid "ir.ui.view" +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 @@ -111,198 +366,3 @@ msgstr "个性化Odoo设置" msgid "odooApp Settings" msgstr "odooApp 设置" -#. module: app_odoo_customize -#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_show_lang -msgid "Show Quick Language Switcher" -msgstr "显示快速多语言切换" - -#. module: app_odoo_customize -#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_show_debug -msgid "Show Quick Debug" -msgstr "显示快速调试" - -#. module: app_odoo_customize -#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_show_documentation -msgid "Show Documentation" -msgstr "显示文档" - -#. module: app_odoo_customize -#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_show_documentation_dev -msgid "Show Developer Documentation" -msgstr "显示开发者文档" - -#. module: app_odoo_customize -#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_show_support -msgid "Show Support" -msgstr "显示支持" - -#. module: app_odoo_customize -#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_show_account -msgid "Show My Account" -msgstr "显示我的帐户" - -#. module: app_odoo_customize -#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_show_enterprise -msgid "Show Enterprise Tag" -msgstr "显示升级企业版标签提醒" - -#. module: app_odoo_customize -#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_show_share -msgid "Show Share Dashboard" -msgstr "显示分享Odoo" - -#. module: app_odoo_customize -#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_show_poweredby -msgid "Show Powered by Odoo" -msgstr "显示Powered by Odoo" - -#. module: app_odoo_customize -#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings -msgid "Data Clearing (Be careful to do that!)" -msgstr "数据清理(请谨慎操作!)" - -#. module: app_odoo_customize -#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings -msgid "Sales" -msgstr "销售" - -#. module: app_odoo_customize -#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings -msgid "POS" -msgstr "POS门店" - -#. module: app_odoo_customize -#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings -msgid "Purchase" -msgstr "采购" - -#. module: app_odoo_customize -#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings -msgid "MRP" -msgstr "生产" - -#. module: app_odoo_customize -#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings -msgid "Inventory" -msgstr "库存" - -#. module: app_odoo_customize -#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings -msgid "Accounting" -msgstr "会计" - -#. module: app_odoo_customize -#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings -msgid "Base Models" -msgstr "基础模型数据" - -#. module: app_odoo_customize -#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings -msgid "Delete All Sales Order" -msgstr "删除所有报价单、销售单" - -#. module: app_odoo_customize -#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings -msgid "Delete All Product" -msgstr "删除所有产品及变体" - -#. module: app_odoo_customize -#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings -msgid "Delete All Product Attribute" -msgstr "删除所有产品属性" - -#. module: app_odoo_customize -#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings -msgid "Delete All POS Order" -msgstr "删除所有POS订单" - -#. module: app_odoo_customize -#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings -msgid "Delete All Purchase Order" -msgstr "删除所有采购单" - -#. module: app_odoo_customize -#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings -msgid "Delete All Manufacturing Order" -msgstr "删除所有生产单" - -#. module: app_odoo_customize -#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings -msgid "Delete All BOM" -msgstr "删除所有物料清单" - -#. module: app_odoo_customize -#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings -msgid "Delete All Move/Picking/Package/Lot" -msgstr "删除所有库存调拨/拣货/包装/批次数据" - -#. module: app_odoo_customize -#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings -msgid "Delete All Voucher/Invoice/Bill" -msgstr "删除所有收据/发票/账单" - -#. module: app_odoo_customize -#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings -msgid "Delete All Message" -msgstr "删除所有消息" - -#. module: app_odoo_customize -#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings -msgid "Delete All Workflow" -msgstr "删除所有工作流" - -#. module: app_odoo_customize -#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings -msgid "Please Confirm to delete the select data?" -msgstr "确认删除指定数据?" - -#. module: app_odoo_customize -#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings -msgid "Please confirm to delete the select data?" -msgstr "确认删除指定数据?" - -#. module: app_odoo_customize -#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings -msgid "Please confirm to delete the select data?" -msgstr "Please confirm to delete the select data?" - -#. module: app_odoo_customize -#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_documentation_dev_url -msgid "Developer Documentation Url" -msgstr "开发者手册链接" - -#. module: app_odoo_customize -#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_support_url -msgid "Support Url" -msgstr "支持链接" - -#. module: app_odoo_customize -#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_account_title -msgid "My Odoo.com Account Title" -msgstr "我的帐户显示标题" - -#. module: Base -#: model:ir.config_parameter,value:app_odoo_customize.app_account_title -#, python-format -msgid "My Online Account" -msgstr "我的帐号" - -#. module: app_odoo_customize -#: model:ir.config_parameter,value:app_odoo_customize.app_account_title -#, python-format -msgid "My Online Account" -msgstr "我的帐号" - -#. module: app_odoo_customize -#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_account_url -msgid "My Odoo.com Account Url" -msgstr "我的帐户链接" - - -#. module: app_odoo_customize -#. openerp-web -#: code:addons/app_odoo_customize/static/src/xml/customize_user_menu.xml:16 -#, python-format -msgid "Developer Manual" -msgstr "开发者手册" - diff --git a/app_odoo_customize/models/app_theme_config_settings.py b/app_odoo_customize/models/app_theme_config_settings.py index 403ea727..bdee640b 100644 --- a/app_odoo_customize/models/app_theme_config_settings.py +++ b/app_odoo_customize/models/app_theme_config_settings.py @@ -109,7 +109,15 @@ class AppThemeConfigSettings(models.TransientModel): obj = self.pool.get(obj_name) if obj and obj._table_exist: sql = "delete from %s" % obj._table - self._cr.execute( sql) + self._cr.execute(sql) + # 更新序号 + seqs = self.env['ir.sequence'].search([('code', '=', 'sale.order')]) + for seq in seqs: + seq.write({ + 'number_next': 1, + }) + sql = "update ir_sequence set number_next=1 where code ='sale.order';" + self._cr.execute(sql) except Exception, e: raise Warning(e) return True @@ -126,7 +134,15 @@ class AppThemeConfigSettings(models.TransientModel): obj = self.pool.get(obj_name) if obj and obj._table_exist: sql = "delete from %s" % obj._table - self._cr.execute( sql) + self._cr.execute(sql) + # 更新序号,针对自动产品编号 + seqs = self.env['ir.sequence'].search([('code', '=', 'product.product')]) + for seq in seqs: + seq.write({ + 'number_next': 1, + }) + sql = "update ir_sequence set number_next=1 where code ='product.product';" + self._cr.execute(sql) except Exception, e: raise Warning(e) return True @@ -143,7 +159,7 @@ class AppThemeConfigSettings(models.TransientModel): obj = self.pool.get(obj_name) if obj and obj._table_exist: sql = "delete from %s" % obj._table - self._cr.execute( sql) + self._cr.execute(sql) except Exception, e: raise Warning(e) return True @@ -161,7 +177,15 @@ class AppThemeConfigSettings(models.TransientModel): obj = self.pool.get(obj_name) if obj and obj._table_exist: sql = "delete from %s" % obj._table - self._cr.execute( sql) + self._cr.execute(sql) + # 更新序号 + seqs = self.env['ir.sequence'].search([('code', '=', 'pos.order')]) + for seq in seqs: + seq.write({ + 'number_next': 1, + }) + sql = "update ir_sequence set number_next=1 where code ='pos.order';" + self._cr.execute(sql) except Exception, e: raise Warning(e) return True @@ -179,7 +203,15 @@ class AppThemeConfigSettings(models.TransientModel): obj = self.pool.get(obj_name) if obj and obj._table_exist: sql = "delete from %s" % obj._table - self._cr.execute( sql) + self._cr.execute(sql) + # 更新序号 + seqs = self.env['ir.sequence'].search([('code', '=', 'purchase.order')]) + for seq in seqs: + seq.write({ + 'number_next': 1, + }) + sql = "update ir_sequence set number_next=1 where code ='purchase.order';" + self._cr.execute(sql) except Exception, e: raise Warning(e) return True @@ -201,7 +233,15 @@ class AppThemeConfigSettings(models.TransientModel): obj = self.pool.get(obj_name) if obj and obj._table_exist: sql = "delete from %s" % obj._table - self._cr.execute( sql) + self._cr.execute(sql) + # 更新序号 + seqs = self.env['ir.sequence'].search(['|', ('code', '=', 'mrp.production'), ('code', '=', 'mrp.unbuild')]) + for seq in seqs: + seq.write({ + 'number_next': 1, + }) + sql = "update ir_sequence set number_next=1 where (code ='mrp.production' or code ='mrp.unbuild');" + self._cr.execute(sql) except Exception, e: raise Warning(e) return True @@ -219,7 +259,7 @@ class AppThemeConfigSettings(models.TransientModel): obj = self.pool.get(obj_name) if obj and obj._table_exist: sql = "delete from %s" % obj._table - self._cr.execute( sql) + self._cr.execute(sql) except Exception, e: raise Warning(e) return True @@ -230,13 +270,14 @@ class AppThemeConfigSettings(models.TransientModel): # 清除库存单据 ['procurement.order', ], ['stock.quant', ], + ['stock.quant.package', ], + ['stock.quant.move.rel', ], ['stock.move', ], ['stock.pack.operation', ], ['stock.picking', ], + ['stock.scrap', ], ['stock.inventory.line', ], ['stock.inventory', ], - ['stock.quant.package', ], - ['stock.quant.move.rel', ], ['stock.production.lot', ], ['stock.fixed.putaway.strat', ], ] @@ -246,7 +287,42 @@ class AppThemeConfigSettings(models.TransientModel): obj = self.pool.get(obj_name) if obj and obj._table_exist: sql = "delete from %s" % obj._table - self._cr.execute( sql) + self._cr.execute(sql) + # 更新序号 + seqs = self.env['ir.sequence'].search([ + '|', ('code', '=', 'stock.lot.serial'), + '|', ('code', '=', 'stock.lot.tracking'), + '|', ('code', '=', 'stock.orderpoint'), + '|', ('code', '=', 'stock.picking'), + '|', ('code', '=', 'stock.quant.package'), + '|', ('code', '=', 'stock.scrap'), + '|', ('code', '=', 'stock.picking'), + '|', ('prefix', '=', 'WH/IN/'), + '|', ('prefix', '=', 'WH/INT/'), + '|', ('prefix', '=', 'WH/OUT/'), + '|', ('prefix', '=', 'WH/PACK/'), + ('prefix', '=', 'WH/PICK/') + ]) + + for seq in seqs: + seq.write({ + 'number_next': 1, + }) + sql = "update ir_sequence set number_next=1 where (" \ + "code ='stock.lot.serial' " \ + "or code ='stock.lot.tracking' " \ + "or code ='stock.orderpoint'" \ + "or code ='stock.picking'" \ + "or code ='stock.quant.package'" \ + "or code ='stock.scrap'" \ + "or code ='stock.picking'" \ + "or prefix ='WH/IN/'" \ + "or prefix ='WH/INT/'" \ + "or prefix ='WH/OUT/'" \ + "or prefix ='WH/PACK/'" \ + "or prefix ='WH/PICK/'" \ + ");" + self._cr.execute(sql) except Exception, e: raise Warning(e) return True @@ -273,7 +349,30 @@ class AppThemeConfigSettings(models.TransientModel): obj = self.pool.get(obj_name) if obj and obj._table_exist: sql = "delete from %s" % obj._table - self._cr.execute( sql) + self._cr.execute(sql) + + # 更新序号 + seqs = self.env['ir.sequence'].search([ + '|', ('code', '=', 'account.reconcile'), + '|', ('code', '=', 'account.payment.customer.invoice'), + '|', ('code', '=', 'account.payment.customer.refund'), + '|', ('code', '=', 'account.payment.supplier.invoice'), + '|', ('code', '=', 'account.payment.supplier.refund'), + ('code', '=', 'account.payment.transfer') + ]) + + for seq in seqs: + seq.write({ + 'number_next': 1, + }) + sql = "update ir_sequence set number_next=1 where (" \ + "code ='account.reconcile' " \ + "or code ='account.payment.customer.invoice' " \ + "or code ='account.payment.customer.refund' " \ + "or code ='account.payment.supplier.invoice' " \ + "or code ='account.payment.supplier.refund' " \ + ");" + self._cr.execute(sql) except Exception, e: raise Warning(e) return True @@ -290,7 +389,7 @@ class AppThemeConfigSettings(models.TransientModel): obj = self.pool.get(obj_name) if obj and obj._table_exist: sql = "delete from %s" % obj._table - self._cr.execute( sql) + self._cr.execute(sql) except Exception, e: raise Warning(e) return True @@ -308,7 +407,7 @@ class AppThemeConfigSettings(models.TransientModel): obj = self.pool.get(obj_name) if obj and obj._table_exist: sql = "delete from %s" % obj._table - self._cr.execute( sql) + self._cr.execute(sql) except Exception, e: raise Warning(e) diff --git a/app_odoo_customize/readme.md b/app_odoo_customize/readme.md index 71e7b2f5..becbcca4 100644 --- a/app_odoo_customize/readme.md +++ b/app_odoo_customize/readme.md @@ -2,20 +2,21 @@ ============ White label odoo. You can config odoo, make it look like your own platform. -1.Deletes Odoo label in footer -2.Replaces "Odoo" in Windows title -3.Customize Documentation, Support, About links and title in usermenu -4.Adds "Developer mode" link to the top right-hand User Menu. -5.Adds Quick Language Switcher to the top right-hand User Menu. -6.Adds Country flags to the top right-hand User Menu. -7.Adds English and Chinese user documentation access to the top right-hand User Menu. -8.Adds developer documentation access to the top right-hand User Menu. -9.Customize "My odoo.com account" button -10.Standalone setting panel, easy to setup. -11.Provide 236 country flags. -12.Multi-language Support. -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. +1. Deletes Odoo label in footer +2. Replaces "Odoo" in Windows title +3. Customize Documentation, Support, About links and title in usermenu +4. Adds "Developer mode" link to the top right-hand User Menu. +5. Adds Quick Language Switcher to the top right-hand User Menu. +6. Adds Country flags to the top right-hand User Menu. +7. Adds English and Chinese user documentation access to the top right-hand User Menu. +8. Adds developer documentation access to the top right-hand User Menu. +9. Customize "My odoo.com account" button +10. Standalone setting panel, easy to setup. +11. Provide 236 country flags. +12. Multi-language Support. +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... This module can help to white label the Odoo. Also helpful for training and support for your odoo end-user. @@ -26,22 +27,24 @@ http://www.sunpop.cn ## 在符合odoo开源协议的前提下,去除odoo版权信息,自定义你的odoo 可完全自行设置下列 odoo 选项,让 odoo 看上去像是你的软件产品 -1.删除菜单导航页脚的 Odoo 标签 -2.将弹出窗口中 "Odoo" 设置为自定义名称 -3.自定义用户菜单中的 Documentation, Support, About 的链接 -4.在用户菜单中增加快速切换开发模式 -5.在用户菜单中增加快速切换多国语言 -6.对语言菜单进行美化,设置国旗图标 -7.在用户菜单中增加中/英文用户手册,可以不用翻墙加速了 -8.在用户菜单中增加开发者手册,含python教程,jquery参考,Jinja2模板,PostgresSQL参考 -9.在用户菜单中自定义"My odoo.com account" -10.单独设置面板,每个选项都可以自定义 -11.提供236个国家的国旗文件(部份需要自行设置文件名) -12.多语言版本 -13.自定义登陆界面中的 Powered by Odoo -14.快速删除测试数据,支持模块包括:销售/POS门店/采购/生产/库存/会计/消息与工作流等. +1. 删除菜单导航页脚的 Odoo 标签 +2. 将弹出窗口中 "Odoo" 设置为自定义名称 +3. 自定义用户菜单中的 Documentation, Support, About 的链接 +4. 在用户菜单中增加快速切换开发模式 +5. 在用户菜单中增加快速切换多国语言 +6. 对语言菜单进行美化,设置国旗图标 +7. 在用户菜单中增加中/英文用户手册,可以不用翻墙加速了 +8. 在用户菜单中增加开发者手册,含python教程,jquery参考,Jinja2模板,PostgresSQL参考 +9. 在用户菜单中自定义"My odoo.com account" +10. 单独设置面板,每个选项都可以自定义 +11. 提供236个国家的国旗文件(部份需要自行设置文件名) +12. 多语言版本 +13. 自定义登陆界面中的 Powered by Odoo +14. 快速删除测试数据,支持模块包括:销售/POS门店/采购/生产/库存/会计/消息与工作流等. +15. 将各类单据的序号重置,从1开始,包括:SO/PO/MO/Invoice 等 -使用方法:将解压后的 app_odoo_customize 放到 odoo的 addons目录下,激活开发者模式,应用-->更新应用列表,找到 "App odoo Customize"模块,安装即可。 +使用方法:将解压后的 app_odoo_customize 放到 odoo的 addons目录下,激活开发者模式,应用-->更新应用列表, +找到 "App odoo Customize"模块,安装即可。 ## 其它技术资源: #### odoo10-windows64位高性能最新绿色版下载及制作方法-提速50% diff --git a/app_odoo_customize/static/description/cnreadme.png b/app_odoo_customize/static/description/cnreadme.png new file mode 100644 index 00000000..d76676e0 Binary files /dev/null and b/app_odoo_customize/static/description/cnreadme.png differ diff --git a/app_odoo_customize/static/description/index.html b/app_odoo_customize/static/description/index.html index 4d42a0c2..bce7fd7d 100644 --- a/app_odoo_customize/static/description/index.html +++ b/app_odoo_customize/static/description/index.html @@ -21,6 +21,7 @@
This module can help to white label the Odoo. @@ -28,6 +29,11 @@ The user can get the help document just by one click.
+ +
+