From b49b72f00ec2d818338aa8af008ac8337ba990df Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Fri, 7 Sep 2012 13:56:04 +0200 Subject: [PATCH] [IMP] note : split of note module : note module & note_pad module bzr revid: chm@openerp.com-20120907115604-wmp8rxec0fk9508r --- addons/note/note.py | 5 +-- addons/note/note_demo.xml | 58 +++++++++++++++---------------- addons/note/note_view.xml | 1 - addons/note_pad/__init__.py | 23 ++++++++++++ addons/note_pad/__openerp__.py | 50 ++++++++++++++++++++++++++ addons/note_pad/note_pad.py | 40 +++++++++++++++++++++ addons/note_pad/note_pad_view.xml | 16 +++++++++ 7 files changed, 159 insertions(+), 34 deletions(-) create mode 100644 addons/note_pad/__init__.py create mode 100644 addons/note_pad/__openerp__.py create mode 100644 addons/note_pad/note_pad.py create mode 100644 addons/note_pad/note_pad_view.xml diff --git a/addons/note/note.py b/addons/note/note.py index 6acb3884cd7..985cacd3404 100644 --- a/addons/note/note.py +++ b/addons/note/note.py @@ -52,8 +52,7 @@ class note_tag(osv.osv): class note_note(osv.osv): """ Note """ _name = 'note.note' - _inherit = ['mail.thread','pad.common'] - _pad_fields = ['note_pad'] + _inherit = ['mail.thread'] _description = "Note" def _set_note_first_line(self, cr, uid, id, name, value, args, context=None): @@ -104,7 +103,6 @@ class note_note(osv.osv): _columns = { 'name': fields.function(_get_note_first_line, fnct_inv=_set_note_first_line, string='Note Summary', type='text'), 'note': fields.html('Pad Content'), - 'note_pad_url': fields.char('Pad Url', size=250), 'sequence': fields.integer('Sequence'), # the stage_id depending on the uid 'stage_id': fields.many2one('note.stage', 'Stage'), @@ -125,7 +123,6 @@ class note_note(osv.osv): _defaults = { 'active' : 1, 'stage_id' : _get_default_stage_id, - 'note_pad_url': lambda self, cr, uid, context: self.pad_generate_url(cr, uid, context), } _order = 'sequence asc' _group_by_full = { diff --git a/addons/note/note_demo.xml b/addons/note/note_demo.xml index 9c3e0457616..c46846c53f7 100644 --- a/addons/note/note_demo.xml +++ b/addons/note/note_demo.xml @@ -4,10 +4,10 @@
* Calendar app in Home +
* The base_calendar module should create a menu in Home, like described above. +
* This module should become a main application (in the first screen at installation) +
* We should use the term Calendar, not Meeting. ]]>
@@ -18,7 +18,7 @@
* Followed by the telephone conversation and mail about D.544.3 ]]>
@@ -28,7 +28,7 @@ +

]]>
@@ -37,7 +37,7 @@ +

]]>
@@ -46,8 +46,8 @@ * stuffed turkey +
* wine ]]>
@@ -57,7 +57,7 @@
* Create a module note_pad it transforms the html editable note text field into widget='pad', similar to project_pad depends on 'note' and 'pad' modules ]]>
@@ -68,8 +68,8 @@
* Open ERP: a modern approach to integrated business management +
* Open ERP for Retail and Industrial Management ]]>
@@ -79,19 +79,19 @@
* Motherboard according to processor - * Processor +
* Processor need to decide - * Graphic card +
* Graphic card with great performance for games ! - * Hard drive +
* Hard drive big, for lot of internet backups - * Tower +
* Tower silent, better when watching films - * Blueray drive ? +
* Blueray drive ? is it interesting yet ? - * Screen +
* Screen a big one, full of pixels, of course ! ]]>
@@ -103,8 +103,8 @@
* Open ERP: a modern approach to integrated business management +
* Open ERP for Retail and Industrial Management ]]>
@@ -114,8 +114,8 @@
* Open ERP: a modern approach to integrated business management +
* Open ERP for Retail and Industrial Management ]]>
@@ -125,8 +125,8 @@
* Open ERP: a modern approach to integrated business management +
* Open ERP for Retail and Industrial Management ]]>
@@ -137,8 +137,8 @@
* Open ERP: a modern approach to integrated business management +
* Open ERP for Retail and Industrial Management ]]>
@@ -149,8 +149,8 @@
* Open ERP: a modern approach to integrated business management +
* Open ERP for Retail and Industrial Management ]]>
diff --git a/addons/note/note_view.xml b/addons/note/note_view.xml index 640b6ce010e..b7e76c5fe5e 100644 --- a/addons/note/note_view.xml +++ b/addons/note/note_view.xml @@ -106,7 +106,6 @@ -
diff --git a/addons/note_pad/__init__.py b/addons/note_pad/__init__.py new file mode 100644 index 00000000000..44a484adac4 --- /dev/null +++ b/addons/note_pad/__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_pad + diff --git a/addons/note_pad/__openerp__.py b/addons/note_pad/__openerp__.py new file mode 100644 index 00000000000..7eee5eee487 --- /dev/null +++ b/addons/note_pad/__openerp__.py @@ -0,0 +1,50 @@ +# -*- 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 pad', + 'version': '0.1', + 'category': 'Tools', + 'description': """ +This module update notes inside OpenERP for using an external pad +=================================================================== + +Use for update your text note in real time with the following user that you invite. + +""", + 'author': 'OpenERP SA', + 'website': 'http://openerp.com', + 'summary': 'Sticky Notes, Collaborative', + 'depends': [ + 'base_tools', + 'mail', + 'pad', + 'note', + ], + 'data': [ + 'note_pad_view.xml', + ], + 'installable': True, + 'application': False, + 'auto_install': False, +} + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/note_pad/note_pad.py b/addons/note_pad/note_pad.py new file mode 100644 index 00000000000..73cc9d76a62 --- /dev/null +++ b/addons/note_pad/note_pad.py @@ -0,0 +1,40 @@ +# -*- 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 _ + +class note_pad_note(osv.osv): + """ Note pad """ + + _name = 'note.note' + _inherit = ['pad.common','note.note'] + + _pad_fields = ['note_pad'] + _description = "Note pad" + + _columns = { + 'note_pad_url': fields.char('Pad Url', size=250), + } + + _defaults = { + 'note_pad_url': lambda self, cr, uid, context: self.pad_generate_url(cr, uid, context), + } diff --git a/addons/note_pad/note_pad_view.xml b/addons/note_pad/note_pad_view.xml new file mode 100644 index 00000000000..fd5c48d7f2a --- /dev/null +++ b/addons/note_pad/note_pad_view.xml @@ -0,0 +1,16 @@ + + + + + note_pad.view.form + note.note + + + + + + + + + +