diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7375a99..0d9c29b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -71,10 +71,11 @@ test_all_modules:
--db_password flectra
--database test_all
--test-enable
- --init base_cancel_confirm,filter_multi_user,default_multi_user,sequence_range_end,sequence_reset_period,sequence_check_digit,base_import_security_group,date_range,base_tier_validation_forward,base_menu_visibility_restriction,barcode_action,multi_step_wizard,base_technical_features,base_tier_validation_formula,base_tier_validation,base_search_custom_field_filter,base_revision,base_export_manager,document_quick_access,mass_editing,base_tier_validation_server_action,mass_operation_abstract,chained_swapper,base_optional_quick_create,document_quick_access_folder_auto_classification
+ --init base_cancel_confirm,base_substate,filter_multi_user,default_multi_user,sequence_range_end,sequence_reset_period,sequence_check_digit,base_import_security_group,date_range,base_tier_validation_forward,base_menu_visibility_restriction,barcode_action,multi_step_wizard,base_technical_features,base_tier_validation_formula,base_tier_validation,base_search_custom_field_filter,base_revision,base_export_manager,document_quick_access,mass_editing,base_tier_validation_server_action,mass_operation_abstract,chained_swapper,base_optional_quick_create,document_quick_access_folder_auto_classification
--stop-after-init
--log-level error
--log-handler flectra.addons.base_cancel_confirm:TEST
+ --log-handler flectra.addons.base_substate:TEST
--log-handler flectra.addons.filter_multi_user:TEST
--log-handler flectra.addons.default_multi_user:TEST
--log-handler flectra.addons.sequence_range_end:TEST
@@ -162,6 +163,66 @@ test_module_base_cancel_confirm:
--log-level error
--log-handler flectra.addons.base_cancel_confirm:TEST"
+test_module_base_substate:
+ stage: testsingle
+ when: on_failure
+ image:
+ name: registry.gitlab.com/jamotion/flectra/ubuntudev:2-latest
+ entrypoint: ["/bin/sh", "-c"]
+ script:
+ - apt-get install -y p7zip-full
+ - apt install -y expect-dev libzbar0 poppler-utils
+ - pip3 install -r ${CI_PROJECT_DIR}/requirements.txt
+ - su - flectra -c "mkdir ~/others"
+ - su - flectra -c "git clone --branch 20-fixed --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/flectra-community/account-analytic.git ~/others/account-analytic"
+ - su - flectra -c "git clone --branch 20-fixed --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/flectra-community/account-closing.git ~/others/account-closing"
+ - su - flectra -c "git clone --branch 20-fixed --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/flectra-community/account-financial-tools.git ~/others/account-financial-tools"
+ - su - flectra -c "git clone --branch 20-fixed --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/flectra-community/account-invoicing.git ~/others/account-invoicing"
+ - su - flectra -c "git clone --branch 20-fixed --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/flectra-community/account-payment.git ~/others/account-payment"
+ - su - flectra -c "git clone --branch 20-fixed --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/flectra-community/bank-payment.git ~/others/bank-payment"
+ - su - flectra -c "git clone --branch 20-fixed --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/flectra-community/brand.git ~/others/brand"
+ - su - flectra -c "git clone --branch 20-fixed --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/flectra-community/community-data-files.git ~/others/community-data-files"
+ - su - flectra -c "git clone --branch 20-fixed --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/flectra-community/connector.git ~/others/connector"
+ - su - flectra -c "git clone --branch 20-fixed --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/flectra-community/edi.git ~/others/edi"
+ - su - flectra -c "git clone --branch 20-fixed --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/flectra-community/partner-contact.git ~/others/partner-contact"
+ - su - flectra -c "git clone --branch 20-fixed --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/flectra-community/product-attribute.git ~/others/product-attribute"
+ - su - flectra -c "git clone --branch 20-fixed --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/flectra-community/queue.git ~/others/queue"
+ - su - flectra -c "git clone --branch 20-fixed --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/flectra-community/report-print-send.git ~/others/report-print-send"
+ - su - flectra -c "git clone --branch 20-fixed --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/flectra-community/reporting-engine.git ~/others/reporting-engine"
+ - su - flectra -c "git clone --branch 20-fixed --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/flectra-community/rest-framework.git ~/others/rest-framework"
+ - su - flectra -c "git clone --branch 20-fixed --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/flectra-community/sale-workflow.git ~/others/sale-workflow"
+ - su - flectra -c "git clone --branch 20-fixed --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/flectra-community/server-auth.git ~/others/server-auth"
+ - su - flectra -c "git clone --branch 20-fixed --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/flectra-community/server-env.git ~/others/server-env"
+ - su - flectra -c "git clone --branch 20-fixed --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/flectra-community/server-tools.git ~/others/server-tools"
+ - su - flectra -c "git clone --branch 20-fixed --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/flectra-community/social.git ~/others/social"
+ - su - flectra -c "git clone --branch 20-fixed --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/flectra-community/stock-logistics-transport.git ~/others/stock-logistics-transport"
+ - su - flectra -c "git clone --branch 20-fixed --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/flectra-community/stock-logistics-warehouse.git ~/others/stock-logistics-warehouse"
+ - su - flectra -c "git clone --branch 20-fixed --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/flectra-community/stock-logistics-workflow.git ~/others/stock-logistics-workflow"
+ - su - flectra -c "git clone --branch 20-fixed --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/flectra-community/storage.git ~/others/storage"
+ - su - flectra -c "git clone --branch 20-fixed --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/flectra-community/web.git ~/others/web"
+ - su - flectra -c "git clone --branch 20-fixed --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/flectra-community/wms.git ~/others/wms"
+ - sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && dpkg-reconfigure --frontend=noninteractive locales && update-locale LANG=en_US.UTF-8
+ - mkdir ${CI_PROJECT_DIR}/ci_data
+ - wget -O ${CI_PROJECT_DIR}/ci_data/test_base.zip https://gitlab.com/flectra-community/devops/oca2fc/raw/master/ci_data/test_base.zip
+ - 7z x -o ${CI_PROJECT_DIR}/ci_data/ ${CI_PROJECT_DIR}/ci_data/test_base.zip
+ - export PGPASSWORD="flectra"
+ - createdb -h psql -U flectra -O flectra -T template1 test_base_substate
+ - psql -h psql -U flectra -d test_base_substate -f ${CI_PROJECT_DIR}/ci_data/dump.sql
+ - su - flectra -c "mkdir -p ~/.local/share/filestore"
+ - mv ${CI_PROJECT_DIR}/ci_data/filestore /opt/flectra/.local/share/filestore/test_base_substate
+ - chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_base_substate
+ - su - flectra -c "/opt/flectra/flectra-bin
+ --addons-path ${CI_PROJECT_DIR},~/others/account-analytic,~/others/account-closing,~/others/account-financial-tools,~/others/account-invoicing,~/others/account-payment,~/others/bank-payment,~/others/brand,~/others/community-data-files,~/others/connector,~/others/edi,~/others/partner-contact,~/others/product-attribute,~/others/queue,~/others/report-print-send,~/others/reporting-engine,~/others/rest-framework,~/others/sale-workflow,~/others/server-auth,~/others/server-env,~/others/server-tools,~/others/social,~/others/stock-logistics-transport,~/others/stock-logistics-warehouse,~/others/stock-logistics-workflow,~/others/storage,~/others/web,~/others/wms
+ --db_host psql
+ --db_port 5432
+ --db_user flectra
+ --db_password flectra
+ --database test_base_substate
+ --test-enable -i base_substate
+ --stop-after-init
+ --log-level error
+ --log-handler flectra.addons.base_substate:TEST"
+
test_module_filter_multi_user:
stage: testsingle
when: on_failure
diff --git a/README.md b/README.md
index 4ef2400..ab7178f 100644
--- a/README.md
+++ b/README.md
@@ -10,6 +10,7 @@ Available addons
addon | version | summary
--- | --- | ---
[base_cancel_confirm](base_cancel_confirm/) | 2.0.1.0.2| Base Cancel Confirm
+[base_substate](base_substate/) | 2.0.1.0.0| Base Sub State
[filter_multi_user](filter_multi_user/) | 2.0.1.0.0| Allows to share user-defined filters filters among several users.
[default_multi_user](default_multi_user/) | 2.0.1.0.0| Allows to share user-defined defaults among several users.
[sequence_range_end](sequence_range_end/) | 2.0.1.0.0| Sequence prefix/suffix option, 'range_end_', to use the beginning of the range
diff --git a/base_substate/COPYRIGHT b/base_substate/COPYRIGHT
new file mode 100644
index 0000000..8c28c19
--- /dev/null
+++ b/base_substate/COPYRIGHT
@@ -0,0 +1,18 @@
+Most of the files are
+
+ :Copyright: This stylesheet has been placed in the public domain.
+
+
+This module provide abstract models to manage customizable
+substates to be applied on different models (sale order, purchase, …).
+
+
example:
+
+- for the quotation state of a sale order we can define 3 substates “In negotiation”,
+“Won” and “Lost”.
+- We can also send mail when the susbstate is reached.
+
+
It is not useful for itself. You can see an example of implementation
+in the ‘purchase_substate’ module. (purchase-workflow repository).
+
Table of contents
+
+
+
+
+- You must install an application module depending this one (for example purchase_substate)
+
+
+
+
+
Bugs are tracked on GitHub Issues.
+In case of trouble, please check there if your issue has already been reported.
+If you spotted it first, help us smashing it by providing a detailed and welcomed
+feedback.
+
Do not contact contributors directly about support or help with technical issues.
+
+
+
+
+
+
+
+
This module is maintained by the OCA.
+
+
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-ux project on GitHub.
+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
+
+
+
+
+