From 87c4a3a3b7406cd8bba071846e230f48d7c03da8 Mon Sep 17 00:00:00 2001 From: Anael Closson Date: Mon, 13 Aug 2012 19:04:29 +0200 Subject: [PATCH 01/22] initial note push bzr revid: acl@openerp.com-20120813170429-91dibb1dpe32j6w2 --- addons/crm_todo/crm_todo_view.xml | 2 +- addons/note/__init__.py | 23 ++++ addons/note/__openerp__.py | 59 +++++++++ addons/note/note.py | 134 +++++++++++++++++++ addons/note/note_view.xml | 158 +++++++++++++++++++++++ addons/note/security/ir.model.access.csv | 3 + addons/note/security/note_security.xml | 12 ++ addons/note/static/src/css/note.css | 58 +++++++++ 8 files changed, 448 insertions(+), 1 deletion(-) create mode 100644 addons/note/__init__.py create mode 100644 addons/note/__openerp__.py create mode 100644 addons/note/note.py create mode 100644 addons/note/note_view.xml create mode 100644 addons/note/security/ir.model.access.csv create mode 100644 addons/note/security/note_security.xml create mode 100644 addons/note/static/src/css/note.css diff --git a/addons/crm_todo/crm_todo_view.xml b/addons/crm_todo/crm_todo_view.xml index c959f1722e6..47b0655ac99 100644 --- a/addons/crm_todo/crm_todo_view.xml +++ b/addons/crm_todo/crm_todo_view.xml @@ -59,7 +59,7 @@ parent="base.menu_sales" action="crm_todo_action" sequence="6"/> - + diff --git a/addons/note/__init__.py b/addons/note/__init__.py new file mode 100644 index 00000000000..9bf064877b5 --- /dev/null +++ b/addons/note/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# 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 . +# +############################################################################## + +import note + diff --git a/addons/note/__openerp__.py b/addons/note/__openerp__.py new file mode 100644 index 00000000000..96938f56ef1 --- /dev/null +++ b/addons/note/__openerp__.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# 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 . +# +############################################################################## + + +{ + 'name': 'Notes', + 'version': '0.1', + 'category': 'Tools', + 'description': """ +This module allows users to create their own notes inside OpenERP +============================================================================== + +With this module you can allow users to take notes inside OpenERP. +These notes can be shared with OpenERP or external users. +They also can be organized following user dependant categories. +Notes can be found in the 'Home' main menu, under 'Tool' submenu. +""", + 'author': 'OpenERP SA', + 'website': 'http://openerp.com', + 'depends': ['base_tools','mail','pad'], + 'init_xml': [], + 'update_xml': [ + 'security/note_security.xml', + 'security/ir.model.access.csv', + 'note_view.xml', + #'note_workflow.xml', + ], + 'demo_xml': [ + #"note_data.xml" + ], + 'test':[ + ], + 'css': [ + 'static/src/css/note.css', + ], + 'installable': True, + 'application': True, + 'category': 'Tools', + 'images': [], +} +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/note/note.py b/addons/note/note.py new file mode 100644 index 00000000000..a9afad770c4 --- /dev/null +++ b/addons/note/note.py @@ -0,0 +1,134 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# 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 . +# +############################################################################## + +from openerp.osv import osv, fields +from tools.translate import _ + +# +# Todo : + + +# ** fix editable when in form view ** not atm +# fix search +# fix design +# rights + + +class note_stage(osv.Model): + """ Category of Note """ + + _name = "note.stage" + _description = "Note Stage" + _columns = { + 'name': fields.char('Category Name', size=64, required=True), + 'sequence': fields.integer('Sequence', help="Used to order the note stages"), + 'user_id': fields.many2one('res.users', 'Owner', help="Owner of the note stage.", required=True, readonly=True), + 'fold': fields.boolean('Folded'), + + } + _sql_constraints = [ + ] + + _order = 'sequence asc' + + _defaults = { + 'fold': 0, + 'user_id': lambda self, cr, uid, ctx: uid, + 'sequence' : 1, + } + + def __init__(self, pool, cr): + osv.Model.__init__(self,pool, cr) + + +# class many2many_filter(fields.many2many) + +# grep many2many_mod dans le code + + + +class note_note(osv.Model): + """ Note """ + _name = 'note.note' + _inherit = ['mail.thread','pad.common'] + _pad_fields = ['note_pad'] + _description = "Note" + + def _get_note_first_line(self, cr, uid, ids, name, args, context=None): + res = {} + for note in self.browse(cr, uid, ids, context=context): + res[note.id] = note.note.split('\n')[0] + return res + + def _set_note_first_line(self, cr, uid, id, name, value, args, context=None): + # + # todo should set the pad first line (as title) + # + return self.write(cr, uid, [id], {'name': value}, context=context) + + _columns = { + 'name': fields.function(_get_note_first_line,_fnct_inv=_set_note_first_line, string='Note Summary', type="text", store=True), + 'note': fields.text('Pad Content'), + 'note_pad': fields.char('Pad Url', size=250), + 'sequence': fields.integer('Sequence'), + 'stage_id': fields.many2one('note.stage', 'Stage'), + 'active': fields.boolean('Active'), + 'color': fields.integer('Color Index'), + #'follower_ids': fields.one2many('mail.subscription', 'res_id', 'Followers', domain=[('res_model','=', 'note.note')]) + 'follower_ids': fields.many2many('res.users', 'mail_subscription', 'res_id', 'user_id', 'Followers', join_filter="mail_subscription.res_model='note.note'") + } + + _sql_constraints = [ + ] + + + def _get_default_stage_id(self,cr,uid,context=None): + id = self.pool.get('note.stage').search(cr,uid,[('sequence','=','1')]) + return id[0] + + _defaults = { + 'active' : 1, + 'stage_id' : _get_default_stage_id, + 'note_pad': lambda self, cr, uid, context: self.pad_generate_url(cr, uid, context), + } + + + _order = 'sequence asc' + + + + def _read_group_stage_ids(self, cr, uid, ids, domain, read_group_order=None, access_rights_uid=None, context=None): + access_rights_uid = access_rights_uid or uid + stage_obj = self.pool.get('note.stage') + + # only show stage groups not folded and owned by user + search_domain = [('fold', '=', False),('user_id', '=', uid)] + + stage_ids = stage_obj._search(cr, uid, search_domain, order=self._order, access_rights_uid=access_rights_uid, context=context) + result = stage_obj.name_get(cr, access_rights_uid, stage_ids, context=context) + return result + + _group_by_full = { + 'stage_id' : _read_group_stage_ids, + } + + def stage_set(self,cr,uid,ids,stage_id,context=None): + self.write(cr,uid,ids,{'stage_id': stage_id}) diff --git a/addons/note/note_view.xml b/addons/note/note_view.xml new file mode 100644 index 00000000000..9f8c91e9c62 --- /dev/null +++ b/addons/note/note_view.xml @@ -0,0 +1,158 @@ + + + + + + + note.stage.form + note.stage + form + +
+ + + +
+
+
+ + + + + + note.stage.tree + note.stage + tree + + + + + + + + + + + + + + Stages + note.stage + form + tree,form + [('user_id','=',uid)] + + + + + + + + + note.note.kanban + note.note + kanban + + + + + + + + + + + +
+ +
+ í +
+ + +
+ + + + +
+ +
+ + + +
+ +
+
+
+
+
+
+
+ + + + + + note.note.form + note.note + form + +
+
+ + +
+ +
+ +
+ +
+
+ + + + note.note.search + note.note + search + + + + + + + + + + + + + + + + note.note.tree + note.note + tree + + + + + Notes + note.note + form + kanban,tree,form + + + + + +
+
diff --git a/addons/note/security/ir.model.access.csv b/addons/note/security/ir.model.access.csv new file mode 100644 index 00000000000..fdd6030ca51 --- /dev/null +++ b/addons/note/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_note_stage_user,note.stage user,model_note_stage,base.group_user,1,1,1,1 +access_note_note_user,note.note user,model_note_note,base.group_user,1,1,1,1 diff --git a/addons/note/security/note_security.xml b/addons/note/security/note_security.xml new file mode 100644 index 00000000000..46eebee629c --- /dev/null +++ b/addons/note/security/note_security.xml @@ -0,0 +1,12 @@ + + + + + My notes + + + [('follower_ids','=',user.id)] + + + + diff --git a/addons/note/static/src/css/note.css b/addons/note/static/src/css/note.css new file mode 100644 index 00000000000..a6b097ece88 --- /dev/null +++ b/addons/note/static/src/css/note.css @@ -0,0 +1,58 @@ + + +.openerp .oe_webclient .oe_application .oe_view_manager .oe_view_manager_body .oe_view_manager_view_kanban .oe_kanban_view .oe_kanban_groups .oe_kanban_groups_records .oe_kanban_column .oe_fold_column .oe_kanban_card { + text-decoration:none; + color:#000; + display:block; + padding:1em; + margin-right: 1em; + margin-bottom: 1em; + + -moz-box-shadow:5px 5px 7px rgba(33,33,33,1); + -webkit-box-shadow: 5px 5px 7px rgba(33,33,33,.7); + box-shadow: 5px 5px 7px rgba(33,33,33,.7); +} + + +.openerp .oe_webclient .oe_application .oe_view_manager .oe_view_manager_body .oe_view_manager_view_kanban .oe_kanban_view .oe_kanban_groups .oe_kanban_groups_records .oe_kanban_column .oe_fold_column .oe_kanban_card { + -webkit-transform: rotate(-3deg); + -o-transform: rotate(-3deg); + -moz-transform:rotate(-3deg); +} + +.openerp .oe_webclient .oe_application .oe_view_manager .oe_view_manager_body .oe_view_manager_view_kanban .oe_kanban_view .oe_kanban_groups:nth-child(even) .oe_kanban_groups_records .oe_kanban_column .oe_fold_column .oe_kanban_card { + -o-transform:rotate(1deg); + -webkit-transform:rotate(1deg); + -moz-transform:rotate(1deg); + position:relative; + top:3px; +} + +.openerp .oe_webclient .oe_application .oe_view_manager .oe_view_manager_body .oe_view_manager_view_kanban .oe_kanban_view .oe_kanban_groups:nth-child(2n) .oe_kanban_groups_records .oe_kanban_column .oe_fold_column .oe_kanban_card { + -o-transform:rotate(-2deg); + -webkit-transform:rotate(-2deg); + -moz-transform:rotate(-2deg); + position:relative; + top:-3px; +} + +.openerp .oe_webclient .oe_application .oe_view_manager .oe_view_manager_body .oe_view_manager_view_kanban .oe_kanban_view .oe_kanban_groups:nth-child(2n) .oe_kanban_groups_records .oe_kanban_column .oe_fold_column .oe_kanban_card { + -o-transform:rotate(2deg); + -webkit-transform:rotate(2deg); + -moz-transform:rotate(2deg); + position:relative; + top:-5px; +} + +.openerp .oe_webclient .oe_application .oe_view_manager .oe_view_manager_body .oe_view_manager_view_kanban .oe_kanban_view .oe_kanban_groups .oe_kanban_groups_records .oe_kanban_column .oe_fold_column .oe_kanban_card:hover, +.openerp .oe_webclient .oe_application .oe_view_manager .oe_view_manager_body .oe_view_manager_view_kanban .oe_kanban_view .oe_kanban_groups .oe_kanban_groups_records .oe_kanban_column .oe_fold_column .oe_kanban_card:focus +{ + box-shadow:10px 10px 7px rgba(0,0,0,.7); + -moz-box-shadow:10px 10px 7px rgba(0,0,0,.7); + -webkit-box-shadow: 10px 10px 7px rgba(0,0,0,.7); + -webkit-transform: scale(1.25); + -moz-transform: scale(1.25); + -o-transform: scale(1.25); + position:relative; + z-index:5; +} From 876dc272424e78cf45db33dddd23ce994da1ba5e Mon Sep 17 00:00:00 2001 From: Anael Closson Date: Tue, 14 Aug 2012 16:21:51 +0200 Subject: [PATCH 02/22] wip bzr revid: acl@openerp.com-20120814142151-uwi6xkdamv623pos --- addons/note/__openerp__.py | 3 +- addons/note/note.py | 2 +- addons/note/note_data.xml | 224 +++++++++++++++++++++++++++ addons/note/note_view.xml | 4 +- addons/note/static/src/css/Makefile | 3 + addons/note/static/src/css/note.css | 79 +++++++--- addons/note/static/src/css/note.sass | 137 ++++++++++++++++ 7 files changed, 427 insertions(+), 25 deletions(-) create mode 100644 addons/note/note_data.xml create mode 100644 addons/note/static/src/css/Makefile create mode 100644 addons/note/static/src/css/note.sass diff --git a/addons/note/__openerp__.py b/addons/note/__openerp__.py index 96938f56ef1..c9200324bb7 100644 --- a/addons/note/__openerp__.py +++ b/addons/note/__openerp__.py @@ -41,10 +41,9 @@ Notes can be found in the 'Home' main menu, under 'Tool' submenu. 'security/note_security.xml', 'security/ir.model.access.csv', 'note_view.xml', - #'note_workflow.xml', ], 'demo_xml': [ - #"note_data.xml" + "note_data.xml" ], 'test':[ ], diff --git a/addons/note/note.py b/addons/note/note.py index a9afad770c4..89049bf6ec8 100644 --- a/addons/note/note.py +++ b/addons/note/note.py @@ -93,7 +93,7 @@ class note_note(osv.Model): 'active': fields.boolean('Active'), 'color': fields.integer('Color Index'), #'follower_ids': fields.one2many('mail.subscription', 'res_id', 'Followers', domain=[('res_model','=', 'note.note')]) - 'follower_ids': fields.many2many('res.users', 'mail_subscription', 'res_id', 'user_id', 'Followers', join_filter="mail_subscription.res_model='note.note'") + #'follower_ids': fields.many2many('res.users', 'mail_subscription', 'res_id', 'user_id', 'Followers', join_filter="mail_subscription.res_model='note.note'") } _sql_constraints = [ diff --git a/addons/note/note_data.xml b/addons/note/note_data.xml new file mode 100644 index 00000000000..15226bd48b0 --- /dev/null +++ b/addons/note/note_data.xml @@ -0,0 +1,224 @@ + + + + + Today + 1 + + + + Tomorrow + 2 + + + + This week + 3 + + + + This month + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/addons/note/note_view.xml b/addons/note/note_view.xml index 9f8c91e9c62..ded45474f2f 100644 --- a/addons/note/note_view.xml +++ b/addons/note/note_view.xml @@ -84,9 +84,11 @@
- +
diff --git a/addons/note/static/src/css/Makefile b/addons/note/static/src/css/Makefile new file mode 100644 index 00000000000..d6019f4ed4a --- /dev/null +++ b/addons/note/static/src/css/Makefile @@ -0,0 +1,3 @@ +note.css: note.sass + sass -t expanded note.sass note.css + diff --git a/addons/note/static/src/css/note.css b/addons/note/static/src/css/note.css index a6b097ece88..4b3c7e0e57d 100644 --- a/addons/note/static/src/css/note.css +++ b/addons/note/static/src/css/note.css @@ -1,6 +1,6 @@ -.openerp .oe_webclient .oe_application .oe_view_manager .oe_view_manager_body .oe_view_manager_view_kanban .oe_kanban_view .oe_kanban_groups .oe_kanban_groups_records .oe_kanban_column .oe_fold_column .oe_kanban_card { +.openerp .oe_fold_column .oe_kanban_card { text-decoration:none; color:#000; display:block; @@ -14,35 +14,72 @@ } -.openerp .oe_webclient .oe_application .oe_view_manager .oe_view_manager_body .oe_view_manager_view_kanban .oe_kanban_view .oe_kanban_groups .oe_kanban_groups_records .oe_kanban_column .oe_fold_column .oe_kanban_card { + +.oe_kanban_record .oe_kanban_card { + -webkit-transform: rotate(-2deg); + -o-transform: rotate(-2deg); + -moz-transform:rotate(-2deg); +} + +.oe_kanban_record:nth-of-type(even) .oe_kanban_card { + -webkit-transform: rotate(-1deg); + -o-transform: rotate(-1deg); + -moz-transform:rotate(-1deg); +} + + +.oe_kanban_record:nth-of-type(3n) .oe_kanban_card { + -webkit-transform: rotate(4deg); + -o-transform: rotate(4deg); + -moz-transform:rotate(4deg); +} + +.oe_kanban_column:nth-of-type(even) .oe_kanban_record .oe_kanban_card { + -webkit-transform: rotate(2deg); + -o-transform: rotate(2deg); + -moz-transform:rotate(2deg); +} + +.oe_kanban_column:nth-of-type(even) .oe_kanban_record:nth-of-type(even) .oe_kanban_card { -webkit-transform: rotate(-3deg); -o-transform: rotate(-3deg); -moz-transform:rotate(-3deg); } -.openerp .oe_webclient .oe_application .oe_view_manager .oe_view_manager_body .oe_view_manager_view_kanban .oe_kanban_view .oe_kanban_groups:nth-child(even) .oe_kanban_groups_records .oe_kanban_column .oe_fold_column .oe_kanban_card { - -o-transform:rotate(1deg); - -webkit-transform:rotate(1deg); +.oe_kanban_column:nth-of-type(even) .oe_kanban_record:nth-of-type(3n) .oe_kanban_card { + -webkit-transform: rotate(1deg); + -o-transform: rotate(1deg); -moz-transform:rotate(1deg); - position:relative; - top:3px; } +/* .openerp .oe_fold_column:nth-child(even) .oe_kanban_card { */ +/* -webkit-transform: rotate(-3deg); */ +/* -o-transform: rotate(-3deg); */ +/* -moz-transform:rotate(-3deg); */ +/* } */ -.openerp .oe_webclient .oe_application .oe_view_manager .oe_view_manager_body .oe_view_manager_view_kanban .oe_kanban_view .oe_kanban_groups:nth-child(2n) .oe_kanban_groups_records .oe_kanban_column .oe_fold_column .oe_kanban_card { - -o-transform:rotate(-2deg); - -webkit-transform:rotate(-2deg); - -moz-transform:rotate(-2deg); - position:relative; - top:-3px; -} +/* .openerp .oe_kanban_groups_records .oe_kanban_column .oe_fold_column:nth-child(even) .oe_kanban_card { */ +/* -o-transform:rotate(1deg); */ +/* -webkit-transform:rotate(1deg); */ +/* -moz-transform:rotate(1deg); */ +/* position:relative; */ +/* top:3px; */ +/* } */ -.openerp .oe_webclient .oe_application .oe_view_manager .oe_view_manager_body .oe_view_manager_view_kanban .oe_kanban_view .oe_kanban_groups:nth-child(2n) .oe_kanban_groups_records .oe_kanban_column .oe_fold_column .oe_kanban_card { - -o-transform:rotate(2deg); - -webkit-transform:rotate(2deg); - -moz-transform:rotate(2deg); - position:relative; - top:-5px; -} +/* .openerp .oe_fold_column:nth-child(3n) .oe_kanban_card { */ +/* -o-transform:rotate(-2deg); */ +/* -webkit-transform:rotate(-2deg); */ +/* -moz-transform:rotate(-2deg); */ +/* position:relative; */ +/* top:-3px; */ +/* } */ + +/* .openerp.oe_fold_column:nth-child(5n) .oe_kanban_card { */ +/* -o-transform:rotate(2deg); */ +/* -webkit-transform:rotate(2deg); */ +/* -moz-transform:rotate(2deg); */ +/* position:relative; */ +/* top:-5px; */ +/* } */ .openerp .oe_webclient .oe_application .oe_view_manager .oe_view_manager_body .oe_view_manager_view_kanban .oe_kanban_view .oe_kanban_groups .oe_kanban_groups_records .oe_kanban_column .oe_fold_column .oe_kanban_card:hover, .openerp .oe_webclient .oe_application .oe_view_manager .oe_view_manager_body .oe_view_manager_view_kanban .oe_kanban_view .oe_kanban_groups .oe_kanban_groups_records .oe_kanban_column .oe_fold_column .oe_kanban_card:focus diff --git a/addons/note/static/src/css/note.sass b/addons/note/static/src/css/note.sass new file mode 100644 index 00000000000..cd04015dcbb --- /dev/null +++ b/addons/note/static/src/css/note.sass @@ -0,0 +1,137 @@ +@charset "utf-8" + +// Variables {{{ +$section-title-color: #8786b7 +$tag-bg-light: #f0f0fa +$tag-bg-dark: #8786b7 +$tag-border: #afafb6 +$tag-border-selected: #a6a6fe +$hover-background: #f0f0fa +$link-color: #8a89ba +$sheet-max-width: 860px +// }}} +// Mixins {{{ +@font-face + font-family: 'mnmliconsRegular' + src: url('/web/static/src/font/mnmliconsv21-webfont.eot') format('eot') + src: url('/web/static/src/font/mnmliconsv21-webfont.woff') format('woff') + src: url('/web/static/src/font/mnmliconsv21-webfont.ttf') format('truetype') + src: url('/web/static/src/font/mnmliconsv21-webfont.svg') format('svg') active + font-weight: normal + font-style: normal + +@font-face + font-family: 'EntypoRegular' + src: url('/web/static/src/font/entypo-webfont.eot') format('eot') + src: url('/web/static/src/font/entypo-webfont.eot?#iefix') format('embedded-opentype') + src: url('/web/static/src/font/entypo-webfont.woff') format('woff') + src: url('/web/static/src/font/entypo-webfont.ttf') format('truetype') + src: url('/web/static/src/font/entypo-webfont.svg') format('svg') active + font-weight: normal + font-style: normal + +@mixin reset() + border: none + padding: 0 + margin: 0 + background: none + @include radius(none) + @include box-shadow(none) + +@mixin vertical-gradient($startColor: #555, $endColor: #333) + background-color: $startColor + background-image: -webkit-gradient(linear, left top, left bottom, from($startColor), to($endColor)) /* Saf4+, Chrome */ + background-image: -webkit-linear-gradient(top, $startColor, $endColor) /* Chrome 10+, Saf5.1+, iOS 5+ */ + background-image: -moz-linear-gradient(top, $startColor, $endColor) /* FF3.6 */ + background-image: -ms-linear-gradient(top, $startColor, $endColor) /* IE10 */ + background-image: -o-linear-gradient(top, $startColor, $endColor) /* Opera 11.10+ */ + background-image: linear-gradient(to bottom, $startColor, $endColor) + +@mixin radial-gradient($gradient) + background-position: center center + background-image: -webkit-radial-gradient(circle, $gradient) + background-image: -moz-radial-gradient($gradient) + background-image: -ms-radial-gradient($gradient) + background-image: radial-gradient($gradient) + +@mixin radius($radius: 5px) + -moz-border-radius: $radius + -webkit-border-radius: $radius + border-radius: $radius + +@mixin box-shadow($bsval: 0px 1px 4px #777) + -moz-box-shadow: $bsval + -webkit-box-shadow: $bsval + box-shadow: $bsval + +@mixin transition($transval: (border linear 0.2s, box-shadow linear 0.2s)) + -webkit-transition: $transval + -moz-transition: $transval + -ms-transition: $transval + -o-transition: $transval + transition: $transval + +@mixin opacity($opacity: .5) + filter: alpha(opacity=$opacity * 100) + opacity: $opacity + +@mixin background-clip($clip: padding-box) + -webkit-background-clip: $clip + -moz-background-clip: $clip + background-clip: $clip + +@mixin box-sizing($type: content) + // type = border || content || padding + -webkit-box-sizing: #{$type}-box + -moz-box-sizing: #{$type}-box + -ms-box-sizing: #{$type}-box + box-sizing: #{$type}-box + +// Transforms the (readable) text of an inline element into an mmlicons icon, +// allows for actual readable text in-code (and in readers?) with iconic looks +@mixin text-to-icon($icon-name, $color: #404040) + font-size: 1px + letter-spacing: -1px + color: transparent + &:before + font: 21px "mnmliconsRegular" + content: $icon-name + color: $color + +// }}} +// CSS animation bounces {{{ +@-moz-keyframes bounce + 0% + -moz-transform: scale(0) + opacity: 0 + 50% + -moz-transform: scale(1.3) + opacity: 0.4 + 75% + -moz-transform: scale(0.9) + opacity: 0.7 + 100% + -moz-transform: scale(1) + opacity: 1 + +@-webkit-keyframes bounce + 0% + -webkit-transform: scale(0) + opacity: 0 + 50% + -webkit-transform: scale(1.3) + opacity: 0.4 + 75% + -webkit-transform: scale(0.9) + opacity: 0.7 + 100% + -webkit-transform: scale(1) + opacity: 1 +// }}} + + +.oe_kanban_color_2 + background-color:red + +// au BufWritePost,FileWritePost *.sass :!sass --style expanded --line-numbers > "%:p:r.css" + From 56666953b38e7ea2c6e8e8bc8391bd6da9b64276 Mon Sep 17 00:00:00 2001 From: Anael Closson Date: Tue, 14 Aug 2012 17:18:00 +0200 Subject: [PATCH 03/22] Some fixes bzr revid: acl@openerp.com-20120814151800-e0adyvny6v17c3qr --- addons/note/note.py | 15 +------- addons/note/note_view.xml | 16 ++------- addons/note/static/src/css/note.css | 54 +++++++++++------------------ 3 files changed, 24 insertions(+), 61 deletions(-) diff --git a/addons/note/note.py b/addons/note/note.py index 89049bf6ec8..7d0ff170d79 100644 --- a/addons/note/note.py +++ b/addons/note/note.py @@ -22,16 +22,6 @@ from openerp.osv import osv, fields from tools.translate import _ -# -# Todo : - - -# ** fix editable when in form view ** not atm -# fix search -# fix design -# rights - - class note_stage(osv.Model): """ Category of Note """ @@ -55,9 +45,6 @@ class note_stage(osv.Model): 'sequence' : 1, } - def __init__(self, pool, cr): - osv.Model.__init__(self,pool, cr) - # class many2many_filter(fields.many2many) @@ -93,7 +80,7 @@ class note_note(osv.Model): 'active': fields.boolean('Active'), 'color': fields.integer('Color Index'), #'follower_ids': fields.one2many('mail.subscription', 'res_id', 'Followers', domain=[('res_model','=', 'note.note')]) - #'follower_ids': fields.many2many('res.users', 'mail_subscription', 'res_id', 'user_id', 'Followers', join_filter="mail_subscription.res_model='note.note'") + 'follower_ids': fields.many2many('res.users', 'mail_subscription', 'res_id', 'user_id', 'Followers', join_filter="mail_subscription.res_model='note.note'") } _sql_constraints = [ diff --git a/addons/note/note_view.xml b/addons/note/note_view.xml index ded45474f2f..39dca553c39 100644 --- a/addons/note/note_view.xml +++ b/addons/note/note_view.xml @@ -16,8 +16,6 @@ - - note.stage.tree @@ -77,18 +75,14 @@
- -
- +
@@ -99,8 +93,6 @@
- - note.note.form @@ -112,7 +104,7 @@ - +
@@ -137,7 +129,6 @@
- note.note.tree @@ -145,7 +136,6 @@ tree - Notes note.note diff --git a/addons/note/static/src/css/note.css b/addons/note/static/src/css/note.css index 4b3c7e0e57d..39800834417 100644 --- a/addons/note/static/src/css/note.css +++ b/addons/note/static/src/css/note.css @@ -13,8 +13,6 @@ box-shadow: 5px 5px 7px rgba(33,33,33,.7); } - - .oe_kanban_record .oe_kanban_card { -webkit-transform: rotate(-2deg); -o-transform: rotate(-2deg); @@ -22,12 +20,11 @@ } .oe_kanban_record:nth-of-type(even) .oe_kanban_card { - -webkit-transform: rotate(-1deg); - -o-transform: rotate(-1deg); - -moz-transform:rotate(-1deg); + -webkit-transform: rotate(1deg); + -o-transform: rotate(1deg); + -moz-transform:rotate(1deg); } - .oe_kanban_record:nth-of-type(3n) .oe_kanban_card { -webkit-transform: rotate(4deg); -o-transform: rotate(4deg); @@ -51,38 +48,27 @@ -o-transform: rotate(1deg); -moz-transform:rotate(1deg); } -/* .openerp .oe_fold_column:nth-child(even) .oe_kanban_card { */ -/* -webkit-transform: rotate(-3deg); */ -/* -o-transform: rotate(-3deg); */ -/* -moz-transform:rotate(-3deg); */ -/* } */ -/* .openerp .oe_kanban_groups_records .oe_kanban_column .oe_fold_column:nth-child(even) .oe_kanban_card { */ -/* -o-transform:rotate(1deg); */ -/* -webkit-transform:rotate(1deg); */ -/* -moz-transform:rotate(1deg); */ -/* position:relative; */ -/* top:3px; */ -/* } */ +.oe_kanban_column:nth-of-type(3n) .oe_kanban_record .oe_kanban_card { + -webkit-transform: rotate(-2deg); + -o-transform: rotate(-2deg); + -moz-transform:rotate(-2deg); +} -/* .openerp .oe_fold_column:nth-child(3n) .oe_kanban_card { */ -/* -o-transform:rotate(-2deg); */ -/* -webkit-transform:rotate(-2deg); */ -/* -moz-transform:rotate(-2deg); */ -/* position:relative; */ -/* top:-3px; */ -/* } */ +.oe_kanban_column:nth-of-type(3n) .oe_kanban_record:nth-of-type(even) .oe_kanban_card { + -webkit-transform: rotate(1deg); + -o-transform: rotate(1deg); + -moz-transform:rotate(1deg); +} -/* .openerp.oe_fold_column:nth-child(5n) .oe_kanban_card { */ -/* -o-transform:rotate(2deg); */ -/* -webkit-transform:rotate(2deg); */ -/* -moz-transform:rotate(2deg); */ -/* position:relative; */ -/* top:-5px; */ -/* } */ +.oe_kanban_column:nth-of-type(3n) .oe_kanban_record:nth-of-type(3n) .oe_kanban_card { + -webkit-transform: rotate(-1deg); + -o-transform: rotate(-1deg); + -moz-transform:rotate(-1deg); +} -.openerp .oe_webclient .oe_application .oe_view_manager .oe_view_manager_body .oe_view_manager_view_kanban .oe_kanban_view .oe_kanban_groups .oe_kanban_groups_records .oe_kanban_column .oe_fold_column .oe_kanban_card:hover, -.openerp .oe_webclient .oe_application .oe_view_manager .oe_view_manager_body .oe_view_manager_view_kanban .oe_kanban_view .oe_kanban_groups .oe_kanban_groups_records .oe_kanban_column .oe_fold_column .oe_kanban_card:focus +.openerp .oe_kanban_column .oe_fold_column .oe_kanban_card:hover, +.openerp .oe_kanban_column .oe_fold_column .oe_kanban_card:focus { box-shadow:10px 10px 7px rgba(0,0,0,.7); -moz-box-shadow:10px 10px 7px rgba(0,0,0,.7); From 531e077f1bcbbb4d3e45fe1985e6f246132b468e Mon Sep 17 00:00:00 2001 From: Anael Closson Date: Tue, 14 Aug 2012 17:42:40 +0200 Subject: [PATCH 04/22] [FIX] some misc fixes bzr revid: acl@openerp.com-20120814154240-on30lw5qfp66xj7q --- addons/note/note.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/addons/note/note.py b/addons/note/note.py index 7d0ff170d79..05c5ea6eadf 100644 --- a/addons/note/note.py +++ b/addons/note/note.py @@ -32,8 +32,8 @@ class note_stage(osv.Model): 'sequence': fields.integer('Sequence', help="Used to order the note stages"), 'user_id': fields.many2one('res.users', 'Owner', help="Owner of the note stage.", required=True, readonly=True), 'fold': fields.boolean('Folded'), - } + _sql_constraints = [ ] @@ -64,13 +64,13 @@ class note_note(osv.Model): for note in self.browse(cr, uid, ids, context=context): res[note.id] = note.note.split('\n')[0] return res - + def _set_note_first_line(self, cr, uid, id, name, value, args, context=None): # # todo should set the pad first line (as title) # return self.write(cr, uid, [id], {'name': value}, context=context) - + _columns = { 'name': fields.function(_get_note_first_line,_fnct_inv=_set_note_first_line, string='Note Summary', type="text", store=True), 'note': fields.text('Pad Content'), @@ -79,8 +79,7 @@ class note_note(osv.Model): 'stage_id': fields.many2one('note.stage', 'Stage'), 'active': fields.boolean('Active'), 'color': fields.integer('Color Index'), - #'follower_ids': fields.one2many('mail.subscription', 'res_id', 'Followers', domain=[('res_model','=', 'note.note')]) - 'follower_ids': fields.many2many('res.users', 'mail_subscription', 'res_id', 'user_id', 'Followers', join_filter="mail_subscription.res_model='note.note'") + 'follower_ids': fields.many2many('res.users', 'mail_subscription', 'res_id', 'user_id', 'Followers', join_filter="mail_subscription.res_model='note.note'") } _sql_constraints = [ @@ -97,18 +96,15 @@ class note_note(osv.Model): 'note_pad': lambda self, cr, uid, context: self.pad_generate_url(cr, uid, context), } - _order = 'sequence asc' - - def _read_group_stage_ids(self, cr, uid, ids, domain, read_group_order=None, access_rights_uid=None, context=None): access_rights_uid = access_rights_uid or uid stage_obj = self.pool.get('note.stage') - + # only show stage groups not folded and owned by user search_domain = [('fold', '=', False),('user_id', '=', uid)] - + stage_ids = stage_obj._search(cr, uid, search_domain, order=self._order, access_rights_uid=access_rights_uid, context=context) result = stage_obj.name_get(cr, access_rights_uid, stage_ids, context=context) return result From 2045fa1bbc297105f754c058c82f769806414153 Mon Sep 17 00:00:00 2001 From: Antonin Bourguignon Date: Fri, 17 Aug 2012 15:27:38 +0200 Subject: [PATCH 05/22] [IMP] note: update the module's descriptor bzr revid: abo@openerp.com-20120817132738-dgvgd3in70ylthwm --- addons/note/__openerp__.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/addons/note/__openerp__.py b/addons/note/__openerp__.py index c9200324bb7..576d2b82f46 100644 --- a/addons/note/__openerp__.py +++ b/addons/note/__openerp__.py @@ -19,34 +19,30 @@ # ############################################################################## - { 'name': 'Notes', 'version': '0.1', 'category': 'Tools', 'description': """ This module allows users to create their own notes inside OpenERP -============================================================================== +================================================================= With this module you can allow users to take notes inside OpenERP. These notes can be shared with OpenERP or external users. -They also can be organized following user dependant categories. +They also can be organized following user dependant categories. Notes can be found in the 'Home' main menu, under 'Tool' submenu. """, 'author': 'OpenERP SA', 'website': 'http://openerp.com', 'depends': ['base_tools','mail','pad'], - 'init_xml': [], - 'update_xml': [ + 'data': [ 'security/note_security.xml', 'security/ir.model.access.csv', 'note_view.xml', ], - 'demo_xml': [ + 'demo': [ "note_data.xml" ], - 'test':[ - ], 'css': [ 'static/src/css/note.css', ], @@ -55,4 +51,5 @@ Notes can be found in the 'Home' main menu, under 'Tool' submenu. 'category': 'Tools', 'images': [], } + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From 9c811fb481a8df3cea8f9788afe222ef7bea709c Mon Sep 17 00:00:00 2001 From: Antonin Bourguignon Date: Fri, 17 Aug 2012 15:52:49 +0200 Subject: [PATCH 06/22] [FIX] note: extract demo data in note_demo.xml bzr revid: abo@openerp.com-20120817135249-mg1eovpwt3u4lli2 --- addons/note/__openerp__.py | 3 +- addons/note/note_data.xml | 209 ++---------------------------------- addons/note/note_demo.xml | 214 +++++++++++++++++++++++++++++++++++++ 3 files changed, 223 insertions(+), 203 deletions(-) create mode 100644 addons/note/note_demo.xml diff --git a/addons/note/__openerp__.py b/addons/note/__openerp__.py index 576d2b82f46..2241e7bd980 100644 --- a/addons/note/__openerp__.py +++ b/addons/note/__openerp__.py @@ -41,7 +41,7 @@ Notes can be found in the 'Home' main menu, under 'Tool' submenu. 'note_view.xml', ], 'demo': [ - "note_data.xml" + "note_demo.xml", ], 'css': [ 'static/src/css/note.css', @@ -49,7 +49,6 @@ Notes can be found in the 'Home' main menu, under 'Tool' submenu. 'installable': True, 'application': True, 'category': 'Tools', - 'images': [], } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/note/note_data.xml b/addons/note/note_data.xml index 15226bd48b0..2a40923b0f4 100644 --- a/addons/note/note_data.xml +++ b/addons/note/note_data.xml @@ -1,224 +1,31 @@ + Today 1 - + + Tomorrow 2 - + + This week 3 - + + This month 4 - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/addons/note/note_demo.xml b/addons/note/note_demo.xml new file mode 100644 index 00000000000..3e960638de0 --- /dev/null +++ b/addons/note/note_demo.xml @@ -0,0 +1,214 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 9a7cc1436dba539d1ca1e16343700dabe9227a48 Mon Sep 17 00:00:00 2001 From: Antonin Bourguignon Date: Fri, 17 Aug 2012 15:57:49 +0200 Subject: [PATCH 07/22] [IMP] note: rename the to level menu 'Feeds' into 'Home' bzr revid: abo@openerp.com-20120817135749-yr9pg3hc2u5mo62q --- addons/note/note_data.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/note/note_data.xml b/addons/note/note_data.xml index 2a40923b0f4..8d8516b895f 100644 --- a/addons/note/note_data.xml +++ b/addons/note/note_data.xml @@ -2,6 +2,11 @@ + + + + Today 1 @@ -28,4 +33,3 @@ - From b34138bbeb72312816676546251a57e2951995cf Mon Sep 17 00:00:00 2001 From: Antonin Bourguignon Date: Fri, 17 Aug 2012 17:13:12 +0200 Subject: [PATCH 08/22] [FIX] note: forgot to add note_data.xml to the descriptor bzr revid: abo@openerp.com-20120817151312-4y2mdrimw8xu4uhy --- addons/note/__openerp__.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/addons/note/__openerp__.py b/addons/note/__openerp__.py index 2241e7bd980..1410ff10d9e 100644 --- a/addons/note/__openerp__.py +++ b/addons/note/__openerp__.py @@ -34,20 +34,24 @@ Notes can be found in the 'Home' main menu, under 'Tool' submenu. """, 'author': 'OpenERP SA', 'website': 'http://openerp.com', - 'depends': ['base_tools','mail','pad'], + 'depends': [ + 'base_tools', + 'mail', + 'pad', + ], 'data': [ 'security/note_security.xml', 'security/ir.model.access.csv', + 'note_data.xml', 'note_view.xml', ], 'demo': [ - "note_demo.xml", + 'note_demo.xml', ], 'css': [ 'static/src/css/note.css', ], 'installable': True, - 'application': True, 'category': 'Tools', } From 92b32aa7672c31619f2b44c17933d27acaf4ead7 Mon Sep 17 00:00:00 2001 From: Antonin Bourguignon Date: Fri, 17 Aug 2012 18:39:53 +0200 Subject: [PATCH 09/22] [FIX] note: properly override the 'Feeds' top level item with 'Home'. also add a menu section and sub menuitems with temporary actions bzr revid: abo@openerp.com-20120817163953-3aaoe31xlxdnn7vd --- addons/note/note_data.xml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/addons/note/note_data.xml b/addons/note/note_data.xml index 8d8516b895f..8e896e19783 100644 --- a/addons/note/note_data.xml +++ b/addons/note/note_data.xml @@ -2,10 +2,21 @@ + + News Feed + mail.wall + + + + id="mail.mail_feeds_main"/> + + + + + Today From 9a2f884e1c8efe85ed29f02b11e0e03aa9d6fdf2 Mon Sep 17 00:00:00 2001 From: Antonin Bourguignon Date: Mon, 20 Aug 2012 13:14:17 +0200 Subject: [PATCH 10/22] [IMP] indentation bzr revid: abo@openerp.com-20120820111417-2spnfk02v2t2zarc --- addons/note/note_data.xml | 18 +----- addons/note/note_view.xml | 112 ++++++++++++++++++++++---------------- 2 files changed, 65 insertions(+), 65 deletions(-) diff --git a/addons/note/note_data.xml b/addons/note/note_data.xml index 8e896e19783..11eecc94b1b 100644 --- a/addons/note/note_data.xml +++ b/addons/note/note_data.xml @@ -1,22 +1,6 @@ - - - - News Feed - mail.wall - - - - - - - - - - - + Today diff --git a/addons/note/note_view.xml b/addons/note/note_view.xml index 39dca553c39..1c4cc2f58c2 100644 --- a/addons/note/note_view.xml +++ b/addons/note/note_view.xml @@ -2,6 +2,22 @@ + + News Feed + mail.wall + + + + + + + + + + + + note.stage.form @@ -25,9 +41,9 @@ - - - + + + @@ -44,7 +60,7 @@ + id="menu_notes_stage" action="action_note_stage" sequence="2"/> @@ -52,44 +68,44 @@ note.note kanban - - - - - - - - - - -
- -
- í -
+ + + + + + + + + + +
+ +
+ í +
- -
- - -
- -
- - - -
- -
-
-
-
-
+ +
+ + +
+ +
+ + + +
+ +
+
+
+
+
@@ -100,11 +116,11 @@ form
-
- - -
- +
+ + +
+
@@ -129,7 +145,7 @@
- + note.note.tree note.note @@ -143,7 +159,7 @@ kanban,tree,form - + From 2f228383abd2105c712c39136ef12a69e40cef74 Mon Sep 17 00:00:00 2001 From: Antonin Bourguignon Date: Mon, 20 Aug 2012 14:32:11 +0200 Subject: [PATCH 11/22] [IMP] indentation bzr revid: abo@openerp.com-20120820123211-4bqf7dajj33767vm --- addons/crm/crm_meeting_view.xml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/addons/crm/crm_meeting_view.xml b/addons/crm/crm_meeting_view.xml index d7f59267a30..1133dc17b37 100644 --- a/addons/crm/crm_meeting_view.xml +++ b/addons/crm/crm_meeting_view.xml @@ -3,16 +3,15 @@ - - calendar.attendee.form.inherit - calendar.attendee - - - - - + calendar.attendee.form.inherit + calendar.attendee + + + + + From d28f95ea85cd9f82eb031dbef8cfa9f1f6c63d7b Mon Sep 17 00:00:00 2001 From: Antonin Bourguignon Date: Mon, 20 Aug 2012 16:11:58 +0200 Subject: [PATCH 12/22] [IMP] mail: rename 'Feeds' into 'Home' bzr revid: abo@openerp.com-20120820141158-q7hkgolr07kkw0b1 --- addons/mail/mail_thread_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/mail_thread_view.xml b/addons/mail/mail_thread_view.xml index 68727832e53..35acad57bc2 100644 --- a/addons/mail/mail_thread_view.xml +++ b/addons/mail/mail_thread_view.xml @@ -3,7 +3,7 @@ - From ad16f2e48cc98cd6ea52bb5f7b7f91aa096e56ba Mon Sep 17 00:00:00 2001 From: Antonin Bourguignon Date: Mon, 20 Aug 2012 16:12:21 +0200 Subject: [PATCH 13/22] [IMP] note: add proper actions to Calendar, Notes and Contacts menu items bzr revid: abo@openerp.com-20120820141221-si82z13n05h5lkt1 --- addons/note/note_view.xml | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/addons/note/note_view.xml b/addons/note/note_view.xml index 1c4cc2f58c2..21d67309492 100644 --- a/addons/note/note_view.xml +++ b/addons/note/note_view.xml @@ -2,21 +2,9 @@ - - News Feed - mail.wall - - - - - - - - - - - + + + @@ -38,7 +26,6 @@ note.stage tree - @@ -47,7 +34,6 @@ - Stages @@ -57,10 +43,8 @@ [('user_id','=',uid)] - - - + @@ -160,7 +144,7 @@ - + From aa5a055c6d10d60b70abdd365eb6e52f51764555 Mon Sep 17 00:00:00 2001 From: Antonin Bourguignon Date: Mon, 20 Aug 2012 16:51:38 +0200 Subject: [PATCH 14/22] [IMP] note: reorganize code bzr revid: abo@openerp.com-20120820145138-l7a4985im5nua3xq --- addons/note/note.py | 48 +++++++++++++++++---------------------- addons/note/note_view.xml | 41 +++++++++++++++++---------------- 2 files changed, 42 insertions(+), 47 deletions(-) diff --git a/addons/note/note.py b/addons/note/note.py index 05c5ea6eadf..96c7cea9602 100644 --- a/addons/note/note.py +++ b/addons/note/note.py @@ -22,7 +22,7 @@ from openerp.osv import osv, fields from tools.translate import _ -class note_stage(osv.Model): +class note_stage(osv.osv): """ Category of Note """ _name = "note.stage" @@ -46,13 +46,7 @@ class note_stage(osv.Model): } -# class many2many_filter(fields.many2many) - -# grep many2many_mod dans le code - - - -class note_note(osv.Model): +class note_note(osv.osv): """ Note """ _name = 'note.note' _inherit = ['mail.thread','pad.common'] @@ -71,6 +65,25 @@ class note_note(osv.Model): # return self.write(cr, uid, [id], {'name': value}, context=context) + + def _get_default_stage_id(self,cr,uid,context=None): + id = self.pool.get('note.stage').search(cr,uid,[('sequence','=','1')]) + return id[0] + + def _read_group_stage_ids(self, cr, uid, ids, domain, read_group_order=None, access_rights_uid=None, context=None): + access_rights_uid = access_rights_uid or uid + stage_obj = self.pool.get('note.stage') + + # only show stage groups not folded and owned by user + search_domain = [('fold', '=', False),('user_id', '=', uid)] + + stage_ids = stage_obj._search(cr, uid, search_domain, order=self._order, access_rights_uid=access_rights_uid, context=context) + result = stage_obj.name_get(cr, access_rights_uid, stage_ids, context=context) + return result + + def stage_set(self,cr,uid,ids,stage_id,context=None): + self.write(cr,uid,ids,{'stage_id': stage_id}) + _columns = { 'name': fields.function(_get_note_first_line,_fnct_inv=_set_note_first_line, string='Note Summary', type="text", store=True), 'note': fields.text('Pad Content'), @@ -85,11 +98,6 @@ class note_note(osv.Model): _sql_constraints = [ ] - - def _get_default_stage_id(self,cr,uid,context=None): - id = self.pool.get('note.stage').search(cr,uid,[('sequence','=','1')]) - return id[0] - _defaults = { 'active' : 1, 'stage_id' : _get_default_stage_id, @@ -98,20 +106,6 @@ class note_note(osv.Model): _order = 'sequence asc' - def _read_group_stage_ids(self, cr, uid, ids, domain, read_group_order=None, access_rights_uid=None, context=None): - access_rights_uid = access_rights_uid or uid - stage_obj = self.pool.get('note.stage') - - # only show stage groups not folded and owned by user - search_domain = [('fold', '=', False),('user_id', '=', uid)] - - stage_ids = stage_obj._search(cr, uid, search_domain, order=self._order, access_rights_uid=access_rights_uid, context=context) - result = stage_obj.name_get(cr, access_rights_uid, stage_ids, context=context) - return result - _group_by_full = { 'stage_id' : _read_group_stage_ids, } - - def stage_set(self,cr,uid,ids,stage_id,context=None): - self.write(cr,uid,ids,{'stage_id': stage_id}) diff --git a/addons/note/note_view.xml b/addons/note/note_view.xml index 21d67309492..fd35e32de42 100644 --- a/addons/note/note_view.xml +++ b/addons/note/note_view.xml @@ -34,6 +34,7 @@
+ Stages @@ -63,28 +64,27 @@
- -
- í -
+ +
+ í +
- -
- - -
- -
- - - -
+ +
+ + +
+
+ + + +
@@ -136,6 +136,7 @@ tree
+ Notes note.note From c23bd0cf0102aee6cd9270e3cff0619b4257e4df Mon Sep 17 00:00:00 2001 From: Antonin Bourguignon Date: Mon, 20 Aug 2012 18:26:24 +0200 Subject: [PATCH 15/22] [FIX] project: remove useless dummy method (made useless by RCO review - revno 6692.2.175) bzr revid: abo@openerp.com-20120820162624-l6q3sinwedkyvlbe --- addons/project/project.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/addons/project/project.py b/addons/project/project.py index 1a8f8c8bfe5..ab1c3c47dfe 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -250,9 +250,6 @@ class project(osv.osv): type='many2many', relation='res.users', string='Followers'), } - def dummy(self, cr, uid, ids, context): - return True - def _get_type_common(self, cr, uid, context): ids = self.pool.get('project.task.type').search(cr, uid, [('case_default','=',1)], context=context) return ids @@ -526,7 +523,7 @@ def Project(): mail_alias = self.pool.get('mail.alias') if not vals.get('alias_id'): vals.pop('alias_name', None) # prevent errors during copy() - alias_id = mail_alias.create_unique_alias(cr, uid, + alias_id = mail_alias.create_unique_alias(cr, uid, # Using '+' allows using subaddressing for those who don't # have a catchall domain setup. {'alias_name': "project+"+short_name(vals['name'])}, From 1fec472ce18ea1ffc644e059e3e815a43bf7ee7e Mon Sep 17 00:00:00 2001 From: Antonin Bourguignon Date: Mon, 20 Aug 2012 18:27:16 +0200 Subject: [PATCH 16/22] [FIX] note: add dependance to base_calendar bzr revid: abo@openerp.com-20120820162716-wfczdudtaa03uh79 --- addons/note/__openerp__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/note/__openerp__.py b/addons/note/__openerp__.py index 1410ff10d9e..0f9e0860e8d 100644 --- a/addons/note/__openerp__.py +++ b/addons/note/__openerp__.py @@ -35,6 +35,7 @@ Notes can be found in the 'Home' main menu, under 'Tool' submenu. 'author': 'OpenERP SA', 'website': 'http://openerp.com', 'depends': [ + 'base_calendar', 'base_tools', 'mail', 'pad', @@ -52,7 +53,8 @@ Notes can be found in the 'Home' main menu, under 'Tool' submenu. 'static/src/css/note.css', ], 'installable': True, - 'category': 'Tools', + 'application': True, + 'auto_install': False, } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From 6de8c4b8e4f037f5297741e08ab643eada09728d Mon Sep 17 00:00:00 2001 From: Antonin Bourguignon Date: Mon, 20 Aug 2012 18:27:48 +0200 Subject: [PATCH 17/22] [IMP] note: rename the field 'note_pad' into 'note_pad_url' bzr revid: abo@openerp.com-20120820162748-f92eq99kywwq7vz7 --- addons/note/note.py | 4 ++-- addons/note/note_view.xml | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/note/note.py b/addons/note/note.py index 96c7cea9602..25f6c170f42 100644 --- a/addons/note/note.py +++ b/addons/note/note.py @@ -87,7 +87,7 @@ class note_note(osv.osv): _columns = { 'name': fields.function(_get_note_first_line,_fnct_inv=_set_note_first_line, string='Note Summary', type="text", store=True), 'note': fields.text('Pad Content'), - 'note_pad': fields.char('Pad Url', size=250), + 'note_pad_url': fields.char('Pad Url', size=250), 'sequence': fields.integer('Sequence'), 'stage_id': fields.many2one('note.stage', 'Stage'), 'active': fields.boolean('Active'), @@ -101,7 +101,7 @@ class note_note(osv.osv): _defaults = { 'active' : 1, 'stage_id' : _get_default_stage_id, - 'note_pad': lambda self, cr, uid, context: self.pad_generate_url(cr, uid, context), + 'note_pad_url': lambda self, cr, uid, context: self.pad_generate_url(cr, uid, context), } _order = 'sequence asc' diff --git a/addons/note/note_view.xml b/addons/note/note_view.xml index fd35e32de42..4a025a45b23 100644 --- a/addons/note/note_view.xml +++ b/addons/note/note_view.xml @@ -104,7 +104,8 @@ - + +
From ae7a429e345cd685aa74175a05e48e78367869a4 Mon Sep 17 00:00:00 2001 From: Antonin Bourguignon Date: Mon, 20 Aug 2012 19:23:16 +0200 Subject: [PATCH 18/22] [IMP] remove rotation while hovering notes bzr revid: abo@openerp.com-20120820172316-fv3dt5q8gc24y7ty --- addons/note/static/src/css/note.css | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/note/static/src/css/note.css b/addons/note/static/src/css/note.css index 39800834417..e5a3d1455c2 100644 --- a/addons/note/static/src/css/note.css +++ b/addons/note/static/src/css/note.css @@ -7,7 +7,7 @@ padding:1em; margin-right: 1em; margin-bottom: 1em; - + -moz-box-shadow:5px 5px 7px rgba(33,33,33,1); -webkit-box-shadow: 5px 5px 7px rgba(33,33,33,.7); box-shadow: 5px 5px 7px rgba(33,33,33,.7); @@ -67,15 +67,15 @@ -moz-transform:rotate(-1deg); } -.openerp .oe_kanban_column .oe_fold_column .oe_kanban_card:hover, +.openerp .oe_kanban_column .oe_fold_column .oe_kanban_card:hover, .openerp .oe_kanban_column .oe_fold_column .oe_kanban_card:focus { box-shadow:10px 10px 7px rgba(0,0,0,.7); -moz-box-shadow:10px 10px 7px rgba(0,0,0,.7); -webkit-box-shadow: 10px 10px 7px rgba(0,0,0,.7); - -webkit-transform: scale(1.25); - -moz-transform: scale(1.25); - -o-transform: scale(1.25); + -webkit-transform: rotate(0); + -moz-transform: rotate(0); + -o-transform: rotate(0); position:relative; z-index:5; } From 6dd74a31b0f6087faeaba155cd861a5a4f03343b Mon Sep 17 00:00:00 2001 From: Antonin Bourguignon Date: Mon, 20 Aug 2012 19:23:48 +0200 Subject: [PATCH 19/22] [IMP] rename some of the mail menuitems bzr revid: abo@openerp.com-20120820172348-t1i0r9lwkid0796v --- addons/mail/mail_group_view.xml | 8 ++++---- addons/mail/mail_thread_view.xml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/mail/mail_group_view.xml b/addons/mail/mail_group_view.xml index a71ec972326..4ef54da2611 100644 --- a/addons/mail/mail_group_view.xml +++ b/addons/mail/mail_group_view.xml @@ -61,8 +61,8 @@
-
+

