diff --git a/html_text/README.rst b/html_text/README.rst index 52c7755be..59ab65597 100644 --- a/html_text/README.rst +++ b/html_text/README.rst @@ -38,7 +38,7 @@ QWeb example:: .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/149/9.0 + :target: https://runbot.odoo-community.org/runbot/149/10.0 Known issues / Roadmap ====================== diff --git a/html_text/__init__.py b/html_text/__init__.py index 197214cdd..a77a6fcbc 100644 --- a/html_text/__init__.py +++ b/html_text/__init__.py @@ -1,6 +1,4 @@ # -*- coding: utf-8 -*- -# Copyright 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis -# Copyright 2016 Tecnativa - Vicent Cubells # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import models diff --git a/html_text/__openerp__.py b/html_text/__manifest__.py similarity index 86% rename from html_text/__openerp__.py rename to html_text/__manifest__.py index 173d737a0..af0df87b6 100644 --- a/html_text/__openerp__.py +++ b/html_text/__manifest__.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- -# Copyright 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis +# Copyright 2016-2017 Jairo Llopis # Copyright 2016 Tecnativa - Vicent Cubells # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Text from HTML field", "summary": "Generate excerpts from any HTML field", - "version": "9.0.1.0.0", + "version": "10.0.1.0.0", "category": "Tools", "website": "https://tecnativa.com", "author": "Grupo ESOC Ingeniería de Servicios, " diff --git a/html_text/i18n/it.po b/html_text/i18n/it.po new file mode 100644 index 000000000..454889f20 --- /dev/null +++ b/html_text/i18n/it.po @@ -0,0 +1,24 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * html_text +# +# Translators: +# Paolo Valier , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-06 02:25+0000\n" +"PO-Revision-Date: 2018-01-06 02:25+0000\n" +"Last-Translator: Paolo Valier , 2018\n" +"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: it\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: html_text +#: model:ir.model,name:html_text.model_ir_fields_converter +msgid "ir.fields.converter" +msgstr "ir.fields.converter" diff --git a/html_text/models/__init__.py b/html_text/models/__init__.py index 5746f8b6b..6fcbec0b6 100644 --- a/html_text/models/__init__.py +++ b/html_text/models/__init__.py @@ -1,6 +1,4 @@ # -*- coding: utf-8 -*- -# Copyright 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis -# Copyright 2016 Tecnativa - Vicent Cubells # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import ir_fields_converter diff --git a/html_text/models/ir_fields_converter.py b/html_text/models/ir_fields_converter.py index 5180665f0..1e84b1cad 100644 --- a/html_text/models/ir_fields_converter.py +++ b/html_text/models/ir_fields_converter.py @@ -1,16 +1,16 @@ # -*- coding: utf-8 -*- -# Copyright 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis +# Copyright 2016-2017 Jairo Llopis # Copyright 2016 Tecnativa - Vicent Cubells # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). import logging from lxml import etree, html -from openerp import api, models +from odoo import api, models _logger = logging.getLogger(__name__) -class IrFieldsConverter(models.Model): +class IrFieldsConverter(models.AbstractModel): _inherit = "ir.fields.converter" @api.model diff --git a/html_text/tests/__init__.py b/html_text/tests/__init__.py index 60346a281..f8ca9e601 100644 --- a/html_text/tests/__init__.py +++ b/html_text/tests/__init__.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -# © 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import test_extractor diff --git a/html_text/tests/test_extractor.py b/html_text/tests/test_extractor.py index 22443e32a..938361fd7 100644 --- a/html_text/tests/test_extractor.py +++ b/html_text/tests/test_extractor.py @@ -1,15 +1,16 @@ # -*- coding: utf-8 -*- -# © 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis +# Copyright 2016-2017 Jairo Llopis # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from lxml import etree -from openerp.tests.common import TransactionCase +from odoo.tools import mute_logger +from odoo.tests.common import TransactionCase +from ..models import ir_fields_converter class ExtractorCase(TransactionCase): def setUp(self): super(ExtractorCase, self).setUp() - # Shortcut self.text_from_html = self.env["ir.fields.converter"].text_from_html @@ -40,18 +41,21 @@ class ExtractorCase(TransactionCase): self.text_from_html(html, 7, ellipsis=""), u"I'm a title I'm a paragraph ¡Pues") + @mute_logger(ir_fields_converter.__name__) def test_empty_html(self): """Empty HTML handled correctly.""" self.assertEqual(self.text_from_html(""), "") with self.assertRaises(etree.XMLSyntaxError): self.text_from_html("", fail=True) + @mute_logger(ir_fields_converter.__name__) def test_false_html(self): """``False`` HTML handled correctly.""" self.assertEqual(self.text_from_html(False), "") with self.assertRaises(TypeError): self.text_from_html(False, fail=True) + @mute_logger(ir_fields_converter.__name__) def test_bad_html(self): """Bad HTML handled correctly.""" self.assertEqual(self.text_from_html("<"), "")