Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syncing from upstream OCA/server-tools (16.0) #1338

Merged
merged 37 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
4c087f6
Excerpt generator.
yajo Apr 4, 2016
971a270
Do not die miserably when you get `False` as the HTML input. Test it.
yajo Apr 5, 2016
8f12450
html_text * Updated README.rst
cubells Nov 28, 2016
0ba56f7
[MIG][10.0][html_text] Migrate
yajo Jun 22, 2017
1aa658a
[MIG] html_text: Migration to 11.0
tarteo Feb 14, 2018
4c2292e
[FIX] External python override for package `lxml.html` (#1234)
Apr 27, 2018
c48effd
[UPD] Update html_text.pot
oca-travis Jun 17, 2018
7488653
[MIG] html_text:Migration to 12.0
Dike90 Nov 3, 2018
f18f003
Added translation using Weblate (Chinese (Simplified))
liweijie0812 Aug 31, 2019
a960d10
Translated using Weblate (Chinese (Simplified))
liweijie0812 Aug 31, 2019
c5ad556
Added translation using Weblate (Croatian)
badbole Nov 13, 2019
18481b7
Translated using Weblate (Croatian)
badbole Nov 13, 2019
f5cab2b
[IMP] html_text: black, isort, prettier
victoralmau Feb 19, 2021
8f3b44b
[MIG] html_text: Migration to 13.0
victoralmau Feb 19, 2021
946fd83
[UPD] Update html_text.pot
oca-travis Feb 19, 2021
46b243b
[UPD] README.rst
OCA-git-bot Feb 19, 2021
f6a5a1c
Update translation files
oca-transbot Feb 19, 2021
0b94af7
Translated using Weblate (Spanish)
anasuarez1 Mar 19, 2021
eab2f03
[MIG] html_text: Migration to 14.0
hkapatel-initos May 24, 2021
8c63e24
[UPD] Update html_text.pot
oca-travis Jul 23, 2021
b90c54d
[UPD] README.rst
OCA-git-bot Jul 23, 2021
184b6d4
Update translation files
oca-transbot Jul 23, 2021
e21db2d
[MIG] html_text: Migration to 15.0
Mantux11 Jan 13, 2022
dfc9853
[UPD] Update html_text.pot
Feb 2, 2022
16dea20
[UPD] README.rst
OCA-git-bot Feb 2, 2022
f7a5b4d
[IMP] update dotfiles
OCA-git-bot Mar 30, 2022
9bd2f7e
Added translation using Weblate (Spanish (Argentina))
ibuioli Sep 4, 2022
ce44974
Translated using Weblate (Spanish (Argentina))
ibuioli Sep 4, 2022
904342c
[IMP] html_text: pre-commit stuff
dsolanki-initos Mar 22, 2023
a380269
[MIG] html_text: Migration to 16.0
dsolanki-initos Mar 22, 2023
a08988b
[FIX] base_fontawesome: fixed replace files to show icons in website
Pablocce Oct 25, 2023
84a3927
[FIX] base_fontawesome: brands
danielduqma Oct 25, 2023
68ce44a
Merge PR #2740 into 16.0
OCA-git-bot Nov 1, 2023
3950a10
[BOT] post-merge updates
OCA-git-bot Nov 1, 2023
79347e5
Merge PR #2590 into 16.0
OCA-git-bot Nov 1, 2023
6bc7e51
[UPD] Update html_text.pot
Nov 1, 2023
9d53ca3
[BOT] post-merge updates
OCA-git-bot Nov 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ addon | version | maintainers | summary
[base_cron_exclusion](base_cron_exclusion/) | 16.0.1.0.0 | [![LoisRForgeFlow](https://github.com/LoisRForgeFlow.png?size=30px)](https://github.com/LoisRForgeFlow) [![ChrisOForgeFlow](https://github.com/ChrisOForgeFlow.png?size=30px)](https://github.com/ChrisOForgeFlow) | Allow you to select scheduled actions that should not run simultaneously.
[base_domain_inverse_function](base_domain_inverse_function/) | 16.0.1.0.0 | [![grindtildeath](https://github.com/grindtildeath.png?size=30px)](https://github.com/grindtildeath) | Provide function to inverse domain into parts
[base_exception](base_exception/) | 16.0.2.0.0 | [![hparfr](https://github.com/hparfr.png?size=30px)](https://github.com/hparfr) [![sebastienbeau](https://github.com/sebastienbeau.png?size=30px)](https://github.com/sebastienbeau) | This module provide an abstract model to manage customizable exceptions to be applied on different models (sale order, invoice, ...)
[base_fontawesome](base_fontawesome/) | 16.0.5.15.4 | | Up to date Fontawesome resources.
[base_fontawesome](base_fontawesome/) | 16.0.5.16.0 | | Up to date Fontawesome resources.
[base_m2m_custom_field](base_m2m_custom_field/) | 16.0.1.0.0 | | Customizations of Many2many
[base_name_search_improved](base_name_search_improved/) | 16.0.1.0.0 | | Friendlier search when typing in relation fields
[base_partition](base_partition/) | 16.0.1.0.0 | | Base module that provide the partition method on all models
Expand All @@ -39,6 +39,7 @@ addon | version | maintainers | summary
[dbfilter_from_header](dbfilter_from_header/) | 16.0.1.0.0 | | Filter databases with HTTP headers
[excel_import_export](excel_import_export/) | 16.0.1.0.0 | [![kittiu](https://github.com/kittiu.png?size=30px)](https://github.com/kittiu) | Base module for developing Excel import/export/report
[excel_import_export_demo](excel_import_export_demo/) | 16.0.1.0.0 | [![kittiu](https://github.com/kittiu.png?size=30px)](https://github.com/kittiu) | Excel Import/Export/Report Demo
[html_text](html_text/) | 16.0.1.0.0 | | Generate excerpts from any HTML field
[iap_alternative_provider](iap_alternative_provider/) | 16.0.1.0.0 | [![sebastienbeau](https://github.com/sebastienbeau.png?size=30px)](https://github.com/sebastienbeau) | Base module for providing alternative provider for iap apps
[jsonifier](jsonifier/) | 16.0.0.0.0 | | JSON-ify data for all models
[module_analysis](module_analysis/) | 16.0.1.0.1 | [![legalsylvain](https://github.com/legalsylvain.png?size=30px)](https://github.com/legalsylvain) | Add analysis tools regarding installed modules to know which installed modules comes from Odoo Core, OCA, or are custom modules
Expand Down
2 changes: 1 addition & 1 deletion base_fontawesome/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Base Fontawesome
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:7f154f04181283ab1fef4ee8ecfa09815ef26a8a6fb62be20b174f271a2589fc
!! source digest: sha256:0c4f9e03310fc1f84c9a01d2a4dc1370d3f142b723b89bae08d4078f7f56ad5a
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
6 changes: 5 additions & 1 deletion base_fontawesome/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
"name": "Base Fontawesome",
"summary": """Up to date Fontawesome resources.""",
"version": "16.0.5.15.4",
"version": "16.0.5.16.0",
"license": "LGPL-3",
"website": "https://github.com/OCA/server-tools",
"author": "Camptocamp,Creu Blanca,Odoo Community Association (OCA)",
Expand All @@ -28,6 +28,10 @@
"web/static/src/libs/fontawesome/css/font-awesome.css",
"base_fontawesome/static/src/css/fontawesome.css",
),
"base_fontawesome/static/lib/fontawesome-5.15.4/css/all.css",
"base_fontawesome/static/lib/fontawesome-5.15.4/css/v4-shims.css",
"base_fontawesome/static/src/js/form_renderer.js",
"base_fontawesome/static/src/js/list_renderer.js",
],
"web.report_assets_common": [
(
Expand Down
2 changes: 1 addition & 1 deletion base_fontawesome/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">Base Fontawesome</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:7f154f04181283ab1fef4ee8ecfa09815ef26a8a6fb62be20b174f271a2589fc
!! source digest: sha256:0c4f9e03310fc1f84c9a01d2a4dc1370d3f142b723b89bae08d4078f7f56ad5a
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-tools/tree/16.0/base_fontawesome"><img alt="OCA/server-tools" src="https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-base_fontawesome"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/server-tools&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>Provide up to date <a class="reference external" href="http://fontawesome.io/">Fontawesome</a> resources.</p>
Expand Down
2 changes: 1 addition & 1 deletion base_fontawesome/static/lib/fontawesome-5.15.4/css/all.css
Original file line number Diff line number Diff line change
Expand Up @@ -4612,5 +4612,5 @@ readers do not read off random characters that represent icons */

.fa,
.fas {
font-family: 'Font Awesome 5 Free';
font-family: 'Font Awesome 5 Free', 'Font Awesome 5 Brands' !important;
font-weight: 900; }
17 changes: 17 additions & 0 deletions base_fontawesome/static/src/css/fontawesome.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,23 @@
font-style: normal;
font-display: block;
}
@font-face {
font-family: "FontAwesomeBrands";
src: url("../../lib/fontawesome-5.15.4/webfonts/fa-brands-400.eot");
src: url("../../lib/fontawesome-5.15.4/webfonts/fa-brands-400.eot?#iefix&v=5.15.4")
format("embedded-opentype"),
url("../../lib/fontawesome-5.15.4/webfonts/fa-brands-400.woff2?v=5.15.4")
format("woff2"),
url("../../lib/fontawesome-5.15.4/webfonts/fa-brands-400.woff?v=5.15.4")
format("woff"),
url("../../lib/fontawesome-5.15.4/webfonts/fa-brands-400.ttf?v=5.15.4")
format("truetype"),
url("../../lib/fontawesome-5.15.4/webfonts/fa-brands-400.svg#fontawesome?v=5.15.4&fontawesomeregular")
format("svg");
font-weight: normal;
font-style: normal;
font-display: block;
}

.btn.fa,
.btn.fas,
Expand Down
123 changes: 123 additions & 0 deletions html_text/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
====================
Text from HTML field
====================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:7c377c62e6608920605229a29147973288dc49805cbc1e1d8bbbeeb4d3359eaa
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github
:target: https://github.com/OCA/server-tools/tree/16.0/html_text
:alt: OCA/server-tools
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-html_text
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module provides some technical features that allow to extract text from
any chunk of HTML, without HTML tags or attributes. You can chose either:

* To truncate the result by amount of words or characters.
* To append an ellipsis (or any character(s)) at the end of the result.

It can be used to easily generate excerpts.

**Table of contents**

.. contents::
:local:

Usage
=====

This module just adds a technical utility, but nothing for the end user.

If you are a developer and need this utility for your module, see these
examples and read the docs inside the code.

Python example::

def some_method(self):
# Get truncated text from an HTML field. It will 40 words and 100
# characters at most, and will have "..." appended at the end if it
# gets truncated.
truncated_text = self.env["ir.fields.converter"].text_from_html(
self.html_field, 40, 100, "...")

QWeb example::

<t t-esc="env['ir.fields.converter'].text_from_html(doc.html_field)"/>

.. 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/11.0

Known issues / Roadmap
======================

* An option could be added to try to respect the basic HTML tags inside the
excerpt (``<b>``, ``<i>``, ``<p>``, etc.).

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20html_text%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Grupo ESOC Ingeniería de Servicios
* Tecnativa
* Onestein

Contributors
~~~~~~~~~~~~

* Dennis Sluijk <[email protected]>
* `Tecnativa <https://www.tecnativa.com>`_:",
* Helly kapatel <[email protected]>
* Mantas Šniukas <[email protected]>
* Dhara Solanki <[email protected]>

* Jairo Llopis
* Vicent Cubells
* Víctor Martínez

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/16.0/html_text>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions html_text/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
19 changes: 19 additions & 0 deletions html_text/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2016-2017 Jairo Llopis <[email protected]>
# Copyright 2016 Tecnativa - Vicent Cubells
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Text from HTML field",
"summary": "Generate excerpts from any HTML field",
"version": "16.0.1.0.0",
"category": "Tools",
"website": "https://github.com/OCA/server-tools",
"author": "Grupo ESOC Ingeniería de Servicios, "
"Tecnativa, "
"Onestein, "
"Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
"external_dependencies": {"python": ["lxml"]},
"depends": ["base"],
}
45 changes: 45 additions & 0 deletions html_text/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * html_text
#
# Translators:
# Marc Tormo i Bochaca <[email protected]>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-19 18:00+0000\n"
"PO-Revision-Date: 2017-04-19 18:00+0000\n"
"Last-Translator: Marc Tormo i Bochaca <[email protected]>, 2017\n"
"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: html_text
#: model:ir.model.fields,field_description:html_text.field_ir_fields_converter__display_name
msgid "Display Name"
msgstr ""

#. module: html_text
#: model:ir.model,name:html_text.model_ir_fields_converter
#, fuzzy
msgid "Fields Converter"
msgstr "ir.fields.converter"

#. module: html_text
#: model:ir.model.fields,field_description:html_text.field_ir_fields_converter__id
msgid "ID"
msgstr ""

#. module: html_text
#: model:ir.model.fields,field_description:html_text.field_ir_fields_converter____last_update
msgid "Last Modified on"
msgstr ""

#. module: html_text
#: model:ir.model.fields,field_description:html_text.field_ir_fields_converter__smart_search
msgid "Smart Search"
msgstr ""
45 changes: 45 additions & 0 deletions html_text/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * html_text
#
# Translators:
# Rudolf Schnapka <[email protected]>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-19 18:00+0000\n"
"PO-Revision-Date: 2017-04-19 18:00+0000\n"
"Last-Translator: Rudolf Schnapka <[email protected]>, 2017\n"
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: html_text
#: model:ir.model.fields,field_description:html_text.field_ir_fields_converter__display_name
msgid "Display Name"
msgstr ""

#. module: html_text
#: model:ir.model,name:html_text.model_ir_fields_converter
#, fuzzy
msgid "Fields Converter"
msgstr "ir.fields.converter"

#. module: html_text
#: model:ir.model.fields,field_description:html_text.field_ir_fields_converter__id
msgid "ID"
msgstr ""

#. module: html_text
#: model:ir.model.fields,field_description:html_text.field_ir_fields_converter____last_update
msgid "Last Modified on"
msgstr ""

#. module: html_text
#: model:ir.model.fields,field_description:html_text.field_ir_fields_converter__smart_search
msgid "Smart Search"
msgstr ""
45 changes: 45 additions & 0 deletions html_text/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * html_text
#
# Translators:
# Pedro M. Baeza <[email protected]>, 2016
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-12-17 02:07+0000\n"
"PO-Revision-Date: 2021-03-19 17:46+0000\n"
"Last-Translator: Ana Suárez <[email protected]>\n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.3.2\n"

#. module: html_text
#: model:ir.model.fields,field_description:html_text.field_ir_fields_converter__display_name
msgid "Display Name"
msgstr ""

#. module: html_text
#: model:ir.model,name:html_text.model_ir_fields_converter
msgid "Fields Converter"
msgstr "Convertidor de Campos"

#. module: html_text
#: model:ir.model.fields,field_description:html_text.field_ir_fields_converter__id
msgid "ID"
msgstr ""

#. module: html_text
#: model:ir.model.fields,field_description:html_text.field_ir_fields_converter____last_update
msgid "Last Modified on"
msgstr ""

#. module: html_text
#: model:ir.model.fields,field_description:html_text.field_ir_fields_converter__smart_search
msgid "Smart Search"
msgstr ""
22 changes: 22 additions & 0 deletions html_text/i18n/es_AR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * html_text
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2022-09-04 06:07+0000\n"
"Last-Translator: Ignacio Buioli <[email protected]>\n"
"Language-Team: none\n"
"Language: es_AR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.3.2\n"

#. module: html_text
#: model:ir.model,name:html_text.model_ir_fields_converter
msgid "Fields Converter"
msgstr "Convertidor de Campos"
Loading
Loading