[MERGE] with saas
bzr revid: api@openerp.com-20121210162011-xik9ds2f073jx0nu
This commit is contained in:
parent
590add54d4
commit
6fba65605c
|
@ -0,0 +1,23 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2012-today OpenERP SA (<http://www.openerp.com>)
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import res_users
|
||||
import ir_cron
|
|
@ -0,0 +1,74 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2012-today OpenERP SA (<http://www.openerp.com>)
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
{
|
||||
'name': 'saas_demo',
|
||||
'category': 'Hidden',
|
||||
'description': """Add a red bar on the top with the following sentence:
|
||||
"This is a demo version, you can subscribe to use online, browse all apps or back to the website."
|
||||
And add a new button in the right of the menu: "Sign Up"
|
||||
""",
|
||||
'version': '1.0',
|
||||
"depends": [
|
||||
'account_accountant',
|
||||
'account_analytic_analysis',
|
||||
'account_asset',
|
||||
'account_voucher',
|
||||
'crm',
|
||||
'fleet',
|
||||
'hr_contract',
|
||||
'hr_expense',
|
||||
'hr_holidays',
|
||||
'hr_recruitment',
|
||||
'hr_timesheet_invoice',
|
||||
'hr_timesheet_sheet',
|
||||
'lunch',
|
||||
'mrp',
|
||||
'mrp_jit',
|
||||
'note',
|
||||
'pad',
|
||||
'point_of_sale',
|
||||
'project_issue',
|
||||
'purchase',
|
||||
'sale',
|
||||
'stock',
|
||||
'web',
|
||||
'web_analytics',
|
||||
],
|
||||
"demo": [
|
||||
'setup.xml',
|
||||
'demo/en_US.xml',
|
||||
'demo/fr_FR.xml',
|
||||
'demo/es_ES.xml',
|
||||
'demo/zh_CN.xml',
|
||||
'demo/de_DE.xml',
|
||||
'demo/it_IT.xml',
|
||||
'demo/nl_NL.xml',
|
||||
'demo/ru_RU.xml',
|
||||
'demo/ja_JP.xml',
|
||||
'demo/pt_BR.xml',
|
||||
],
|
||||
'css': ['static/css/*.css'],
|
||||
'qweb': ['static/xml/*.xml'],
|
||||
'js': ['static/js/*.js'],
|
||||
'auto_install': False,
|
||||
'web_preload': False,
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,39 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2011 OpenERP SA (<http://openerp.com>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import osv
|
||||
|
||||
class ir_cron(osv.osv):
|
||||
""" extend ir.cron to make sure all cron jobs are inactive
|
||||
"""
|
||||
_inherit = 'ir.cron'
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
vals['active'] = False
|
||||
return super(ir_cron, self).create(cr, uid, vals, context=context)
|
||||
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
vals['active'] = False
|
||||
return super(ir_cron, self).write(cr, uid, ids, vals, context=context)
|
||||
|
||||
def deactivate_all(self, cr, uid, context=None):
|
||||
ids = self.search(cr, uid, [], context=context)
|
||||
return self.write(cr, uid, ids, {'active': False}, context=context)
|
|
@ -0,0 +1,30 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2011 OpenERP SA (<http://openerp.com>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import osv
|
||||
from tools.translate import _
|
||||
|
||||
class res_users(osv.osv):
|
||||
_inherit = 'res.users'
|
||||
|
||||
def change_password(self, cr, uid, old_passwd, new_passwd, context=None):
|
||||
raise osv.except_osv(_('Operation Canceled'),
|
||||
_('You are not allowed to change account passwords in demo databases.'))
|
|
@ -0,0 +1,22 @@
|
|||
<openerp>
|
||||
<data>
|
||||
<!-- install generic chart of account -->
|
||||
<record id="account.account_configuration_installer_todo" model="ir.actions.todo">
|
||||
<field name="state">done</field>
|
||||
</record>
|
||||
<record id="account_installer" model="account.installer">
|
||||
<!-- no fields, use the default values -->
|
||||
</record>
|
||||
<function model="account.installer" name="execute_simple">
|
||||
<value eval="[ref('account_installer')]"/>
|
||||
</function>
|
||||
|
||||
<!-- change company name -->
|
||||
<record id="base.main_company" model="res.company">
|
||||
<field name="name">Demo Company</field>
|
||||
</record>
|
||||
|
||||
<!-- disable all cron jobs -->
|
||||
<function model="ir.cron" name="deactivate_all"/>
|
||||
</data>
|
||||
</openerp>
|
|
@ -0,0 +1,52 @@
|
|||
.demo_subscribe_bar {
|
||||
color: #ffffff;
|
||||
height: 30px;
|
||||
vertical-align: middle !important;
|
||||
text-align: center !important;
|
||||
width: 100%;
|
||||
|
||||
border: 0 !important;
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
|
||||
background-color: #8785C0;
|
||||
background-image: -webkit-linear-gradient(135deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0) 25%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0.05) 75%, rgba(255, 255, 255, 0) 75%, rgba(255, 255, 255, 0) 100% );
|
||||
background-size: 40px 40px;
|
||||
-webkit-transition: all 350ms ease;
|
||||
text-shadow: 0px 0px 2px rgba(0,0,0,0.2);
|
||||
box-shadow: 0px 2px 10px rgba(0,0,0,0.38) inset;
|
||||
}
|
||||
|
||||
.demo_subscribe_bar a {
|
||||
font-weight: bold;
|
||||
color: #d3ffb0 !important;
|
||||
text-decoration: none !important;
|
||||
border-radius: 3px;
|
||||
padding: 5px 8px;
|
||||
cursor: pointer;
|
||||
-webkit-transition: all 350ms ease;
|
||||
}
|
||||
/*
|
||||
.demo_subscribe_bar:hover {
|
||||
height: 50px;
|
||||
-webkit-transition: all 350ms ease;
|
||||
}
|
||||
.demo_subscribe_bar:hover a{
|
||||
background: rgba(0,0,0,0.06);
|
||||
box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.24) inset, 0px -1px rgba(255, 255, 255, 0.13) inset;
|
||||
-webkit-transition: all 350ms ease;
|
||||
}
|
||||
*/
|
||||
|
||||
.demo_subscribe_bar .arrow{
|
||||
display: inline-block;
|
||||
width: 18px;
|
||||
height: 13px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.demo_subscribe_bar .arrow .oe_e{
|
||||
position: absolute;
|
||||
top: -9px;
|
||||
left: -1px;
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
openerp.saas_demo = function (instance) {
|
||||
|
||||
instance.web.WebClient.include({
|
||||
check_timezone: function() {
|
||||
// Disable timezone check for saas demo
|
||||
},
|
||||
});
|
||||
|
||||
};
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="demo_template" xml:space="preserve">
|
||||
<!-- add a string with a red bar on top -->
|
||||
<t t-extend="WebClient">
|
||||
<t t-jquery="table.oe_webclient" t-operation="prepend">
|
||||
<tr>
|
||||
<td colspan="2" class="demo_subscribe_bar">
|
||||
<span>
|
||||
This is a shared demo version.
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</t>
|
||||
</t>
|
||||
|
||||
<!-- clear user menu -->
|
||||
<t t-extend="UserMenu">
|
||||
<t t-jquery="span" t-operation="replace"></t>
|
||||
</t>
|
||||
|
||||
<t t-extend="WebClient">
|
||||
<t t-jquery="a.oe_logo" t-operation="replace">
|
||||
<a class='oe_logo' href='https://www.v7.openerp.com/'>
|
||||
<img src='web/static/src/img/logo.png'></img>
|
||||
</a>
|
||||
</t>
|
||||
</t>
|
||||
|
||||
</templates>
|
Loading…
Reference in New Issue