@@ -123,7 +123,7 @@ - Groups + Join a group mail.group form kanban,tree,form @@ -132,6 +132,6 @@ - + diff --git a/addons/mail/mail_thread_view.xml b/addons/mail/mail_thread_view.xml index 35acad57bc2..302d28f5509 100644 --- a/addons/mail/mail_thread_view.xml +++ b/addons/mail/mail_thread_view.xml @@ -12,13 +12,13 @@ - News Feed + My Feeds - My Feeds + My Posts From 39421ebddbd61343ec2d404b57ef4213d12aa251 Mon Sep 17 00:00:00 2001 From: Antonin Bourguignon Date: Mon, 20 Aug 2012 19:24:21 +0200 Subject: [PATCH 20/22] [IMP] notes data and demo data bzr revid: abo@openerp.com-20120820172421-5eh0fe1bw2pl5gxb --- addons/note/note_data.xml | 18 +++---- addons/note/note_demo.xml | 110 +++++++++----------------------------- addons/note/note_view.xml | 2 +- 3 files changed, 31 insertions(+), 99 deletions(-) diff --git a/addons/note/note_data.xml b/addons/note/note_data.xml index 11eecc94b1b..29bd78d5223 100644 --- a/addons/note/note_data.xml +++ b/addons/note/note_data.xml @@ -2,29 +2,23 @@ - - Today + + Todo today 1 - - Tomorrow + + Todo later 2 - - This week + + For information 3 - - This month - 4 - - - diff --git a/addons/note/note_demo.xml b/addons/note/note_demo.xml index 3e960638de0..76f525b88ca 100644 --- a/addons/note/note_demo.xml +++ b/addons/note/note_demo.xml @@ -2,7 +2,7 @@ - + - + + 2 - + - + - + - + - + - + - + - + + 3 - + - + - + - + - + - + + 5 - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + 7 diff --git a/addons/note/note_view.xml b/addons/note/note_view.xml index 4a025a45b23..2086794bb04 100644 --- a/addons/note/note_view.xml +++ b/addons/note/note_view.xml @@ -2,7 +2,7 @@ - + From 5fd1c3f9f213bf09c483322063a90e454af5f055 Mon Sep 17 00:00:00 2001 From: Antonin Bourguignon Date: Mon, 20 Aug 2012 19:33:27 +0200 Subject: [PATCH 21/22] [IMP] override original actions to modify their name and/or context bzr revid: abo@openerp.com-20120820173327-zb3o37yrid3khf7k --- addons/note/note_view.xml | 42 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/addons/note/note_view.xml b/addons/note/note_view.xml index 2086794bb04..c31850d1a65 100644 --- a/addons/note/note_view.xml +++ b/addons/note/note_view.xml @@ -3,8 +3,46 @@ - - + + + + Calendar + crm.meeting + calendar,tree,form,gantt + + + {"calendar_default_user_id": uid} + +

