[IMP] web_planner : planner as data module

Planner is like web Tips : a data in a module.
- Rename planner.planner to web.planner
- Rename files according to guidelines
- Remove planner_crm module
- Make CRM depends on web_planner, and add its planner as crm data
- Remove duplicate less style
- Add 'active' boolean field on planner (to disabled them), and create planner backend views
This commit is contained in:
dka-odoo
2015-04-23 10:04:31 +02:00
committed by Jérome Maes
parent 7a24514f82
commit ab1b4cab31
36 changed files with 393 additions and 473 deletions
+1
View File
@@ -29,3 +29,4 @@ import wizard
import res_partner
import res_config
import base_partner_merge
import web_planner
+1
View File
@@ -96,6 +96,7 @@ Dashboard for CRM will include:
'sales_team_view.xml',
'views/crm.xml',
'web_planner_data.xml',
],
'demo': [
'crm_demo.xml',
@@ -1,7 +1,7 @@
odoo.define('planner_crm.planner', function (require) {
"use strict";
var planner = require('planner.planner');
var planner = require('web.planner');
planner.PlannerDialog.include({
prepare_planner_event: function() {
@@ -0,0 +1,91 @@
#PlannerModal {
#planner_page2, #planner_page3 {
textarea{
width: 100%;
max-width: 100%;
}
}
#planner_page4 {
textarea {
width: 58%;
max-width: 58%;
}
}
#planner_page5, #planner_page7, #planner_page8, #planner_page10, #planner_page11 {
.container-fluid {
.col-xs-12 {
padding: 5px;
&:first-child {
padding-left: 0;
}
&:last-child {
padding-right: 0;
}
}
}
}
#planner_page11 {
.container-fluid {
.col-xs-12 .panel-heading {
min-height: 200px;
padding: 0;
font-size: 1.1em;
color: #407241;
a {
display: block;
padding: 20px;
height: 100%;
width: 100%;
position: absolute;
padding-top: 40px;
padding-left: 10px;
}
}
}
}
}
// XS size
@media screen and (max-width: 768px) {
#PlannerModal .pages {
margin-top: 0px;
}
#PlannerModal .counter {
padding: 6px 0 0 5px;
}
}
// SM size
@media screen and (min-width: 769px) {
#PlannerModal .paragraphs {
div.col-md-10 {
margin-top:1em;
}
.icon {
text-align: center;
font-size: 2em;
margin: 1em auto .5em;
}
span {
transform: translateX(-8px);
position: relative;
display: block;
}
}
}
// MD size
@media screen and (min-width: 992px) {
#PlannerModal .paragraphs .icon {
text-align: center;
font-size: 4em;
margin: 0.3em auto .5em;
span{
transform: translateX(0px);
position: relative;
display: block;
}
}
}
+6
View File
@@ -6,5 +6,11 @@
<link rel="stylesheet" href="/crm/static/src/css/crm.css"/>
</xpath>
</template>
<template id="assets_backend" name="planner crm assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link href="/crm/static/src/less/web_planner_crm.less" rel="stylesheet" type="text/less"/>
<script type="text/javascript" src="/crm/static/src/js/web_planner_crm.js"></script>
</xpath>
</template>
</data>
</openerp>
@@ -4,7 +4,7 @@ from openerp import api, models
class PlannerCrm(models.Model):
_inherit = 'planner.planner'
_inherit = 'web.planner'
@api.model
def _get_planner_application(self):
@@ -15,11 +15,8 @@ class PlannerCrm(models.Model):
@api.model
def _prepare_planner_crm_data(self):
sales_team = self.env.ref('sales_team.team_sales_department')
company_data = self.env['res.users'].browse(self._uid).company_id
values = {
'prepare_backend_url': self.prepare_backend_url,
'alias_domain': sales_team.alias_domain,
'alias_name': sales_team.alias_name,
'company_data': company_data,
}
return values
@@ -95,7 +95,7 @@
<span class="fa fa-fw"/>Welcome
</a>
</li>
<h4><i class="fa fa-trophy"></i> Goals</h4>
<h4><i class="fa fa-trophy"></i>Goals</h4>
<li>
<a href="#planner_page2">
<span class="fa fa-fw"/>Your Expectations
@@ -106,7 +106,7 @@
<span class="fa fa-fw"/>Your KPIs
</a>
</li>
<h4><i class="fa fa-tag"></i> Sale Flow</h4>
<h4><i class="fa fa-tag"></i>Sale Flow</h4>
<li>
<a href="#planner_page4">
<span class="fa fa-fw"/>Your Pipeline
@@ -127,13 +127,13 @@
<span class="fa fa-fw"/>Import Products
</a>
</li>
<h4><i class="fa fa-magnet"></i> Lead acquisition</h4>
<h4><i class="fa fa-magnet"></i>Lead acquisition</h4>
<li>
<a href="#planner_page8">
<span class="fa fa-fw"/>Incoming Emails
</a>
</li>
<h4><i class="fa fa-magic"></i> Deployment</h4>
<h4><i class="fa fa-magic"></i>Deployment</h4>
<li>
<a href="#planner_page10">
<span class="fa fa-fw"/>Reporting
@@ -144,7 +144,7 @@
<span class="fa fa-fw"/>Your Users
</a>
</li>
<h4><i class="fa fa-bolt"></i> Grow Revenues</h4>
<h4><i class="fa fa-bolt"></i>Grow Revenues</h4>
<li>
<a href="#planner_page12">
<span class="fa fa-fw"/>Weekly Meeting
@@ -166,38 +166,38 @@
<!--Planner Pages-->
<div class="pages col-sm-8 col-md-9 col-xs-12">
<div id="planner_page1" class="planner-page show">
<h1>Welcome.</h1>
<i><p>
Congratulations on taking the leap to boost your sales
activities!
</p><p>
Odoo CRM will help you handle your sales funnel, bringing
your sales vision to life in a simple and seamless way.
</p><p>
Configuring Odoo CRM is easy. But you'll have bigger
challenges like; structuring your sales process, building
sales tools and training your teams. That's why we developed
this tool. We want you to succeed boosting your sales
performance.
</p><p>
If you get stuck, get in touch with our CRM experts, using
the "Help" button on the top menu. Every Odoo Enterprise
customer benefit from an unlimited support, don't hesitate
to abuse it. We are here to help you.
</p>
<p class="mb32">
We wish you a fun time,
</p></i>
<img src="/planner/static/src/img/fabien_pinckaers.jpg" class="pull-left mb32"/>
<div class="pull-left" style="margin-left: 10px">
<img class="signature mb8" src="/planner/static/src/img/fabien_signature.png"/>
<address>
For the Odoo Team,<br/>
Fabien Pinckaers, Founder
</address>
<div id="planner_page1" class="planner-page show">
<h1>Welcome.</h1>
<i><p>
Congratulations on taking the leap to boost your sales
activities!
</p><p>
Odoo CRM will help you handle your sales funnel, bringing
your sales vision to life in a simple and seamless way.
</p><p>
Configuring Odoo CRM is easy. But you'll have bigger
challenges like; structuring your sales process, building
sales tools and training your teams. That's why we developed
this tool. We want you to succeed boosting your sales
performance.
</p><p>
If you get stuck, get in touch with our CRM experts, using
the "Help" button on the top menu. Every Odoo Enterprise
customer benefit from an unlimited support, don't hesitate
to abuse it. We are here to help you.
</p>
<p class="mb32">
We wish you a fun time,
</p></i>
<img src="/web_planner/static/src/img/fabien_pinckaers.jpg" class="pull-left mb32"/>
<div class="pull-left" style="margin-left: 10px">
<img class="signature mb8" src="/web_planner/static/src/img/fabien_signature.png"/>
<address>
For the Odoo Team,<br/>
Fabien Pinckaers, Founder
</address>
</div>
</div>
</div>
<div id="planner_page2" class="planner-page">
<h1>Your expectations</h1>
@@ -207,14 +207,11 @@
of a successful implementation.
</p>
<div class="row">
<div class="notebook-container col-md-12 col-xs-12">
<ul class="notebook">
<div class="lines"></div>
<li class="header">
<h5><strong>Sales objectives</strong> by priority:</h5>
<a class="pull-right" data-toggle="collapse" href=".collapseOne">
<i class="fa fa-question-circle"></i>
</a>
@@ -255,7 +252,7 @@
</p>
<div class="row">
<div class="notebook-container col-md-12 col-xs-12">
<div class="notebook-container col-md-12">
<ul class="notebook">
<div class="lines"></div>
<li class="header">
@@ -296,7 +293,7 @@
performance.
</p>
<div class="row">
<div class="notebook-container col-md-12 col-xs-12">
<div class="notebook-container col-md-12">
<ul class="notebook columns">
<li class="row header">
<div class="col-xs-12 col-md-4 col-md-push-8 fa fa-lightbulb-o">
@@ -376,7 +373,6 @@
</tr>
</tbody>
</table>
<div class="row">
<div class="col-md-8 col-xs-12 ">
<div class="well well-lg footer-well">
@@ -919,7 +915,7 @@
</div>
</div>
<div class="row">
<div class="col-md-12 col-xs-12">
<div class="col-md-12">
<p>
You don't need to review lost opportunities at every sales meeting, but it's good
practice to do it at least once a month. Ask your team to set tags on opportunities to
@@ -957,9 +953,6 @@
class="btn odoo_purple btn_install">
<span class="fa fa-arrow-circle-o-down"/> Install Live Chat</a>
</div>
<div class="clearfix visible-xs-block mb5"></div>
<div class="text-center col-md-4 col-xs-6">
<span class="fa fa-check-square-o fa-4x"></span>
<h3><strong>Survey</strong></h3>
@@ -968,9 +961,7 @@
class="btn odoo_purple btn_install">
<span class="fa fa-arrow-circle-o-down"/> Install Surveys</a>
</div>
<div class="clearfix hidden-xs mb5"></div>
<div class="text-center col-md-4 col-xs-6">
<span class="fa fa-home fa-4x"></span>
<h3><strong>Website Builder</strong></h3>
@@ -979,9 +970,6 @@
class="btn odoo_purple btn_install">
<span class="fa fa-arrow-circle-o-down"/> Install Website Builder</a>
</div>
<div class="clearfix visible-xs-block mb5"></div>
<div class="text-center col-md-4 col-xs-6">
<span class="fa fa-calendar-o fa-4x"></span>
<h3><strong>Events</strong></h3>
@@ -990,7 +978,7 @@
class="btn odoo_purple btn_install">
<span class="fa fa-arrow-circle-o-down"/> Install Events</a>
</div>
<div class="text-center col-md-4 col-xs-6">
<div class="text-center col-md-4 col-xs-6 mb5">
<span class="fa fa-credit-card fa-4x"></span>
<h3><strong>e-Commerce</strong></h3>
<p>Boost your online sales with sleek product pages.</p>
@@ -998,6 +986,7 @@
class="btn odoo_purple btn_install">
<span class="fa fa-arrow-circle-o-down"/> Install e-Commerce</a>
</div>
</div>
</section>
</div>
@@ -1005,12 +994,12 @@
<div id="planner_page16" class="planner-page text-centered">
<h1 class="text-center trophy" data-icon="&#xe006;" />
<div class="text-center">
<h1>Congratulations, you're done !</h1>
<h3 class="mb1">We hope this process helped you improve your sales strategy.</h3>
<h4 class="mb2">Don't hesitate to <a href="mailto:info@odoo.com?subject=Sales%20Planner" target="_blank">send us an email</a> to describe<br/> your experience or to suggest improvements !</h4>
<h1>Congratulations, you're done !</h1>
<h3 class="mb1">We hope this process helped you improve your sales strategy.</h3>
<h4 class="mb2">Don't hesitate to <a href="mailto:info@odoo.com?subject=Sales%20Planner" target="_blank">send us an email</a> to describe<br/> your experience or to suggest improvements !</h4>
<p>Happy Selling!<br/>- The Odoo Team</p>
<img src="/planner/static/src/img/odoo_logo.png"/>
<p>Happy Selling!<br/>- The Odoo Team</p>
<img src="/web_planner/static/src/img/odoo_logo.png"/>
</div>
</div>
</div>
@@ -1018,11 +1007,10 @@
</template>
<!--Planner Data-->
<record id="planner_crm" model="planner.planner">
<record id="planner_crm" model="web.planner">
<field name="name">Sales strategy planner</field>
<field name="view_id" ref="crm_planner"/>
<field name="menu_id" ref="base.menu_base_partner"/>
<field name="progress">5</field>
<field name="planner_application">planner_crm</field>
<field name="tooltip_planner"><![CDATA[
Plan your sales strategy: objectives, leads, KPIs, and much more!
@@ -1,4 +0,0 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_planner_emp,planner.planner.emp,model_planner_planner,base.group_user,1,1,0,0
access_planner_manager,planner.planner.manager,model_planner_planner,base.group_erp_manager,1,1,1,1
access_planner_portal,planner.planner.portal,model_planner_planner,base.group_portal,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_planner_emp planner.planner.emp model_planner_planner base.group_user 1 1 0 0
3 access_planner_manager planner.planner.manager model_planner_planner base.group_erp_manager 1 1 1 1
4 access_planner_portal planner.planner.portal model_planner_planner base.group_portal 1 0 0 0
-22
View File
@@ -1,22 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Odoo, Open Source Management Solution
# Copyright (C) 2014-Today Odoo SA (<http://www.odoo.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 models
-16
View File
@@ -1,16 +0,0 @@
# -*- coding: utf-8 -*-
{
'name': 'CRM Planner',
'summary': 'Help to configure application',
'version': '1.0',
'category': 'Planner',
'description': """Plan your sales strategy: objectives, leads, KPIs, and much more!""",
'author': 'Odoo SA',
'depends': ['planner', 'crm'],
'data': [
'data/planner_data.xml',
'views/planner_crm.xml'
],
'installable': True,
'auto_install': True,
}
-3
View File
@@ -1,3 +0,0 @@
# -*- coding: utf-8 -*-
import planner_crm
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

@@ -1,301 +0,0 @@
#PlannerModal {
font-family: "Lato", serif;
.flip {
-moz-transform: scaleX(-1);
-o-transform: scaleX(-1);
-webkit-transform: scaleX(-1);
transform: scaleX(-1);
filter: FlipH;
-ms-filter: "FlipH";
}
.relative {
position: relative;
}
// PARAGRAPHS
.paragraphs .icon {
text-align: center;
font-size: 2em;
margin: 1em auto .5em;
color: #21b799;
}
//NOTEBOOK
.notebook-container {
margin: 20px 0;
}
.notebook {
color: #555;
font-size: 22px;
padding: 0 !important;
width: 100%;
font-family: courier, monospace;
border: 1px solid #faebcc;
margin: 0;
color: #8a6d3b;
position: relative;
z-index: 1;
background-color: #fcf8e3;
textarea,input {
background: #fcf8e3;
border: none;
/* min-width: 90%;
max-width: 90%; */
font-size: 15px;
line-height: 17px;
}
> li {
list-style: none;
border-bottom: 1px dashed #C1D6DA;
height: auto;
padding: 10px 10px 5px 55px;
text-transform: capitalize;
margin: 0;
span {
position: absolute;
left: 9px;
color: rgb(199, 180, 146);
font-size: 20px;
font-weight: bold;
}
}
> li:last-child { border-bottom: 0;}
li.header {
h5{padding-left: 0px}
div.dropdown { display: inline;float:right; }
span {position: relative; left: 0;}
a {
color: #C4A87A;
position: absolute;
top: 13px;
right: 13px;
&:hover {
text-decoration: none;
color: #9C855D;
}
}
select {
margin-top: 10px;
margin-bottom: 10px;
width: 100%;
max-width: 80%;
font-family: sans-serif;
font-size: 17px;
color: #8A6D3B;
border: none;
background: #F5E7CF;
}
.help{
font-size: 14px;
color: rgb(126, 95, 41);
background: #fcf8e3;
background: -moz-linear-gradient(top, #fcf8e3 0%, #FFF8D7 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fcf8e3), color-stop(100%,#FFF8D7));
background: -webkit-linear-gradient(top, #fcf8e3 0%,#FFF8D7 100%);
background: -o-linear-gradient(top, #fcf8e3 0%,#FFF8D7 100%);
background: -ms-linear-gradient(top, #fcf8e3 0%,#FFF8D7 100%);
background: linear-gradient(to bottom, #fcf8e3 0%,#FFF8D7 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcf8e3', endColorstr='#FFF8D7',GradientType=0 );
padding: 0 1em;
margin: 0;
border: none;
z-index: 10;
position: relative;
box-shadow: inset 0 10px 10px -9px #A89E64;
margin: 0px -10px 0px -55px;
h5 {padding: 14px 0 0; text-indent:0; display: inline-block;}
ul { padding: 0 20px 20px 50px;}
li {text-indent: 0; font-style: italic;}
}
}
> li:not(.header):hover {
background-color: #F5EFD0;
-webkit-transition: all 0.2s;
-moz-transition: all 0.2s;
-ms-transition: all 0.2s;
-o-transition: all 0.2s;
}
.lines {
border-left: 1px solid #ffaa9f;
border-right: 1px solid #ffaa9f;
background: transparent;
position: absolute;
width: 3px;
height: 100%;
top: 0;
left: 42px;
border-bottom: 0;
border-top: 0;
}
}
.notebook.columns {
li.header{
padding: 10px 10px 5px 55px;
h5{padding: 0}
}
textarea,input {
vertical-align: top;
margin-bottom: 1em;
}
}
.notebook-container:after {
content: "";
display: block;
width: 94%;
left: 20px;
background: transparent;
height: 100%;
position: absolute;
bottom: -5px;
z-index: 0;
background-color: #fcf8e3;
border: 1px solid #faebcc;
}
.info_icon{
position: relative;
padding-left: 5em;
overflow: hidden;
min-height: 6em;
span.fa{
position: absolute;
font-size: 5em;
top: 0.2em;
left: 0.2em;
opacity: 0.6;
color: white;
}
}
.alert-info.info_icon span.fa { color: #8ABCD4; }
.arrow-down {
width: 0;
height: 0;
border-left: 30px solid transparent;
border-right: 30px solid transparent;
border-top: 15px solid #D6D6D6;
position: absolute;
margin-left: -30px;
bottom: -15px;
}
#planner_page1 {
h1 {margin-bottom: 20px;}
mb32 {
margin-bottom: 32px;
}
mb8 {
margin-bottom: 8px;
}
}
#planner_page2,#planner_page3 {
textarea{
width: 100%;
max-width: 100%;
}
}
#planner_page4 {
textarea {
width: 58%;
max-width: 58%;
}
}
#planner_page5, #planner_page7, #planner_page8, #planner_page10, #planner_page11 {
.container-fluid {
.col-xs-12 {
padding: 5px;
&:first-child {
padding-left: 0;
}
&:last-child {
padding-right: 0;
}
}
}
}
#planner_page11 {
.container-fluid {
.col-xs-12 .panel-heading {
min-height: 200px;
padding: 0;
font-size: 1.1em;
color: #407241;
a {
display: block;
padding: 20px;
height: 100%;
width: 100%;
position: absolute;
padding-top: 40px;
padding-left: 10px;
}
}
}
}
#planner_page16 {
.trophy{
font-size: 11em;
color: #A24689;
margin-top: .5em;
-webkit-animation-name: bounceIn;
animation-name: bounceIn;
-webkit-animation-duration: 1.75s;
animation-duration: 1.75s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
}
}
// XS size
@media screen and (max-width: 768px) {
#PlannerModal .pages {
margin-top: 0px;
}
#PlannerModal .counter {
padding: 6px 0 0 5px;
}
}
// SM size
@media screen and (min-width: 769px) {
#PlannerModal .paragraphs {
div.col-md-10 {
margin-top:1em;
}
.icon {
text-align: center;
font-size: 2em;
margin: 1em auto .5em;
}
span {
transform: translateX(-8px);
position: relative;
display: block;
}
}
}
// MD size
@media screen and (min-width: 992px) {
#PlannerModal .paragraphs .icon {
text-align: center;
font-size: 4em;
margin: 0.3em auto .5em;
span{
transform: translateX(0px);
position: relative;
display: block;
}
}
}
-10
View File
@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="assets_backend" name="planner crm assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link href="/planner_crm/static/src/less/planner_crm.less" rel="stylesheet" type="text/less"/>
<script type="text/javascript" src="/planner_crm/static/src/js/planner_crm.js"></script>
</xpath>
</template>
</odoo>
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
{
'name': 'Planner',
'category': 'Planner',
@@ -10,10 +9,11 @@
'depends': ['web'],
'data': [
'security/ir.model.access.csv',
'views/planner.xml',
'security/planner_security.xml',
'security/web_planner_security.xml',
'views/web_planner_templates.xml',
'views/web_planner_views.xml',
],
'qweb': ['static/src/xml/planner.xml'],
'qweb': ['static/src/xml/web_planner.xml'],
'installable': True,
'auto_install': True,
}
@@ -1,2 +1,2 @@
# -*- coding: utf-8 -*-
import planner
import web_planner
@@ -13,7 +13,7 @@ class Planner(models.Model):
generate the values used to display in specific planner pages
"""
_name = 'planner.planner'
_name = 'web.planner'
_description = 'Planner'
@api.model
@@ -24,10 +24,11 @@ class Planner(models.Model):
menu_id = fields.Many2one('ir.ui.menu', string='Menu', required=True)
view_id = fields.Many2one('ir.ui.view', string='Template', required=True)
progress = fields.Integer(string="Progress Percentage", default=5)
# used to store the data filled by user in planner(JSON Data)
# data field is used to store the data filled by user in planner(JSON Data)
data = fields.Text(string='Data')
tooltip_planner = fields.Html(string='Planner Tooltips', translate=True)
planner_application = fields.Selection('_get_planner_application', string='Planner Application', required=True)
active = fields.Boolean(string="Active", default=True, help="If the active field is set to False, it will allow you to hide the planner. This change requires a refreshing a your page.")
@api.model
def render(self, template_id, planner_app):
@@ -42,7 +43,9 @@ class Planner(models.Model):
@api.model
def prepare_backend_url(self, action_xml_id, view_type='list', module_name=None):
""" prepare the backend url to the given action, or to the given module view. """
""" prepare the backend url to the given action, or to the given module view.
:returns dict : the value used to render the planer template
"""
action = self.env.ref(action_xml_id, False)
url = "/web#view_type=%s&action=%s" % (view_type, action and action.id or '')
if module_name:
@@ -0,0 +1,4 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_planner_emp,planner.planner.emp,model_web_planner,base.group_user,1,1,0,0
access_planner_manager,planner.planner.manager,model_web_planner,base.group_erp_manager,1,1,1,1
access_planner_portal,planner.planner.portal,model_web_planner,base.group_portal,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_planner_emp planner.planner.emp model_web_planner base.group_user 1 1 0 0
3 access_planner_manager planner.planner.manager model_web_planner base.group_erp_manager 1 1 1 1
4 access_planner_portal planner.planner.portal model_web_planner base.group_portal 1 0 0 0
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Ensure that the portal user doesn't have access to any planner that is not designed for him -->
<record model="ir.rule" id="planner_portal_empty">
<record id="web_planner_rule_portal" model="ir.rule">
<field name="name">Portal Planner</field>
<field name="model_id" ref="model_planner_planner"/>
<field name="model_id" ref="model_web_planner"/>
<field name="perm_read" eval="1" />
<field name="domain_force">[('planner_application', '=', 'portal')]</field>
<field name="groups" eval="[(4, ref('base.group_public'))]"/>

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Before

Width:  |  Height:  |  Size: 178 KiB

After

Width:  |  Height:  |  Size: 178 KiB

Before

Width:  |  Height:  |  Size: 175 KiB

After

Width:  |  Height:  |  Size: 175 KiB

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 212 B

After

Width:  |  Height:  |  Size: 212 B

@@ -1,4 +1,4 @@
odoo.define('planner.planner', function (require) {
odoo.define('web.planner', function (require) {
"use strict";
var core = require('web.core');
@@ -39,7 +39,7 @@ var PlannerLauncher = Widget.extend({
if (!_.isEmpty(this.planner_by_menu)) {
def.resolve(self.planner_by_menu);
}else{
(new Model('planner.planner')).query().all().then(function(res) {
(new Model('web.planner')).query().all().then(function(res) {
_.each(res, function(planner){
self.planner_by_menu[planner.menu_id[0]] = planner;
self.planner_by_menu[planner.menu_id[0]].data = $.parseJSON(self.planner_by_menu[planner.menu_id[0]].data) || {};
@@ -135,7 +135,7 @@ var PlannerDialog = Widget.extend({
// ui
_setup_view: function(){
var self = this;
return (new Model('planner.planner')).call('render', [self.planner.view_id[0], self.planner.planner_application]).then(function(res) {
return (new Model('web.planner')).call('render', [self.planner.view_id[0], self.planner.planner_application]).then(function(res) {
self.$('.content_page').html(res);
// add footer to each page
self.add_pages_footer();
@@ -268,7 +268,7 @@ var PlannerDialog = Widget.extend({
this._save_planner_data();
},
_save_planner_data: function() {
return (new Model('planner.planner')).call('write', [this.planner.id, {'data': JSON.stringify(this.planner.data), 'progress': this.planner.progress}]);
return (new Model('web.planner')).call('write', [this.planner.id, {'data': JSON.stringify(this.planner.data), 'progress': this.planner.progress}]);
},
// user actions
mark_as_done: function(ev) {
@@ -2,11 +2,11 @@
@font-face {
font-family: 'Simple-Line-Icons';
src:url('/planner/static/src/fonts/Simple-Line-Icons.eot');
src:url('/planner/static/src/fonts/Simple-Line-Icons.eot?#iefix') format('embedded-opentype'),
url('/planner/static/src/fonts/Simple-Line-Icons.woff') format('woff'),
url('/planner/static/src/fonts/Simple-Line-Icons.ttf') format('truetype'),
url('/planner/static/src/fonts/Simple-Line-Icons.svg#Simple-Line-Icons') format('svg');
src:url('/web_planner/static/src/fonts/Simple-Line-Icons.eot');
src:url('/web_planner/static/src/fonts/Simple-Line-Icons.eot?#iefix') format('embedded-opentype'),
url('/web_planner/static/src/fonts/Simple-Line-Icons.woff') format('woff'),
url('/web_planner/static/src/fonts/Simple-Line-Icons.ttf') format('truetype'),
url('/web_planner/static/src/fonts/Simple-Line-Icons.svg#Simple-Line-Icons') format('svg');
font-weight: normal;
font-style: normal;
}
@@ -173,7 +173,6 @@
}
}
#oe_main_menu_navbar.navbar {
.oe_planner_systray {
width: 100px;
@@ -192,10 +191,11 @@
#PlannerModal {
font-family: "Lato", serif;
.planner-page{
display : none;
}
.planner-dialog {
width: 85%;
font-family: "Lato", serif;
@@ -206,8 +206,6 @@
//button close
button.close {
width: 13px;
height: 30px;
opacity: 1;
line-height: 30px;
font-size: 16px;
@@ -241,11 +239,8 @@
}
.odoo_purple, a.btn.odoo_purple {
background-color: #A24689;
border:none;
text-shadow:none;
color: white;
}
.odoo_purple.btn:hover{
background: #a24689;
color: #fff;
@@ -262,7 +257,7 @@
right: 0;
bottom: 0;
.shadow {
background: url("/planner/static/src/img/shadow.png") center center repeat-x;
background: url("/web_planner/static/src/img/shadow.png") center center repeat-x;
height: 12px;
width: 100%;
display: block;
@@ -276,8 +271,6 @@
min-height: 60px;
}
button.fa-check-square-o {
background-color: transparent;
line-height: 0.8em;
font-size: 2em;
border: none;
@@ -316,8 +309,6 @@
}
.btn-next i {
transform: translateY(1px);
position: relative;
display: inline-block;
font-size: 1.3em;
margin-left: 10px;
}
@@ -352,9 +343,6 @@
font-size: 20em;
font-family: "FontAwesome";
content: "\f00c";
width: 100%;
height: 100%;
z-index: 999;
color: #21b799;
vertical-align: middle;
padding: 0.3em 0.7em;
@@ -387,7 +375,6 @@
border-right: 1px solid #E5E5E5;
background: #f7f7f7;
padding: 10px 12px 0 12px;
i.fa{
font-size: 1.7em;
padding-left: 0;
@@ -395,22 +382,19 @@
margin-top: 0.1em;
color: #929292;
}
.counter {
padding: 6px 0 0 8px;
font-weight: bold;
color: #727272;
font-size: 13px;
}
.progress {
background-color: #C4C4C4;
height: 30px;
padding: 3px;
border-radius: 4px;
}
.progress-bar {
background: #A24689;
background: #A24689;
background: -moz-linear-gradient(top, #cc59ab 0%, #a24689 8%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#cc59ab), color-stop(8%,#a24689));
background: -webkit-linear-gradient(top, #cc59ab 0%,#a24689 8%);
@@ -419,9 +403,6 @@
background: linear-gradient(to bottom, #cc59ab 0%,#a24689 8%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#cc59ab', endColorstr='#a24689',GradientType=0 );
border-radius: 4px;
font-weight: bold;
text-shadow: 0 1px 0 #4E2443;
line-height: 25px;
height: 95%;
box-shadow: 0 1px 0 #7A3067;
}
@@ -430,25 +411,19 @@
.dropdown.mobile {
padding: 10px 12px 0 0px;
.dropdown-menu{
width: 100%;
height: 250px;
overflow: auto;
}
.btn {
height: 30px;
line-height: 15px;
text-align: justify;
}
.dropdown-menu a {
color: #333;
padding: 3px;
}
.dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus {
background-color: #F3F3F3;
}
.dropdown-menu h4 {
padding: 10px 15px 0;
border-top: 1px solid #EAEAEA;
@@ -480,7 +455,6 @@
margin: auto -10px;
color: #444;
font-size: 13px;
border-radius: 0;
}
.nav-stacked li a:hover, .nav-stacked li a:focus {
text-decoration: none;
@@ -497,6 +471,131 @@
margin-right: 5px;
}
}
//NOTEBOOK
.notebook-container {
margin: 20px 0;
}
.notebook {
color: #555;
font-size: 22px;
padding: 0 !important;
font-family: courier, monospace;
border: 1px solid #faebcc;
color: #8a6d3b;
position: relative;
background-color: #fcf8e3;
textarea,input {
background: #fcf8e3;
border: none;
font-size: 15px;
line-height: 17px;
}
> li {
list-style: none;
border-bottom: 1px dashed #C1D6DA;
padding: 10px 10px 5px 55px;
text-transform: capitalize;
margin: 0;
span {
position: absolute;
left: 9px;
color: rgb(199, 180, 146);
font-size: 20px;
font-weight: bold;
}
}
> li:last-child { border-bottom: 0;}
li.header {
h5{padding-left: 0px}
div.dropdown { display: inline;float:right; }
span {position: relative; left: 0;}
a {
color: #C4A87A;
position: absolute;
top: 13px;
right: 13px;
&:hover {
text-decoration: none;
color: #9C855D;
}
}
select {
margin-bottom: 10px;
font-family: sans-serif;
font-size: 17px;
color: #8A6D3B;
border: none;
background: #F5E7CF;
}
.help{
font-size: 14px;
color: rgb(126, 95, 41);
background: #fcf8e3;
background: -moz-linear-gradient(top, #fcf8e3 0%, #FFF8D7 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fcf8e3), color-stop(100%,#FFF8D7));
background: -webkit-linear-gradient(top, #fcf8e3 0%,#FFF8D7 100%);
background: -o-linear-gradient(top, #fcf8e3 0%,#FFF8D7 100%);
background: -ms-linear-gradient(top, #fcf8e3 0%,#FFF8D7 100%);
background: linear-gradient(to bottom, #fcf8e3 0%,#FFF8D7 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcf8e3', endColorstr='#FFF8D7',GradientType=0 );
padding: 0 1em;
position: relative;
box-shadow: inset 0 10px 10px -9px #A89E64;
margin: 0px -10px 0px -55px;
h5 {padding: 14px 0 0; display: inline-block;}
ul { padding: 0 20px 20px 50px;}
li {font-style: italic;}
}
}
> li:not(.header):hover {
background-color: #F5EFD0;
-webkit-transition: all 0.2s;
-moz-transition: all 0.2s;
-ms-transition: all 0.2s;
-o-transition: all 0.2s;
}
.lines {
border-left: 1px solid #ffaa9f;
border-right: 1px solid #ffaa9f;
background: transparent;
position: absolute;
width: 3px;
height: 100%;
top: 0;
left: 42px;
border-bottom: 0;
border-top: 0;
}
}
.notebook.columns {
textarea,input {margin-bottom: 1em;}
}
.trophy {
font-size: 11em;
color: #A24689;
margin-top: .5em;
-webkit-animation-name: bounceIn;
animation-name: bounceIn;
-webkit-animation-duration: 1.75s;
animation-duration: 1.75s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
.alert-info.info_icon span.fa { color: #8ABCD4; }
.info_icon {
position: relative;
padding-left: 5em;
min-height: 6em;
span.fa {
position: absolute;
font-size: 5em;
left: 0.2em;
opacity: 0.6;
}
}
}
.pages {
color: #444;
@@ -510,7 +609,6 @@
> h1, > h2, > h3, > h4, > h5, > h6, > p, > strong, > i {
text-shadow:none;
}
h1 {
margin-top: 0;
font-size: 3.5em;
@@ -535,7 +633,6 @@
background: #21b799;
border-color: #26A38A;
text-shadow: 0 1px 0 #2E917D;
font-weight: normal;
line-height: 19px;
color: white;
}
@@ -544,4 +641,46 @@
color: white;
}
}
// PARAGRAPHS
.paragraphs .icon {
text-align: center;
font-size: 2em;
margin: 1em auto .5em;
color: #21b799;
}
}
// XS size
@media screen and (max-width: 768px) {
#PlannerModal .pages {
margin-top: 0px;
}
#PlannerModal .counter {
padding: 6px 0 0 5px;
}
}
// SM size
@media screen and (min-width: 769px) {
#PlannerModal .paragraphs {
div.col-md-10 {
margin-top:1em;
}
span {
transform: translateX(-8px);
position: relative;
display: block;
}
}
}
// MD size
@media screen and (min-width: 992px) {
#PlannerModal .paragraphs .icon {
font-size: 4em;
margin: 0.3em auto .5em;
span{
transform: translateX(0px);
position: relative;
display: block;
}
}
}
@@ -3,8 +3,8 @@
<odoo>
<template id="assets_backend" name="planner assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet" href="/planner/static/src/less/planner.less"/>
<script type="text/javascript" src="/planner/static/src/js/planner.js"></script>
<link rel="stylesheet" href="/web_planner/static/src/less/web_planner.less"/>
<script type="text/javascript" src="/web_planner/static/src/js/web_planner.js"></script>
</xpath>
</template>
</odoo>
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="web_planner_view_tree" model="ir.ui.view">
<field name="name">web.planner.view.tree</field>
<field name="model">web.planner</field>
<field name="arch" type="xml">
<tree string="Planner" editable="top">
<field name="name"/>
<field name="progress" readonly="True"/>
<field name="planner_application" readonly="True"/>
<field name="menu_id" readonly="True"/>
<field name="active"/>
</tree>
</field>
</record>
<record id="web_planner_view_search" model="ir.ui.view">
<field name="name">web.planner.view.search</field>
<field name="model">web.planner</field>
<field name="arch" type="xml">
<search string="Planner">
<filter name="active" string="Active" domain="[('active', '=', True)]"/>
<filter name="unactive" string="Unactive" domain="[('active', '=', False)]"/>
</search>
</field>
</record>
<record id="web_planner_action" model="ir.actions.act_window">
<field name="name">Planners</field>
<field name="res_model">web.planner</field>
<field name="view_type">form</field>
<field name='view_mode'>tree</field>
<field name="view_id" ref="web_planner_view_tree"/>
<field name="context">{'search_default_active': True}</field>
<field name="search_view_id" ref="web_planner_view_search"/>
</record>
<menuitem
id="web_planner_menu"
name="Planners"
action="web_planner_action"
parent="base.next_id_2"
sequence="10"/>
</odoo>