From 245002e48d9ce1ecbe0961071c0644b48f5a79bb Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Wed, 19 Sep 2012 16:35:53 +0200 Subject: [IMG] base_calendar, note_pad bzr revid: chm@openerp.com-20120919143553-lmlvshitpkkftyln --- addons/note/note.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'addons/note/note.py') diff --git a/addons/note/note.py b/addons/note/note.py index 13d6bdbfee2..fb3f0cee853 100644 --- a/addons/note/note.py +++ b/addons/note/note.py @@ -59,19 +59,12 @@ class note_note(osv.osv): rec_id = self.create(cr, uid, {'memo': name}, context=context) return self.name_get(cr, uid, [rec_id], context)[0] - def _from_xml(self, mappings): - return chr(int( mappings.group(1) )) - - #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): - text_note = (note.memo or '').strip().split('\n')[0] - text_note = re.sub(r'(\S?)(|<[/]?p>|<[/]?div>|)[\s\S]*',r'\1',text_note) - text_note = re.sub(r'<[^>]+>','',text_note) - text_note = html2plaintext(text_note) - res[note.id] = text_note + res[note.id] = (note.memo and html2plaintext(note.memo) or "").strip().replace('*','').split("\n")[0] + return res #unactivate a sticky note and record the date -- cgit v1.2.3