diff --git a/web_text_count_field/README.rst b/web_text_count_field/README.rst index 74b0f8d7..1404b5ff 100644 --- a/web_text_count_field/README.rst +++ b/web_text_count_field/README.rst @@ -25,8 +25,7 @@ Web Textarea with Counter |badge1| |badge2| |badge3| |badge4| |badge5| -Field ``TextCount``, combined to widget ``text_count``, is displayed as a usual -text field with a character counter next to it. +Widget ``text_count`` displays a character counter next to the text field. **Table of contents** @@ -36,11 +35,6 @@ text field with a character counter next to it. Usage ===== -.. code-block:: python - - from odoo import fields - sometext = fields.TextCount('My Text', size=250) - .. code-block:: xml diff --git a/web_text_count_field/__init__.py b/web_text_count_field/__init__.py index 0650744f..e69de29b 100644 --- a/web_text_count_field/__init__.py +++ b/web_text_count_field/__init__.py @@ -1 +0,0 @@ -from . import models diff --git a/web_text_count_field/__manifest__.py b/web_text_count_field/__manifest__.py index be0d831a..510937af 100644 --- a/web_text_count_field/__manifest__.py +++ b/web_text_count_field/__manifest__.py @@ -5,6 +5,7 @@ "category": "Web", "version": "12.0.1.0.0", "author": "Camptocamp SA, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/web", "license": "AGPL-3", "depends": [ 'web', diff --git a/web_text_count_field/models/__init__.py b/web_text_count_field/models/__init__.py deleted file mode 100644 index 73544389..00000000 --- a/web_text_count_field/models/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import fields diff --git a/web_text_count_field/models/fields.py b/web_text_count_field/models/fields.py deleted file mode 100644 index ba8e59a2..00000000 --- a/web_text_count_field/models/fields.py +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright 2019 Camptocamp -# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). - -from odoo import fields - - -class TextCount(fields.Text): - - def __init__(self, string, size=128, **kwargs): - assert size, "Size is mandatory in text_count field" - super().__init__(string=string, size=size, **kwargs) - - -fields.TextCount = TextCount diff --git a/web_text_count_field/readme/DESCRIPTION.rst b/web_text_count_field/readme/DESCRIPTION.rst index 1e80e9df..92e5d629 100644 --- a/web_text_count_field/readme/DESCRIPTION.rst +++ b/web_text_count_field/readme/DESCRIPTION.rst @@ -1,2 +1 @@ -Field ``TextCount``, combined to widget ``text_count``, is displayed as a usual -text field with a character counter next to it. +Widget ``text_count`` displays a character counter next to the text field. diff --git a/web_text_count_field/readme/USAGE.rst b/web_text_count_field/readme/USAGE.rst index 16bd8be0..a30b8023 100644 --- a/web_text_count_field/readme/USAGE.rst +++ b/web_text_count_field/readme/USAGE.rst @@ -1,8 +1,3 @@ -.. code-block:: python - - from odoo import fields - sometext = fields.TextCount('My Text', size=250) - .. code-block:: xml diff --git a/web_text_count_field/static/description/index.html b/web_text_count_field/static/description/index.html index 8e621a0e..b0873169 100644 --- a/web_text_count_field/static/description/index.html +++ b/web_text_count_field/static/description/index.html @@ -368,8 +368,7 @@ ul.auto-toc { !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/web Translate me on Weblate Try me on Runbot

-

Field TextCount, combined to widget text_count, is displayed as a usual -text field with a character counter next to it.

+

Widget text_count displays a character counter next to the text field.

Table of contents

    @@ -385,10 +384,6 @@ text field with a character counter next to it.

Usage

-
-from odoo import fields
-sometext = fields.TextCount('My Text', size=250)
-
 <field name="text" widget="text_count" colspan="2"/>