]]>
@@ -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
+
+
+
+
+
+
+
+
+
+
From 7dd65a0f9ba6ca0c59addc22f2b3fed6e9f56504 Mon Sep 17 00:00:00 2001
From: Christophe Matthieu
Date: Fri, 7 Sep 2012 14:25:06 +0200
Subject: [PATCH 03/11] note : constraint for note min len
bzr revid: chm@openerp.com-20120907122506-fs6d3vvqowr2m6yk
---
addons/note/note.py | 19 +++++++++++++++++--
addons/note/note_view.xml | 6 ++++--
2 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/addons/note/note.py b/addons/note/note.py
index 985cacd3404..1b5704eb601 100644
--- a/addons/note/note.py
+++ b/addons/note/note.py
@@ -55,10 +55,10 @@ class note_note(osv.osv):
_inherit = ['mail.thread']
_description = "Note"
- def _set_note_first_line(self, cr, uid, id, name, value, args, context=None):
+ def _set_note_first_line(self, cr, uid, id, name, value, args={}, context=None):
return self.write(cr, uid, [id], {'note': value}, context=context)
- def _get_note_first_line(self, cr, uid, ids, name, args, context=None):
+ def _get_note_first_line(self, cr, uid, ids, name="", args={}, context=None):
res = {}
for note in self.browse(cr, uid, ids, context=context):
text_note = (note.note or '').strip().split('\n')[0]
@@ -99,6 +99,16 @@ class note_note(osv.osv):
return False
+ def _constraints_min_len(self, cr, uid, ids, context=None):
+
+ res = self._get_note_first_line(cr, uid, ids, context=context)
+
+ for note in self.browse(cr, uid, ids, context=context):
+ if len(res[note.id])<1 :
+ return False
+
+ return True
+
_columns = {
'name': fields.function(_get_note_first_line, fnct_inv=_set_note_first_line, string='Note Summary', type='text'),
@@ -120,9 +130,14 @@ class note_note(osv.osv):
'tag_ids' : fields.many2many('note.tag','note_tags_rel','note_id','tag_id','Tags'),
}
+ _constraints = [
+ (_constraints_min_len,'The title (first line on the note) must have at least one character.',['note']),
+ ]
+
_defaults = {
'active' : 1,
'stage_id' : _get_default_stage_id,
+ 'note': " "
}
_order = 'sequence asc'
_group_by_full = {
diff --git a/addons/note/note_view.xml b/addons/note/note_view.xml
index b7e76c5fe5e..63dd8afcd1b 100644
--- a/addons/note/note_view.xml
+++ b/addons/note/note_view.xml
@@ -104,8 +104,10 @@
-
-
+
+
+
+
From 22d1ff0c82585beb6ac999cc7b10d98d6107a8cd Mon Sep 17 00:00:00 2001
From: Christophe Matthieu
Date: Mon, 10 Sep 2012 09:24:59 +0200
Subject: [PATCH 04/11] note : add comments and change name in 'Memo'
bzr revid: chm@openerp.com-20120910072459-tlue035os3ci1pbz
---
addons/note/__openerp__.py | 16 ++++++++--------
addons/note/note.py | 29 +++++++++++++++++++++--------
addons/note/note_view.xml | 10 +++++-----
3 files changed, 34 insertions(+), 21 deletions(-)
diff --git a/addons/note/__openerp__.py b/addons/note/__openerp__.py
index 111f511e9fc..2e02ac567c7 100644
--- a/addons/note/__openerp__.py
+++ b/addons/note/__openerp__.py
@@ -20,24 +20,24 @@
##############################################################################
{
- 'name': 'Notes',
+ 'name': 'Memos',
'version': '0.1',
'category': 'Tools',
'description': """
-This module allows users to create their own notes inside OpenERP
+This module allows users to create their own memos inside OpenERP
=================================================================
-Use notes to write meeting minutes, organize ideas, organize personnal todo
-lists, etc. Each user manages his own personnal notes. Notes are available to
-their authors only, but they can share notes to others users so that several
-people can work on the same note in real time. It's very efficient to share
+Use memos to write meeting minutes, organize ideas, organize personnal todo
+lists, etc. Each user manages his own personnal memos. Memos are available to
+their authors only, but they can share memos to others users so that several
+people can work on the same memo in real time. It's very efficient to share
meeting minutes.
-Notes can be found in the 'Home' menu.
+Memos can be found in the 'Home' menu.
""",
'author': 'OpenERP SA',
'website': 'http://openerp.com',
- 'summary': 'Sticky Notes, Collaborative',
+ 'summary': 'Sticky Memos, Collaborative',
'depends': [
'base_tools',
'mail',
diff --git a/addons/note/note.py b/addons/note/note.py
index 1b5704eb601..7387d1c3d54 100644
--- a/addons/note/note.py
+++ b/addons/note/note.py
@@ -23,10 +23,11 @@ from openerp.osv import osv, fields
from tools.translate import _
import re
+#every user can create his name of stage for his notes
class note_stage(osv.osv):
""" Category of Note """
_name = "note.stage"
- _description = "Note Stage"
+ _description = "Memo Stage"
_columns = {
'name': fields.char('Category Name', size=64, required=True),
'sequence': fields.integer('Sequence', help="Used to order the note stages"),
@@ -40,24 +41,30 @@ class note_stage(osv.osv):
'sequence' : 1,
}
+#Object for tagging the diferent note. The tagging is shared with all follower
class note_tag(osv.osv):
_name = "note.tag"
- _description = "User can make tags on his note."
+ _description = "User can make tags on his memo."
_columns = {
'name' : fields.char('Tag name', size=64, required=True),
}
+#object note is kanban view orriented. The first line of the notes are put on the
+#kanban view like a title. An upgrade note_pad, can make a pad object in the form view.
+#The user can unactivate a note, this note disapear after one days.
class note_note(osv.osv):
""" Note """
_name = 'note.note'
_inherit = ['mail.thread']
- _description = "Note"
+ _description = "Memo"
+ #writing method (no modification of values)
def _set_note_first_line(self, cr, uid, id, name, value, args={}, context=None):
return self.write(cr, uid, [id], {'note': value}, context=context)
+ #read the first line (convert hml into text)
def _get_note_first_line(self, cr, uid, ids, name="", args={}, context=None):
res = {}
for note in self.browse(cr, uid, ids, context=context):
@@ -68,10 +75,13 @@ class note_note(osv.osv):
return res
+ #return the default stage for the uid user
def _get_default_stage_id(self,cr,uid,context=None):
ids = self.pool.get('note.stage').search(cr,uid,[('user_id','=',uid)])
return ids and ids[0] or False
+ #nead IMP : return the list of stage for the uid user
+ #because one note can have more of one stage (one stage per note and per user)
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')
@@ -83,22 +93,25 @@ class note_note(osv.osv):
result = stage_obj.name_get(cr, access_rights_uid, stage_ids, context=context)
return result
+ #unactivate a note and record the date
def onclick_note_is_done(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, { 'active' : False, 'date_done' : fields.date.today() })
- self.message_post(cr, uid, ids[0], body='This note is active', subject=False,
+ self.message_post(cr, uid, ids[0], body='This memo is active', subject=False,
type='notification', parent_id=False, attachments=None, context=context)
return False
+ #activate a note
def onclick_note_not_done(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, { 'active' : True })
- self.message_post(cr, uid, ids[0], body='This note is done', subject=False,
+ self.message_post(cr, uid, ids[0], body='This memo is done', subject=False,
type='notification', parent_id=False, attachments=None, context=context)
return False
+ #look that the title (first line of the note) have more of one caracter
def _constraints_min_len(self, cr, uid, ids, context=None):
res = self._get_note_first_line(cr, uid, ids, context=context)
@@ -109,9 +122,9 @@ class note_note(osv.osv):
return True
-
+
_columns = {
- 'name': fields.function(_get_note_first_line, fnct_inv=_set_note_first_line, string='Note Summary', type='text'),
+ 'name': fields.function(_get_note_first_line, fnct_inv=_set_note_first_line, string='Memo Summary', type='text'),
'note': fields.html('Pad Content'),
'sequence': fields.integer('Sequence'),
# the stage_id depending on the uid
@@ -131,7 +144,7 @@ class note_note(osv.osv):
}
_constraints = [
- (_constraints_min_len,'The title (first line on the note) must have at least one character.',['note']),
+ (_constraints_min_len,'The title (first line on the memo) must have at least one character.',['note']),
]
_defaults = {
diff --git a/addons/note/note_view.xml b/addons/note/note_view.xml
index 63dd8afcd1b..2a2d7d8af8a 100644
--- a/addons/note/note_view.xml
+++ b/addons/note/note_view.xml
@@ -9,7 +9,7 @@
note.stage.formnote.stage
-
)[\s\S]*','',text_note)
text_note = re.sub(r'<[^>]+>','',text_note)
res[note.id] = text_note
@@ -80,20 +75,7 @@ class note_note(osv.osv):
ids = self.pool.get('note.stage').search(cr,uid,[('user_id','=',uid)])
return ids and ids[0] or False
- #nead IMP : return the list of stage for the uid user
- #because one note can have more of one stage (one stage per note and per user)
- 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
-
- #unactivate a note and record the date
+ #unactivate a memo and record the date
def onclick_note_is_done(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, { 'active' : False, 'date_done' : fields.date.today() })
@@ -102,16 +84,16 @@ class note_note(osv.osv):
return False
- #activate a note
+ #activate a memo
def onclick_note_not_done(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, { 'active' : True })
- self.message_post(cr, uid, ids[0], body='This memo is done', subject=False,
+ self.message_post(cr, uid, ids[0], body='This memo is close', subject=False,
type='notification', parent_id=False, attachments=None, context=context)
return False
- #look that the title (first line of the note) have more of one caracter
+ #look that the title (first line of the memo) have more of one caracter
def _constraints_min_len(self, cr, uid, ids, context=None):
res = self._get_note_first_line(cr, uid, ids, context=context)
@@ -121,11 +103,28 @@ class note_note(osv.osv):
return False
return True
-
-
+
+
+ #used for undisplay the follower if it's the current user
+ def _get_my_current_partner(self, cr, uid, ids, name, args, context=None):
+ user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
+ pid = user.partner_id and user.partner_id.id or False
+
+ result = {}
+ for record in self.browse(cr, uid, ids, context=context):
+ result[record.id]=pid
+
+ return result
+
+
+
_columns = {
- 'name': fields.function(_get_note_first_line, fnct_inv=_set_note_first_line, string='Memo Summary', type='text'),
- 'note': fields.html('Pad Content'),
+ 'name': fields.function(_get_note_first_line,
+ fnct_inv=_set_note_first_line,
+ string='Memo Summary',
+ type='text',
+ store=True),
+ 'memo': fields.html('Pad Content'),
'sequence': fields.integer('Sequence'),
# the stage_id depending on the uid
'stage_id': fields.many2one('note.stage', 'Stage'),
@@ -136,24 +135,35 @@ class note_note(osv.osv):
#'stage_ids': fields.many2many('note.stage','note_stage_rel','note_id','stage_id','Linked stages users'),
'active': fields.boolean('Active'),
- # when the user unactivate the note, record de date for un display note after 1 days
+ # when the user unactivate the memo, record de date for un display memo after 1 days
'date_done': fields.date('Date done'),
'color': fields.integer('Color Index'),
- # put tags on the note (optional)
+ # put tags on the memo (optional)
'tag_ids' : fields.many2many('note.tag','note_tags_rel','note_id','tag_id','Tags'),
+
+ 'current_partner_id' : fields.function(_get_my_current_partner),
}
_constraints = [
- (_constraints_min_len,'The title (first line on the memo) must have at least one character.',['note']),
+ (_constraints_min_len,'The title (first line on the memo) must have at least one character.',['memo']),
]
_defaults = {
'active' : 1,
'stage_id' : _get_default_stage_id,
- 'note': " "
+ 'memo': " "
}
_order = 'sequence asc'
- _group_by_full = {
- 'stage_id' : _read_group_stage_ids,
- }
+
+#upgrade config setting page to configure pad, fancy and tags mode
+class note_base_config_settings(osv.osv_memory):
+ _inherit = 'base.config.settings'
+ _columns = {
+ #install of the note_pad module => automatic with "module_"
+ 'module_note_pad': fields.boolean('Use an etherpad'),
+ #auto group user => automatic with "group_"
+ 'group_note_fancy': fields.boolean('Use fancy render', implied_group='note.group_note_fancy'),
+ 'group_note_tags': fields.boolean('Use tags for memo', implied_group='note.group_note_tags'),
+ 'group_note_thread': fields.boolean('Use mail thread and follower', implied_group='note.group_note_thread'),
+ }
diff --git a/addons/note/note_demo.xml b/addons/note/note_demo.xml
index c46846c53f7..22ed73deca3 100644
--- a/addons/note/note_demo.xml
+++ b/addons/note/note_demo.xml
@@ -3,7 +3,7 @@
- * 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)
@@ -17,7 +17,7 @@
- * Followed by the telephone conversation and mail about D.544.3
]]>
@@ -27,7 +27,7 @@
- ]]>
@@ -36,7 +36,7 @@
- ]]>
@@ -45,7 +45,7 @@
- * stuffed turkey
* wine
]]>
@@ -56,9 +56,9 @@
- * 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
+ it transforms the html editable memo text field into widget='pad', similar to project_pad depends on 'memo' and 'pad' modules
]]>
@@ -67,7 +67,7 @@
- * Open ERP: a modern approach to integrated business management
* Open ERP for Retail and Industrial Management
]]>
@@ -78,7 +78,7 @@
- * Motherboard
according to processor
* Processor
@@ -102,7 +102,7 @@
- * Open ERP: a modern approach to integrated business management
* Open ERP for Retail and Industrial Management
]]>
@@ -113,7 +113,7 @@
- * Open ERP: a modern approach to integrated business management
* Open ERP for Retail and Industrial Management
]]>
@@ -124,7 +124,7 @@
- * Open ERP: a modern approach to integrated business management
* Open ERP for Retail and Industrial Management
]]>
@@ -136,7 +136,7 @@
- * Open ERP: a modern approach to integrated business management
* Open ERP for Retail and Industrial Management
]]>
@@ -148,7 +148,7 @@
- * 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 2a2d7d8af8a..763489b0fd7 100644
--- a/addons/note/note_view.xml
+++ b/addons/note/note_view.xml
@@ -4,7 +4,7 @@
-
+
note.stage.formnote.stage
@@ -17,7 +17,7 @@
-
+
note.stage.treenote.stage
@@ -31,7 +31,7 @@
-
+
Stagesnote.stage
@@ -42,7 +42,7 @@
-
+
note.note.kanbannote.note
@@ -53,49 +53,58 @@
-
+
+
+
-
diff --git a/addons/note/security/ir.model.access.csv b/addons/note/security/ir.model.access.csv
index 6c5ea823d96..cbe11cba94e 100644
--- a/addons/note/security/ir.model.access.csv
+++ b/addons/note/security/ir.model.access.csv
@@ -1,4 +1,4 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_note_stage,note.stage,model_note_stage,,1,1,1,1
-access_note_note,note.note,model_note_note,,1,1,1,1
-access_note_tag,note.tag,model_note_tag,,1,1,1,1
+access_note_stage,note.stage,model_note_stage,base.group_user,1,1,1,1
+access_note_note,note.note,model_note_note,base.group_user,1,1,1,1
+access_note_tag,note.tag,model_note_tag,base.group_user,1,1,1,1
diff --git a/addons/note/security/ir.rule.xml b/addons/note/security/ir.rule.xml
index 4eab169519f..82994b960c2 100644
--- a/addons/note/security/ir.rule.xml
+++ b/addons/note/security/ir.rule.xml
@@ -2,9 +2,9 @@
- Only followers can read a memos
+ Only followers can access a sticky notes
- ['|',('message_follower_ids.id','=',user.partner_id.id),('message_follower_ids','=',False)]
+ ['|',('message_follower_ids','=',False),('message_follower_ids','=',user.partner_id.id)]
From efae13456dfcf3601c60bce0e0028a64f6af3577 Mon Sep 17 00:00:00 2001
From: Christophe Matthieu
Date: Fri, 14 Sep 2012 17:08:54 +0200
Subject: [PATCH 10/11] [IMP] cleaning notes, name_create
bzr revid: chm@openerp.com-20120914150854-1eh3nlzf2badxawr
---
addons/note/__openerp__.py | 3 +++
addons/note/note.py | 12 +++++-----
addons/note/note_demo.xml | 38 ++------------------------------
addons/note/note_view.xml | 23 ++++++++++---------
addons/note/test/note_create.yml | 25 +++++++++++++++++++++
5 files changed, 48 insertions(+), 53 deletions(-)
create mode 100644 addons/note/test/note_create.yml
diff --git a/addons/note/__openerp__.py b/addons/note/__openerp__.py
index 02e4653031c..eeaae7a5904 100644
--- a/addons/note/__openerp__.py
+++ b/addons/note/__openerp__.py
@@ -52,6 +52,9 @@ Memos can be found in the 'Home' menu.
'demo': [
'note_demo.xml',
],
+ 'test': [
+ 'test/note_create.yml',
+ ],
'css': [
'static/src/css/note.css',
],
diff --git a/addons/note/note.py b/addons/note/note.py
index 11b3af1ac89..88167fceeb1 100644
--- a/addons/note/note.py
+++ b/addons/note/note.py
@@ -56,8 +56,9 @@ class note_note(osv.osv):
_description = "Sticky note"
#writing method (no modification of values)
- def _set_note_first_line(self, cr, uid, id, name, value, args={}, context=None):
- return self.write(cr, uid, [id], {'memo': value}, context=context)
+ def name_create(self, cr, uid, name, context=None):
+ rec_id = self.create(cr, uid, {'memo': name}, context=context)
+ return self.name_get(cr, uid, [rec_id], context)[0]
#read the first line (convert hml into text)
def _get_note_first_line(self, cr, uid, ids, name="", args={}, context=None):
@@ -119,12 +120,11 @@ class note_note(osv.osv):
result[record.id] = stage.id
return result
+
_columns = {
'name': fields.function(_get_note_first_line,
- fnct_inv=_set_note_first_line,
string='Sticky note Summary',
- type='text',
- store=True),
+ type='text', store=True),
'memo': fields.html('Pad Content'),
'sequence': fields.integer('Sequence'),
@@ -144,7 +144,7 @@ class note_note(osv.osv):
# when the user unactivate the Sticky note, record de date for un display Sticky note after 1 days
'date_done': fields.date('Date done'),
'color': fields.integer('Color Index'),
- # put tags on the memo (optional)
+ # put tags on the note (optional)
'tag_ids' : fields.many2many('note.tag','note_tags_rel','note_id','tag_id','Tags'),
'current_partner_id' : fields.function(_get_my_current_partner),
diff --git a/addons/note/note_demo.xml b/addons/note/note_demo.xml
index 22ed73deca3..88b21effb7e 100644
--- a/addons/note/note_demo.xml
+++ b/addons/note/note_demo.xml
@@ -3,6 +3,7 @@
+ Customer report #349872 * Calendar app in Home
* The base_calendar module should create a menu in Home, like described above.
@@ -10,9 +11,7 @@
* We should use the term Calendar, not Meeting.
]]>
-
- 2
@@ -21,27 +20,21 @@
* Followed by the telephone conversation and mail about D.544.3
]]>
-
- ]]>
-
- ]]>
-
-
@@ -50,9 +43,7 @@
* wine
]]>
-
-
@@ -61,9 +52,7 @@
it transforms the html editable memo text field into widget='pad', similar to project_pad depends on 'memo' and 'pad' modules
]]>
-
-
@@ -72,9 +61,7 @@
* Open ERP for Retail and Industrial Management
]]>
-
-
@@ -95,9 +82,7 @@
a big one, full of pixels, of course !
]]>
-
- 3
@@ -107,9 +92,8 @@
* Open ERP for Retail and Industrial Management
]]>
-
-
+
@@ -118,21 +102,7 @@
* Open ERP for Retail and Industrial Management
]]>
-
-
-
-
-
- * Open ERP: a modern approach to integrated business management
- * Open ERP for Retail and Industrial Management
- ]]>
-
-
-
-
- 5
@@ -141,9 +111,7 @@
* Open ERP for Retail and Industrial Management
]]>
-
- 7
@@ -153,9 +121,7 @@
* Open ERP for Retail and Industrial Management
]]>
-
-
diff --git a/addons/note/note_view.xml b/addons/note/note_view.xml
index 46c326279e8..872cae12c11 100644
--- a/addons/note/note_view.xml
+++ b/addons/note/note_view.xml
@@ -46,7 +46,7 @@
note.note.kanbannote.note
-
+
@@ -114,26 +114,28 @@
-
+
note.note.formnote.note
-
+
-
+
-
+
+
+
-
+
note.note.searchnote.note
@@ -146,8 +148,7 @@
-
-
+
@@ -186,9 +187,9 @@
-
+
- Memos
+ Sticky notesnote.noteformkanban,tree,form
@@ -196,7 +197,7 @@
{'search_default_active_true':True}
-
+
\ No newline at end of file
diff --git a/addons/note/test/note_create.yml b/addons/note/test/note_create.yml
new file mode 100644
index 00000000000..3b6f2fa3072
--- /dev/null
+++ b/addons/note/test/note_create.yml
@@ -0,0 +1,25 @@
+-
+ I create a stage
+-
+ !record {model: note.stage, id: note_stage_1}:
+ name: 'first stage'
+ user_id: 1
+-
+ I create a stage for an other user
+-
+ !record {model: note.stage, id: note_stage_2}:
+ name: 'second stage'
+ user_id: 2
+-
+ I create a sticky note with 2 tags and 2 stages
+-
+ !record {model: note.note, id: note_1}:
+ name: 'My second note'
+ memo: 'My second note content'
+ color: 2
+ stage_ids:
+ - stage_id: note_stage.note_stage_1
+ - stage_id: note_stage.note_stage_2
+ tag_ids:
+ - name: 'first tag'
+ - name: 'second tad'
\ No newline at end of file
From 378b77a5e4e79ac761e6c072591fd84a295eb1bf Mon Sep 17 00:00:00 2001
From: Christophe Matthieu
Date: Fri, 14 Sep 2012 17:11:24 +0200
Subject: [PATCH 11/11] [IMP] note: delete option thread
bzr revid: chm@openerp.com-20120914151124-sus4kh34cwslk9ly
---
addons/note/note.py | 1 -
addons/note/note_view.xml | 8 +-------
addons/note/security/res.groups.csv | 1 -
3 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/addons/note/note.py b/addons/note/note.py
index 88167fceeb1..429c16eed6d 100644
--- a/addons/note/note.py
+++ b/addons/note/note.py
@@ -216,5 +216,4 @@ class note_base_config_settings(osv.osv_memory):
#auto group user => automatic with "group_"
'group_note_fancy': fields.boolean('Use fancy render', implied_group='note.group_note_fancy'),
'group_note_tags': fields.boolean('Use tags for sticky note', implied_group='note.group_note_tags'),
- 'group_note_thread': fields.boolean('Use mail thread', implied_group='note.group_note_thread'),
}
diff --git a/addons/note/note_view.xml b/addons/note/note_view.xml
index 872cae12c11..232b96f643a 100644
--- a/addons/note/note_view.xml
+++ b/addons/note/note_view.xml
@@ -128,9 +128,7 @@
-
-
-
+
@@ -177,10 +175,6 @@