[MIG] base_sequence_default: v16

@moduon MT-4324
pull/2765/head
Jairo Llopis 2023-11-27 09:47:22 +00:00
parent 640b10a3d1
commit ceca6029f5
No known key found for this signature in database
GPG Key ID: E47E3BE44B940490
3 changed files with 57 additions and 46 deletions

View File

@ -7,7 +7,7 @@ Default Fields with Sequence
!! This file is generated by oca-gen-addon-readme !! !! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !! !! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:7acf708e6fdb3228ff2bbff75e7fa7db4448b7838505c76def392f9262e90a09 !! source digest: sha256:c7159d99fc7227ae6aba6066894c512a23b5beeece75077d5779b7c41467a52e
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png .. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
@ -17,19 +17,19 @@ Default Fields with Sequence
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3 :alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github
:target: https://github.com/OCA/server-tools/tree/14.0/base_sequence_default :target: https://github.com/OCA/server-tools/tree/16.0/base_sequence_default
:alt: OCA/server-tools :alt: OCA/server-tools
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-tools-14-0/server-tools-14-0-base_sequence_default :target: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-base_sequence_default
:alt: Translate me on Weblate :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png .. |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=14.0 :target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=16.0
:alt: Try me on Runboat :alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5| |badge1| |badge2| |badge3| |badge4| |badge5|
This module extends the defaults functionality to allow filling *Character* This module extends the defaults functionality to allow filling
type fields on creation with a predefined sequence. *Character* type fields on creation with a predefined sequence.
.. IMPORTANT:: .. IMPORTANT::
This is an alpha version, the data model and design can change at any time without warning. This is an alpha version, the data model and design can change at any time without warning.
@ -46,28 +46,32 @@ Configuration
To configure this module, you need to: To configure this module, you need to:
#. Enable developer mode. 1. Enable developer mode.
#. Go to the form view of the model to which you want to add the new sequential default value. 2. Go to the form view of the model to which you want to add the new
#. Hover over the field to which you want to add the sequential default value. A tooltip with more info will appear. sequential default value.
#. Make sure the tooltip says *Type: char*. Only those fields will work. 3. Hover over the field to which you want to add the sequential default
#. Take note of the *Object* and *Field*. value. A tooltip with more info will appear.
#. Go to *Settings > Technical > Sequences & Identifiers > Sequences*. 4. Make sure the tooltip says *Type: char*. Only those fields will work.
#. Create one sequence with code named after this pattern: 5. Take note of the *Object* and *Field*.
``base_sequence_default.{object}.fields.{field}``. 6. Go to *Settings > Technical > Sequences & Identifiers > Sequences*.
E.g.: ``base_sequence_default.res.partner.fields.name`` to add a default 7. Create one sequence with code named after this pattern:
``base_sequence_default.{object}.fields.{field}``. E.g.:
``base_sequence_default.res.partner.fields.name`` to add a default
sequenced name for new partners. sequenced name for new partners.
#. Configure the sequence at will. 8. Configure the sequence at will.
Usage Usage
===== =====
To use this module, it is necessary to: To use this module, it is necessary to:
#. Follow the configuration instructions. 1. Follow the configuration instructions.
#. Create a record of the model you configured. 2. Create a record of the model you configured.
#. Leave empty the fields where you configured a sequence. If they are required 3. Leave empty the fields where you configured a sequence. If they are
fields, set value to "-" to trigger the automatic sequence on creation. required fields, set value to "-" to trigger the automatic sequence
#. Check that the field defined in the sequence is set to the next value in the sequence. on creation.
4. Check that the field defined in the sequence is set to the next value
in the sequence.
Bug Tracker Bug Tracker
=========== ===========
@ -75,7 +79,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_. 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. 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 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:%20base_sequence_default%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. `feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20base_sequence_default%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. Do not contact contributors directly about support or help with technical issues.
@ -83,19 +87,19 @@ Credits
======= =======
Authors Authors
~~~~~~~ -------
* Moduon * Moduon
Contributors Contributors
~~~~~~~~~~~~ ------------
* Rafael Blasco (`Moduon <https://www.moduon.team/>`__) - Rafael Blasco (`Moduon <https://www.moduon.team/>`__)
* Eduardo de Miguel (`Moduon <https://www.moduon.team/>`__) - Eduardo de Miguel (`Moduon <https://www.moduon.team/>`__)
* Jairo Llopis (`Moduon <https://www.moduon.team/>`__) - Jairo Llopis (`Moduon <https://www.moduon.team/>`__)
Maintainers Maintainers
~~~~~~~~~~~ -----------
This module is maintained by the OCA. This module is maintained by the OCA.
@ -113,11 +117,14 @@ promote its widespread use.
.. |maintainer-yajo| image:: https://github.com/yajo.png?size=40px .. |maintainer-yajo| image:: https://github.com/yajo.png?size=40px
:target: https://github.com/yajo :target: https://github.com/yajo
:alt: yajo :alt: yajo
.. |maintainer-rafaelbn| image:: https://github.com/rafaelbn.png?size=40px
:target: https://github.com/rafaelbn
:alt: rafaelbn
Current `maintainers <https://odoo-community.org/page/maintainer-role>`__: Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
|maintainer-Shide| |maintainer-yajo| |maintainer-Shide| |maintainer-yajo| |maintainer-rafaelbn|
This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/14.0/base_sequence_default>`_ project on GitHub. This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/16.0/base_sequence_default>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@ -4,12 +4,12 @@
{ {
"name": "Default Fields with Sequence", "name": "Default Fields with Sequence",
"summary": "Use sequences for default values of fields when creating a new record", "summary": "Use sequences for default values of fields when creating a new record",
"version": "14.0.1.0.0", "version": "16.0.1.0.0",
"development_status": "Alpha", "development_status": "Alpha",
"category": "Tools", "category": "Tools",
"website": "https://github.com/OCA/server-tools", "website": "https://github.com/OCA/server-tools",
"author": "Moduon, Odoo Community Association (OCA)", "author": "Moduon, Odoo Community Association (OCA)",
"maintainers": ["Shide", "yajo"], "maintainers": ["Shide", "yajo", "rafaelbn"],
"license": "AGPL-3", "license": "AGPL-3",
"application": False, "application": False,
"installable": True, "installable": True,

View File

@ -367,11 +367,11 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !! !! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !! !! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:7acf708e6fdb3228ff2bbff75e7fa7db4448b7838505c76def392f9262e90a09 !! source digest: sha256:c7159d99fc7227ae6aba6066894c512a23b5beeece75077d5779b7c41467a52e
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Alpha" src="https://img.shields.io/badge/maturity-Alpha-red.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-tools/tree/14.0/base_sequence_default"><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-14-0/server-tools-14-0-base_sequence_default"><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=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p> <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Alpha" src="https://img.shields.io/badge/maturity-Alpha-red.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-tools/tree/16.0/base_sequence_default"><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_sequence_default"><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>This module extends the defaults functionality to allow filling <em>Character</em> <p>This module extends the defaults functionality to allow filling
type fields on creation with a predefined sequence.</p> <em>Character</em> type fields on creation with a predefined sequence.</p>
<div class="admonition important"> <div class="admonition important">
<p class="first admonition-title">Important</p> <p class="first admonition-title">Important</p>
<p class="last">This is an alpha version, the data model and design can change at any time without warning. <p class="last">This is an alpha version, the data model and design can change at any time without warning.
@ -397,14 +397,16 @@ Only for development or testing purpose, do not use in production.
<p>To configure this module, you need to:</p> <p>To configure this module, you need to:</p>
<ol class="arabic simple"> <ol class="arabic simple">
<li>Enable developer mode.</li> <li>Enable developer mode.</li>
<li>Go to the form view of the model to which you want to add the new sequential default value.</li> <li>Go to the form view of the model to which you want to add the new
<li>Hover over the field to which you want to add the sequential default value. A tooltip with more info will appear.</li> sequential default value.</li>
<li>Hover over the field to which you want to add the sequential default
value. A tooltip with more info will appear.</li>
<li>Make sure the tooltip says <em>Type: char</em>. Only those fields will work.</li> <li>Make sure the tooltip says <em>Type: char</em>. Only those fields will work.</li>
<li>Take note of the <em>Object</em> and <em>Field</em>.</li> <li>Take note of the <em>Object</em> and <em>Field</em>.</li>
<li>Go to <em>Settings &gt; Technical &gt; Sequences &amp; Identifiers &gt; Sequences</em>.</li> <li>Go to <em>Settings &gt; Technical &gt; Sequences &amp; Identifiers &gt; Sequences</em>.</li>
<li>Create one sequence with code named after this pattern: <li>Create one sequence with code named after this pattern:
<tt class="docutils literal"><span class="pre">base_sequence_default.{object}.fields.{field}</span></tt>. <tt class="docutils literal"><span class="pre">base_sequence_default.{object}.fields.{field}</span></tt>. E.g.:
E.g.: <tt class="docutils literal">base_sequence_default.res.partner.fields.name</tt> to add a default <tt class="docutils literal">base_sequence_default.res.partner.fields.name</tt> to add a default
sequenced name for new partners.</li> sequenced name for new partners.</li>
<li>Configure the sequence at will.</li> <li>Configure the sequence at will.</li>
</ol> </ol>
@ -415,9 +417,11 @@ sequenced name for new partners.</li>
<ol class="arabic simple"> <ol class="arabic simple">
<li>Follow the configuration instructions.</li> <li>Follow the configuration instructions.</li>
<li>Create a record of the model you configured.</li> <li>Create a record of the model you configured.</li>
<li>Leave empty the fields where you configured a sequence. If they are required <li>Leave empty the fields where you configured a sequence. If they are
fields, set value to “-” to trigger the automatic sequence on creation.</li> required fields, set value to “-” to trigger the automatic sequence
<li>Check that the field defined in the sequence is set to the next value in the sequence.</li> on creation.</li>
<li>Check that the field defined in the sequence is set to the next value
in the sequence.</li>
</ol> </ol>
</div> </div>
<div class="section" id="bug-tracker"> <div class="section" id="bug-tracker">
@ -425,7 +429,7 @@ fields, set value to “-” to trigger the automatic sequence on creation.</li>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-tools/issues">GitHub Issues</a>. <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-tools/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported. 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 If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/server-tools/issues/new?body=module:%20base_sequence_default%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p> <a class="reference external" href="https://github.com/OCA/server-tools/issues/new?body=module:%20base_sequence_default%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p> <p>Do not contact contributors directly about support or help with technical issues.</p>
</div> </div>
<div class="section" id="credits"> <div class="section" id="credits">
@ -452,8 +456,8 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
mission is to support the collaborative development of Odoo features and mission is to support the collaborative development of Odoo features and
promote its widespread use.</p> promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p> <p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
<p><a class="reference external image-reference" href="https://github.com/Shide"><img alt="Shide" src="https://github.com/Shide.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/yajo"><img alt="yajo" src="https://github.com/yajo.png?size=40px" /></a></p> <p><a class="reference external image-reference" href="https://github.com/Shide"><img alt="Shide" src="https://github.com/Shide.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/yajo"><img alt="yajo" src="https://github.com/yajo.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/rafaelbn"><img alt="rafaelbn" src="https://github.com/rafaelbn.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-tools/tree/14.0/base_sequence_default">OCA/server-tools</a> project on GitHub.</p> <p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-tools/tree/16.0/base_sequence_default">OCA/server-tools</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p> <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div> </div>
</div> </div>