+ Click to schedule a new meeting. +

+ The agenda is shared between employees and fully integrated with + other applications such as the employee holidays or the business + opportunities. +

+
+
+ + + + + Contacts + ir.actions.act_window + res.partner + form + kanban,tree,form + + +

+ Click to add a contact in your address book. +

+ OpenERP helps you easily track all activities related to + a customer; discussions, history of business opportunities, + documents, etc. +

+
+
+ From 4ac5de0d505f4d93ff2ad578068750554f0cc83d Mon Sep 17 00:00:00 2001 From: Antonin Bourguignon Date: Tue, 21 Aug 2012 15:29:15 +0200 Subject: [PATCH 22/22] [IMP] demo data bzr revid: abo@openerp.com-20120821132915-2fi83q3wsw29exzf --- addons/note/note_demo.xml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/addons/note/note_demo.xml b/addons/note/note_demo.xml index 76f525b88ca..e322f362ef5 100644 --- a/addons/note/note_demo.xml +++ b/addons/note/note_demo.xml @@ -12,7 +12,7 @@
- + 2
@@ -24,8 +24,8 @@ ]]>
- - + + @@ -53,18 +53,18 @@ - + - - + @@ -87,7 +87,7 @@ - + 3 @@ -99,18 +99,18 @@ - + - - - + + @@ -120,20 +120,21 @@ ]]> - - + + 5 - - + + 7 @@ -144,8 +145,7 @@ - - 7 +