diff --git a/base_sequence_default/README.rst b/base_sequence_default/README.rst index fa9c8ed20..0f3350bb0 100644 --- a/base_sequence_default/README.rst +++ b/base_sequence_default/README.rst @@ -7,7 +7,7 @@ Default Fields with Sequence !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:46bd6b862d7ba13aade25e32561797314eacd98aabe5af22479e59e95bd4fc59 + !! source digest: sha256:ff7d3aed37cb25905d2a42e95caa5434fd63ca836b1f894f53a8435b5454a489 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png @@ -28,8 +28,11 @@ Default Fields with Sequence |badge1| |badge2| |badge3| |badge4| |badge5| -This module extends the defaults functionality to allow filling -*Character* type fields on creation with a predefined sequence. +This module extends the use of sequences. It will allow you to use them +in any text field. + +If configured correctly, new records will have a default incremental +value in the field of your choice. .. IMPORTANT:: This is an alpha version, the data model and design can change at any time without warning. @@ -47,32 +50,52 @@ Configuration To configure this module, you need to: 1. Enable developer mode. + 2. Go to the form view of the model to which you want to add the new sequential default value. + 3. Hover over the field to which you want to add the sequential default value. A tooltip with more info will appear. + 4. Make sure the tooltip says *Type: char*. Only those fields will work. + 5. Take note of the *Object* and *Field*. + 6. Go to *Settings > Technical > Sequences & Identifiers > Sequences*. + 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. Do not use ``{}`` when adding the + model and field name to the pattern. + + .. image:: https://github.com/OCA/server-tools/assets/147538094/ebf4be69-85d4-4c28-a3ec-bbe930fd53cf + :alt: Setting the sequence code properly + 8. Configure the sequence at will. + .. image:: https://github.com/OCA/server-tools/assets/147538094/e3eb311b-738f-4fce-9af5-a1b592908704 + :alt: Configuring a sequence to have date range sub-sequences + Usage ===== To use this module, it is necessary to: 1. Follow the configuration instructions. + 2. Create a record of the model you configured. + 3. Leave empty the fields where you configured a sequence. If they are required fields, set value to "-" to trigger the automatic sequence on creation. + 4. Check that the field defined in the sequence is set to the next value in the sequence. + .. image:: https://github.com/OCA/server-tools/assets/147538094/82698762-6ac2-4ac0-89ba-7c9b32ea5909 + :alt: The partner reference was auto-incremented as configured + Bug Tracker =========== diff --git a/base_sequence_default/readme/CONFIGURE.md b/base_sequence_default/readme/CONFIGURE.md index 185244586..2577ee76e 100644 --- a/base_sequence_default/readme/CONFIGURE.md +++ b/base_sequence_default/readme/CONFIGURE.md @@ -12,6 +12,11 @@ To configure this module, you need to: Sequences*. 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. + `base_sequence_default.res.partner.fields.name` to add a default sequenced + name for new partners. Do not use `{}` when adding the model and field name + to the pattern. + +  8. Configure the sequence at will. + +  diff --git a/base_sequence_default/readme/DESCRIPTION.md b/base_sequence_default/readme/DESCRIPTION.md index 1ebf38259..382ab131a 100644 --- a/base_sequence_default/readme/DESCRIPTION.md +++ b/base_sequence_default/readme/DESCRIPTION.md @@ -1,2 +1,5 @@ -This module extends the defaults functionality to allow filling -*Character* type fields on creation with a predefined sequence. +This module extends the use of sequences. It will allow you to use them in any text +field. + +If configured correctly, new records will have a default incremental value in the field +of your choice. diff --git a/base_sequence_default/readme/USAGE.md b/base_sequence_default/readme/USAGE.md index c349a6ab0..2f838f6d3 100644 --- a/base_sequence_default/readme/USAGE.md +++ b/base_sequence_default/readme/USAGE.md @@ -7,3 +7,5 @@ To use this module, it is necessary to: on creation. 4. Check that the field defined in the sequence is set to the next value in the sequence. + +  diff --git a/base_sequence_default/static/description/index.html b/base_sequence_default/static/description/index.html index 8d74da712..cb961f110 100644 --- a/base_sequence_default/static/description/index.html +++ b/base_sequence_default/static/description/index.html @@ -367,11 +367,13 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:46bd6b862d7ba13aade25e32561797314eacd98aabe5af22479e59e95bd4fc59 +!! source digest: sha256:ff7d3aed37cb25905d2a42e95caa5434fd63ca836b1f894f53a8435b5454a489 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-This module extends the defaults functionality to allow filling -Character type fields on creation with a predefined sequence.
+This module extends the use of sequences. It will allow you to use them +in any text field.
+If configured correctly, new records will have a default incremental +value in the field of your choice.
Important
This is an alpha version, the data model and design can change at any time without warning. @@ -395,33 +397,49 @@ Only for development or testing purpose, do not use in production.
To configure this module, you need to:
-Enable developer mode.
+Go to the form view of the model to which you want to add the new +sequential default value.
+Hover over the field to which you want to add the sequential default +value. A tooltip with more info will appear.
+Make sure the tooltip says Type: char. Only those fields will work.
+Take note of the Object and Field.
+Go to Settings > Technical > Sequences & Identifiers > Sequences.
+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.
Configure the sequence at will.
+To use this module, it is necessary to:
-Follow the configuration instructions.
+Create a record of the model you configured.
+Leave empty the fields where you configured a sequence. If they are required fields, set value to “-” to trigger the automatic sequence -on creation.
Check that the field defined in the sequence is set to the next value +in the sequence.
+