Merge lp:~vauxoo/addons-vauxoo/7.0-imp_user_story_report_description-dev-ernesto into lp:addons-vauxoo/7.0

Status: Merged
Merged at revision: 1060
Proposed branch: lp:~vauxoo/addons-vauxoo/7.0-imp_user_story_report_description-dev-ernesto
Merge into: lp:addons-vauxoo/7.0
Diff against target: 73 lines (+55/-0)
3 files modified
user_story/__init__.py (+1/-0)
user_story/report/__init__.py (+1/-0)
user_story/report/parse_report.py (+53/-0)
To merge this branch: bzr merge lp:~vauxoo/addons-vauxoo/7.0-imp_user_story_report_description-dev-ernesto
Reviewer Review Type Date Requested Status
Jorge Angel Naranjo Rogel - http://www.vauxoo.com Approve
Luis Ernesto García Medina - http://www.vauxoo.com Pending
Sabrina Romero - http://www.vauxoo.com Pending
Review via email: mp+221791@code.launchpad.net

Description of the change

added function to delete html labels of description field for report of user story

To post a comment you must log in.
1020. By Luis Ernesto García Medina - http://www.vauxoo.com

[IMP][user_story] change library html2text to html from xml

Revision history for this message
Jorge Angel Naranjo Rogel - http://www.vauxoo.com (jorge-nr) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'user_story/__init__.py'
--- user_story/__init__.py 2014-05-09 21:51:34 +0000
+++ user_story/__init__.py 2014-06-12 17:18:07 +0000
@@ -1,1 +1,2 @@
1import model1import model
2import report
23
=== added file 'user_story/report/__init__.py'
--- user_story/report/__init__.py 1970-01-01 00:00:00 +0000
+++ user_story/report/__init__.py 2014-06-12 17:18:07 +0000
@@ -0,0 +1,1 @@
1import parse_report
02
=== added file 'user_story/report/parse_report.py'
--- user_story/report/parse_report.py 1970-01-01 00:00:00 +0000
+++ user_story/report/parse_report.py 2014-06-12 17:18:07 +0000
@@ -0,0 +1,53 @@
1##############################################################################
2#
3# OpenERP, Open Source Management Solution
4# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
5#
6
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation, either version 3 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#
21##############################################################################
22
23from openerp.osv import fields, osv
24from openerp.tools.translate import _
25
26from report import report_sxw
27from lxml import html
28
29class story_user_html(report_sxw.rml_parse):
30
31 def __init__(self, cr, uid, name, context=None):
32 if context is None:
33 context = {}
34 super(story_user_html, self).__init__(
35 cr, uid, name, context=context)
36 self.localcontext.update({
37 'parse_html_field' : self._parse_html_field,
38 })
39 self.context = context
40
41 def _parse_html_field(self, data):
42 tree = html.fromstring(data)
43 text_data = tree.text_content()
44 tree_2 = html.fromstring(text_data)
45 text_data_2 = tree_2.text_content()
46 return text_data_2
47
48report_sxw.report_sxw('report.user.story.report',
49 'user.story',
50 'addons/user_story/report/user_story_report.sxw',
51 parser=story_user_html)
52
53# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
054
=== modified file 'user_story/report/user_story_report.sxw'
1Binary files user_story/report/user_story_report.sxw 2014-05-09 21:51:34 +0000 and user_story/report/user_story_report.sxw 2014-06-12 17:18:07 +0000 differ55Binary files user_story/report/user_story_report.sxw 2014-05-09 21:51:34 +0000 and user_story/report/user_story_report.sxw 2014-06-12 17:18:07 +0000 differ