From fb2ec2af2baa8496c24d731001cc824dc288906e Mon Sep 17 00:00:00 2001 From: Flectra Community Bot Date: Sun, 26 Dec 2021 03:13:34 +0000 Subject: [PATCH] Automatic Update form OCA2FC Migrator --- .gitlab-ci.yml | 4 ---- README.md | 2 +- mis_builder/__manifest__.py | 2 +- mis_builder/models/mis_report.py | 13 +++++++++---- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0c1e063..e7b99e9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,7 +23,6 @@ test_all_modules: entrypoint: ["/bin/sh", "-c"] script: - apt-get install -y p7zip-full - - apt-get install -y expect-dev - 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" @@ -88,7 +87,6 @@ test_module_mis_builder_budget: entrypoint: ["/bin/sh", "-c"] script: - apt-get install -y p7zip-full - - apt install -y expect-dev - 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" @@ -148,7 +146,6 @@ test_module_mis_builder: entrypoint: ["/bin/sh", "-c"] script: - apt-get install -y p7zip-full - - apt install -y expect-dev - 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" @@ -208,7 +205,6 @@ test_module_mis_builder_demo: entrypoint: ["/bin/sh", "-c"] script: - apt-get install -y p7zip-full - - apt install -y expect-dev - 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" diff --git a/README.md b/README.md index f7bcbfd..7cff853 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Available addons addon | version | summary --- | --- | --- [mis_builder_budget](mis_builder_budget/) | 2.0.3.5.1| Create budgets for MIS reports -[mis_builder](mis_builder/) | 2.0.3.6.7| Build 'Management Information System' Reports and Dashboards +[mis_builder](mis_builder/) | 2.0.3.6.8| Build 'Management Information System' Reports and Dashboards [mis_builder_demo](mis_builder_demo/) | 2.0.3.1.3| Demo addon for MIS Builder diff --git a/mis_builder/__manifest__.py b/mis_builder/__manifest__.py index d720d3b..6f5d5fa 100644 --- a/mis_builder/__manifest__.py +++ b/mis_builder/__manifest__.py @@ -3,7 +3,7 @@ { "name": "MIS Builder", - "version": "2.0.3.6.7", + "version": "2.0.3.6.8", "category": "Reporting", "summary": """ Build 'Management Information System' Reports and Dashboards diff --git a/mis_builder/models/mis_report.py b/mis_builder/models/mis_report.py index 2a7109a..c794bf2 100644 --- a/mis_builder/models/mis_report.py +++ b/mis_builder/models/mis_report.py @@ -13,7 +13,12 @@ import pytz from flectra import _, api, fields, models from flectra.exceptions import UserError, ValidationError from flectra.models import expression as osv_expression -from flectra.tools.safe_eval import safe_eval +from flectra.tools.safe_eval import ( + datetime as safe_datetime, + dateutil as safe_dateutil, + safe_eval, + time as safe_time, +) from .accounting_none import AccountingNone from .aep import AccountingExpressionProcessor as AEP @@ -583,9 +588,9 @@ class MisReport(models.Model): model = self.env[query.model_id.model] eval_context = { "env": self.env, - "time": time, - "datetime": datetime, - "dateutil": dateutil, + "time": safe_time, + "datetime": safe_datetime, + "dateutil": safe_dateutil, # deprecated "uid": self.env.uid, "context": self.env.context,