Metadata-Version: 2.4
Name: collective.behavior.internalnumber
Version: 0.5.0
Summary: Configurable internal number plone behavior
Author: Stephan Geulette
Author-email: support@imio.be
License: GPL version 2
Project-URL: PyPI, https://pypi.python.org/pypi/collective.behavior.internalnumber
Project-URL: Source, https://github.com/collective/collective.behavior.internalnumber
Keywords: Python Plone
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Framework :: Plone
Classifier: Framework :: Plone :: Addon
Classifier: Framework :: Plone :: 4.3
Classifier: Framework :: Plone :: 5.2
Classifier: Framework :: Plone :: 6.0
Classifier: Framework :: Plone :: 6.1
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
Requires-Python: >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*
Requires-Dist: plone.api
Requires-Dist: Products.GenericSetup>=1.8.2
Requires-Dist: setuptools
Requires-Dist: collective.behavior.talcondition
Requires-Dist: collective.z3cform.datagridfield
Provides-Extra: test
Requires-Dist: plone.app.testing; extra == "test"
Requires-Dist: plone.testing>=5.0.0; extra == "test"
Requires-Dist: plone.app.contenttypes; extra == "test"
Requires-Dist: plone.app.robotframework[debug]; extra == "test"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: keywords
Dynamic: license
Dynamic: project-url
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

.. This README is meant for consumption by humans and pypi. Pypi can render rst files so please do not use Sphinx features.
   If you want to learn more about writing documentation, please check out: http://docs.plone.org/about/documentation_styleguide.html
   This text does not appear on pypi or github. It is a comment.

.. image:: https://github.com/IMIO/collective.behavior.internalnumber/actions/workflows/main.yml/badge.svg?branch=master
    :target: https://github.com/IMIO/collective.behavior.internalnumber/actions/workflows/main.yml

.. image:: https://coveralls.io/repos/github/IMIO/collective.behavior.internalnumber/badge.svg
    :target: https://coveralls.io/github/IMIO/collective.behavior.internalnumber

.. image:: http://img.shields.io/pypi/v/collective.behavior.internalnumber.svg
   :alt: PyPI badge
   :target: https://pypi.org/project/collective.behavior.internalnumber


==============================================================================
collective.behavior.internalnumber
==============================================================================

This product adds a plone behavior for dexterity content.
The behavior adds a text field containing an internal number.

Features
--------

- Optional uniqueness validation
- Optional default value
- Inclusion in searchable text
- Global or type by type configuration
- A configuration page can manage globally or type by type:

  * a uniqueness option
  * an incremented number
  * a default value tal expression

Usage
-----

In the configuration panel, go to dexterity types.
Click on the type you want extend with the internal number field.
Go to the behavior tab.
Select "Internal number field" behavior.

If you want the internal number be searched in searchable text, you can also select
the "Dynamic SearchableText indexer behavior"

Translations
------------

This product has been translated into

- French (thanks the author)


Installation
------------

Install collective.behavior.internalnumber by adding it to your buildout::

    [buildout]

    ...

    eggs =
        collective.behavior.internalnumber


and then running ``bin/buildout``


Contribute
----------

- Issue Tracker: https://github.com/collective/collective.behavior.internalnumber/issues
- Source Code: https://github.com/collective/collective.behavior.internalnumber
- Documentation: https://docs.plone.org/foo/bar


License
-------

The project is licensed under the GPLv2.


Contributors
============

- Stephan Geulette, support@imio.be


Changelog
=========


0.5.0 (2025-11-25)
------------------

- Added Plone 6.1 version in buildout.
  [chris-adam]
- Added controlpanel icon
  [sgeulette]
- Upgraded zc.buildout
  [sgeulette]

0.4 (2024-06-07)
----------------

- Use `fti.Title()` that is a i18n `Message` instance to manage settings
  `portal_types` vocabulary.  Also sort vocabulary by term title.
  [gbastien]

0.3 (2023-11-27)
----------------

- Removed catalog metadata `internal_number`, added upgrade step to 1001.
  [gbastien]

0.2 (2023-05-31)
----------------

- Made compliant with Plone 4.3, 5.2 and 6.0
  [sgeulette]
- Ordered imports & improved docstring
  [sgeulette]
- Factorized increment/decrement functionnality in `settings.increment_nb_for`,
  `settings.decrement_nb_for` and `settings.decrement_if_last_nb` functions.
  Added helper function `settings.set_settings`.
  [gbastien]
- Fixed `ConnectionStateError` while setting `registry[TYPE_CONFIG]`
  in tests and profile is applied several times.
  [gbastien]

0.1 (2017-05-31)
----------------

- Initial release.
  [sgeulette]
