v12 update odoo_customize

This commit is contained in:
ivan deng
2018-09-23 13:17:52 +08:00
parent 532fb017ed
commit 0d70461b61
5 changed files with 133 additions and 127 deletions

View File

@@ -16,7 +16,7 @@
# description:
{
'name': 'App Odoo Customize(Backend Debranding Title,Language,Documentation,Quick Debug,Clear Data)',
'version': '11.0.9.12',
'version': '12.0.9.23',
'author': 'Sunpop.cn',
'category': 'Productivity',
'website': 'http://www.sunpop.cn',
@@ -31,7 +31,7 @@
App Odoo Customize(Debranding Title,Language,Documentation,Quick Debug)
============
White label odoo.
Support Odoo 11, 10, 9.
Support Odoo 12, 11, 10, 9.
You can config odoo, make it look like your own platform.
1. Deletes Odoo label in footer
2. Replaces "Odoo" in Windows title
@@ -62,7 +62,7 @@ The user can get the help document just by one click.
'depends': ['base', 'web', 'mail'],
'data': [
'views/app_odoo_customize_view.xml',
# 'views/app_theme_config_settings_view.xml',
'views/app_theme_config_settings_view.xml',
'views/ir_model_view.xml',
# data
'data/ir_config_parameter.xml',

View File

@@ -1,7 +1,7 @@
##App Odoo Customize(Debranding Title,Language,Documentation,Quick Debug,Quick Data Clear)
============
White label odoo.
Support Odoo 11, 10, 9.
Support Odoo 12, 11, 10, 9.
You can config odoo, make it look like your own platform.
1. Deletes Odoo label in footer
2. Replaces "Odoo" in Windows title

View File

@@ -5,15 +5,13 @@
<div class="oe_demo" style=" margin: 30px auto 0; padding: 0 15px 0 0; border:none; width: 96%;">
<p>This moduld allows user to quickly customize and debranding Odoo. Quick debug, Language Switcher,
Online Documentation Access,Quick Data Clear. </p>
<h3>Lastest update: v11.0.7.23</h3>
<p>Fix Login bug when install website.</p>
<p>Add 19. One Click to clear all data (Sometime pls click twice)</p>
<p>Add 18. Show/Hide Author and Website in Apps Dashboard</p>
<h3>Lastest update: v12.0.9.23</h3>
<p>Support for odoo 12alpha1.</p>
<h1>More Powerful addons:
<a class="btn btn-primary mb16" href="http://www.odoo.com/apps/modules/browse?author=Sunpop.cn">Sunpop.cn Addons</a>
</h1>
<br>
<h3>Add Odoo 11 Support</h3>
<h3>Odoo 12, 11, 10, 9 Support</h3>
<ul>
<li>1. Deletes Odoo label in footer</li>
<li>2. Replaces "Odoo" in Windows title</li>

View File

@@ -46,53 +46,53 @@ odoo.define('app_odoo_customize.UserMenu', function (require) {
})
//取参数
// self._rpc({
// model: 'ir.config_parameter',
// method: 'search_read',
// domain: [['key', '=like', 'app_%']],
// fields: ['key', 'value'],
// lazy: false,
// }).then(function (res) {
// $.each(res, function (key, val) {
// if (val.key == 'app_documentation_url')
// documentation_url = val.value;
// if (val.key == 'app_documentation_dev_url')
// documentation_dev_url = val.value;
// if (val.key == 'app_support_url')
// support_url = val.value;
// if (val.key == 'app_account_title')
// account_title = val.value;
// if (val.key == 'app_account_url')
// account_url = val.value;
// // 控制显示
// if (val.key == 'app_show_lang' && val.value == "False") {
// $('switch-lang').hide();
// }
// if (session.user_context.uid!=1 || (val.key == 'app_show_debug' && val.value == "False")) {
// $('[data-menu="debug"]').parent().hide();
// $('[data-menu="debugassets"]').parent().hide();
// $('[data-menu="quitdebug"]').parent().hide();
// }
// if (val.key == 'app_show_documentation' && val.value == "False") {
// $('[data-menu="documentation"]').parent().hide();
// }
// if (val.key == 'app_show_documentation_dev' && val.value == "False") {
// $('[data-menu="documentation_dev"]').parent().hide();
// }
// if (val.key == 'app_show_support' && val.value == "False") {
// $('[data-menu="support"]').parent().hide();
// }
// if (val.key == 'app_show_account' && val.value == "False") {
// $('[data-menu="account"]').parent().hide();
// }
// if (val.key == 'app_account_title' && val.value) {
// $('[data-menu="account"]').html(account_title);
// }
// if (val.key == 'app_show_poweredby' && val.value == "False") {
// $('.o_sub_menu_footer').hide();
// }
// });
// })
self._rpc({
model: 'ir.config_parameter',
method: 'search_read',
domain: [['key', '=like', 'app_%']],
fields: ['key', 'value'],
lazy: false,
}).then(function (res) {
$.each(res, function (key, val) {
if (val.key == 'app_documentation_url')
documentation_url = val.value;
if (val.key == 'app_documentation_dev_url')
documentation_dev_url = val.value;
if (val.key == 'app_support_url')
support_url = val.value;
if (val.key == 'app_account_title')
account_title = val.value;
if (val.key == 'app_account_url')
account_url = val.value;
// 控制显示
if (val.key == 'app_show_lang' && val.value == "False") {
$('switch-lang').hide();
}
if (session.user_context.uid!=1 || (val.key == 'app_show_debug' && val.value == "False")) {
$('[data-menu="debug"]').hide();
$('[data-menu="debugassets"]').hide();
$('[data-menu="quitdebug"]').hide();
}
if (val.key == 'app_show_documentation' && val.value == "False") {
$('[data-menu="documentation"]').hide();
}
if (val.key == 'app_show_documentation_dev' && val.value == "False") {
$('[data-menu="documentation_dev"]').hide();
}
if (val.key == 'app_show_support' && val.value == "False") {
$('[data-menu="support"]').hide();
}
if (val.key == 'app_show_account' && val.value == "False") {
$('[data-menu="account"]').hide();
}
if (val.key == 'app_account_title' && val.value) {
$('[data-menu="account"]').html(account_title);
}
if (val.key == 'app_show_poweredby' && val.value == "False") {
$('.o_sub_menu_footer').hide();
}
});
})
},
/**
* @override

View File

@@ -10,20 +10,20 @@
<button string="Apply" type="object" name="execute" class="oe_highlight"/>
<button string="Cancel" type="object" name="cancel" class="oe_link" special="cancel"/>
</header>
<separator string="White Label Setting"/>
<h2>White Label Setting</h2>
<group string="System Name">
<label for="app_system_name"/>
<div>
<field name="app_system_name"/>
</div>
<label string="Online Support"/>
<div>
<a href="http://www.sunpop.cn" target="_blank">Visit our website for more apps and Support. http://www.sunpop.cn</a>
</div>
</div>
</group>
<group string="User Menu">
<label string="Item to Show"/>
<div name="user_menu_show_hide">
<div class="row mt16 o_settings_container" name="user_menu_show_hide">
<div class="col-12 col-lg-6 o_setting_box">
<div class="col-12 col-lg-6 o_setting_box">
<div>
<field name="app_show_lang"/>
<label for="app_show_lang"/>
@@ -40,6 +40,10 @@
<field name="app_show_documentation_dev"/>
<label for="app_show_documentation_dev"/>
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box">
<div class="col-12 col-lg-6 o_setting_box">
<div>
<field name="app_show_support"/>
<label for="app_show_support"/>
@@ -69,6 +73,8 @@
<label for="group_show_author_in_apps"/>
</div>
</div>
</div>
</div>
</group>
<group string="User Menu Content">
<label for="app_documentation_url"/>
@@ -92,46 +98,48 @@
<field name="app_account_url"/>
</div>
</group>
<group name="data-clean" string="Data Cleaning (Be careful to do that!)">
<label string="Sales"/>
<div class="mb4">
<div class="mt16 o_settings_container" name="data-clean">
<h2 name="data-clean" class="o_horizontal_separator">Data Cleaning (Be careful to do that!)</h2>
<div class="col-12 col-lg-12 mb4">
<span class="btn btn-default col-3 col-lg-2 text-left">Sale</span>
<button string="Delete All Sales Order" type="object" name="remove_sales"
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
</div>
<label string="POS"/>
<div class="mb4">
<button string="Delete All POS Order" type="object" name="remove_pos" confirm="Please confirm to delete the select data?" class="oe_highlight"/>
<div class="col-12 col-lg-12 mb4">
<span class="btn btn-default col-3 col-lg-2 text-left">POS</span>
<button string="Delete All POS Order" type="object" name="remove_pos" confirm="Please confirm to delete the select data?"
class="oe_highlight"/>
</div>
<label string="Purchase"/>
<div class="mb4">
<div class="col-12 col-lg-12 mb4">
<span class="btn btn-default col-3 col-lg-2 text-left">Purchase</span>
<button string="Delete All Purchase Order and Requisition" type="object" name="remove_purchase"
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
</div>
<label string="MRP"/>
<div class="mb4">
<div class="col-12 col-lg-12 mb4">
<span class="btn btn-default col-3 col-lg-2 text-left">MRP</span>
<button string="Delete All Manufacturing Order" type="object" name="remove_mrp"
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
|
<button string="Delete All BOM" type="object" name="remove_mrp_bom"
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
</div>
<label string="Inventory"/>
<div class="mb4">
<div class="col-12 col-lg-12 mb4">
<span class="btn btn-default col-3 col-lg-2 text-left">Inventory</span>
<button string="Delete All Move/Picking/Package/Lot" type="object" name="remove_inventory"
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
</div>
<label string="Accounting"/>
<div class="mb4">
<div class="col-12 col-lg-12 mb4">
<span class="btn btn-default col-3 col-lg-2 text-left">Accounting</span>
<button string="Delete All Voucher/Invoice/Bill" type="object" name="remove_account"
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
</div>
<label string="Project"/>
<div class="mb4">
<div class="col-12 col-lg-12 mb4">
<span class="btn btn-default col-3 col-lg-2 text-left">Project</span>
<button string="Delete All Project/Task/Forecast" type="object" name="remove_project"
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
</div>
<label string="Base Models"/>
<div class="mb4">
<div class="col-12 col-lg-12 mb4">
<span class="btn btn-default col-3 col-lg-2 text-left">Base Models</span>
<button string="Delete All Product" type="object" name="remove_product"
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
|
@@ -144,18 +152,18 @@
<button string="Delete All Workflow" type="object" name="remove_workflow"
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
</div>
<label string="All Business"/>
<div class="mb4">
<div class="col-12 col-lg-12 mb4">
<span class="btn btn-default col-3 col-lg-2 text-left">All Business</span>
<button string="Delete All MRP/Sale/Purchase/Account/MRP/Inventory/Project/Message/Workflow" type="object" name="remove_all_biz"
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
</div>
</group>
</div>
</form>
</field>
</record>
<record id="action_app_theme_config" model="ir.actions.act_window">
<field name="name">odooApp Customize</field>
<field name="name">Customize Debrand</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">app.theme.config.settings</field>
<field name="view_mode">form</field>