diff --git a/project_forecast_line_bokeh_chart/README.rst b/project_forecast_line_bokeh_chart/README.rst index 4dc3fe8053..af5205d374 100644 --- a/project_forecast_line_bokeh_chart/README.rst +++ b/project_forecast_line_bokeh_chart/README.rst @@ -7,7 +7,7 @@ Project Forecast Lines Bokeh Chart !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:c3531fb0c734d3d8fc5b939e61ebcdb3578fb6f36ffa26ee23a2a21c90907610 + !! source digest: sha256:a7327f21c129e75331cfde1eca3cd0fbbf712c6360a449038e6d09bd8cfe2718 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png diff --git a/project_forecast_line_bokeh_chart/__manifest__.py b/project_forecast_line_bokeh_chart/__manifest__.py index e350cb4085..5b2c44d4f0 100644 --- a/project_forecast_line_bokeh_chart/__manifest__.py +++ b/project_forecast_line_bokeh_chart/__manifest__.py @@ -13,6 +13,7 @@ "data": [ "security/ir.model.access.csv", "report/forecast_line_reporting_views.xml", + "data/ir_cron.xml", ], "development_status": "Alpha", "installable": True, diff --git a/project_forecast_line_bokeh_chart/data/ir_cron.xml b/project_forecast_line_bokeh_chart/data/ir_cron.xml new file mode 100644 index 0000000000..981f59b781 --- /dev/null +++ b/project_forecast_line_bokeh_chart/data/ir_cron.xml @@ -0,0 +1,21 @@ + + + + Update Forecast reports date to the current date + + + code + model._cron_update_date_from() + 1 + days + + -1 + + + diff --git a/project_forecast_line_bokeh_chart/i18n/es.po b/project_forecast_line_bokeh_chart/i18n/es.po new file mode 100644 index 0000000000..6a5cedef7b --- /dev/null +++ b/project_forecast_line_bokeh_chart/i18n/es.po @@ -0,0 +1,142 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_forecast_line_bokeh_chart +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-10-09 07:43+0000\n" +"Last-Translator: Ivorra78 \n" +"Language-Team: none\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: project_forecast_line_bokeh_chart +#: code:addons/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py:0 +#, python-format +msgid "Available" +msgstr "Disponible" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__bokeh_chart +msgid "Bokeh Chart" +msgstr "Gráfico Bokeh" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__create_date +msgid "Created on" +msgstr "Creado el" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__date_from +msgid "Date From" +msgstr "Fecha desde" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields.selection,name:project_forecast_line_bokeh_chart.selection__forecast_line_reporting__granularity__day +msgid "Day" +msgstr "Día" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__display_name +msgid "Display Name" +msgstr "Mostrar Nombre" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__employee_ids +msgid "Employee" +msgstr "Empleado/a" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.actions.act_window,name:project_forecast_line_bokeh_chart.action_forecast_lines_reporting +#: model:ir.ui.menu,name:project_forecast_line_bokeh_chart.menu_forecast_line_reporting +#: model_terms:ir.ui.view,arch_db:project_forecast_line_bokeh_chart.forecast_line_reporting_form +msgid "Forecast Reporting" +msgstr "Informes de previsión" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model,name:project_forecast_line_bokeh_chart.model_forecast_line_reporting +msgid "Forecast reporting wizard" +msgstr "Asistente de informes de previsiones" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__granularity +msgid "Granularity" +msgstr "Granularidad" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__id +msgid "ID" +msgstr "ID (identificación)" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting____last_update +msgid "Last Modified on" +msgstr "Última Modificación el" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__write_uid +msgid "Last Updated by" +msgstr "Actualizado por Última vez por" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__write_date +msgid "Last Updated on" +msgstr "Última Actualización el" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields.selection,name:project_forecast_line_bokeh_chart.selection__forecast_line_reporting__granularity__month +msgid "Month" +msgstr "Mes" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__nb_months +msgid "Nb Months" +msgstr "Meses Nb" + +#. module: project_forecast_line_bokeh_chart +#: code:addons/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py:0 +#, python-format +msgid "Not assigned to an employee" +msgstr "No asignado a un empleado" + +#. module: project_forecast_line_bokeh_chart +#: code:addons/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py:0 +#, python-format +msgid "Nothing to plot. Select some employees" +msgstr "Nada que trazar. Seleccione algunos empleados" + +#. module: project_forecast_line_bokeh_chart +#: code:addons/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py:0 +#, python-format +msgid "Overload" +msgstr "Sobrecarga" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__project_ids +msgid "Project" +msgstr "Proyecto" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,help:project_forecast_line_bokeh_chart.field_forecast_line_reporting__project_ids +msgid "" +"Setting this will automatically add all employees assigned to tasks on the " +"project" +msgstr "" +"Al establecer esta opción, se añadirán automáticamente todos los empleados " +"asignados a las tareas del proyecto" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields.selection,name:project_forecast_line_bokeh_chart.selection__forecast_line_reporting__granularity__week +msgid "Week" +msgstr "Semana" diff --git a/project_forecast_line_bokeh_chart/i18n/fr.po b/project_forecast_line_bokeh_chart/i18n/fr.po index f3ef41984d..054ccf848d 100644 --- a/project_forecast_line_bokeh_chart/i18n/fr.po +++ b/project_forecast_line_bokeh_chart/i18n/fr.po @@ -60,7 +60,7 @@ msgstr "" #. module: project_forecast_line_bokeh_chart #: model:ir.actions.act_window,name:project_forecast_line_bokeh_chart.action_forecast_lines_reporting #: model:ir.ui.menu,name:project_forecast_line_bokeh_chart.menu_forecast_line_reporting -#: model_terms:ir.ui.view,arch_db:project_forecast_line_bokeh_chart.view_forecast_line_reporting +#: model_terms:ir.ui.view,arch_db:project_forecast_line_bokeh_chart.forecast_line_reporting_form msgid "Forecast Reporting" msgstr "" diff --git a/project_forecast_line_bokeh_chart/i18n/it.po b/project_forecast_line_bokeh_chart/i18n/it.po new file mode 100644 index 0000000000..a8b73f1e1e --- /dev/null +++ b/project_forecast_line_bokeh_chart/i18n/it.po @@ -0,0 +1,142 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_forecast_line_bokeh_chart +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-04-11 15:22+0000\n" +"Last-Translator: mymage \n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.14.1\n" + +#. module: project_forecast_line_bokeh_chart +#: code:addons/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py:0 +#, python-format +msgid "Available" +msgstr "Disponibile" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__bokeh_chart +msgid "Bokeh Chart" +msgstr "Grafico Bokeh" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__create_uid +msgid "Created by" +msgstr "Creato da" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__create_date +msgid "Created on" +msgstr "Creato il" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__date_from +msgid "Date From" +msgstr "Dalla data" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields.selection,name:project_forecast_line_bokeh_chart.selection__forecast_line_reporting__granularity__day +msgid "Day" +msgstr "Giorno" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__display_name +msgid "Display Name" +msgstr "Nome visualizzato" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__employee_ids +msgid "Employee" +msgstr "Dipendente" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.actions.act_window,name:project_forecast_line_bokeh_chart.action_forecast_lines_reporting +#: model:ir.ui.menu,name:project_forecast_line_bokeh_chart.menu_forecast_line_reporting +#: model_terms:ir.ui.view,arch_db:project_forecast_line_bokeh_chart.forecast_line_reporting_form +msgid "Forecast Reporting" +msgstr "Resoconto previsionale" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model,name:project_forecast_line_bokeh_chart.model_forecast_line_reporting +msgid "Forecast reporting wizard" +msgstr "Procedura guidata resoconto previsionale" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__granularity +msgid "Granularity" +msgstr "Granularità" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__id +msgid "ID" +msgstr "ID" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting____last_update +msgid "Last Modified on" +msgstr "Ultima modifica il" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__write_uid +msgid "Last Updated by" +msgstr "Ultimo aggiornamento di" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__write_date +msgid "Last Updated on" +msgstr "Ultimo aggiornamento il" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields.selection,name:project_forecast_line_bokeh_chart.selection__forecast_line_reporting__granularity__month +msgid "Month" +msgstr "Mese" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__nb_months +msgid "Nb Months" +msgstr "Nr. mesi" + +#. module: project_forecast_line_bokeh_chart +#: code:addons/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py:0 +#, python-format +msgid "Not assigned to an employee" +msgstr "Non assegnato a un dipendente" + +#. module: project_forecast_line_bokeh_chart +#: code:addons/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py:0 +#, python-format +msgid "Nothing to plot. Select some employees" +msgstr "Niente da disegnare. Selezionare qualche dipendente" + +#. module: project_forecast_line_bokeh_chart +#: code:addons/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py:0 +#, python-format +msgid "Overload" +msgstr "Sovraccarico" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__project_ids +msgid "Project" +msgstr "Progetto" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,help:project_forecast_line_bokeh_chart.field_forecast_line_reporting__project_ids +msgid "" +"Setting this will automatically add all employees assigned to tasks on the " +"project" +msgstr "" +"Questa impostazione aggiungerà automaticamente tutti i dipendenti assegnati " +"alle attività al progetto" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields.selection,name:project_forecast_line_bokeh_chart.selection__forecast_line_reporting__granularity__week +msgid "Week" +msgstr "Settimana" diff --git a/project_forecast_line_bokeh_chart/i18n/project_forecast_line_bokeh_chart.pot b/project_forecast_line_bokeh_chart/i18n/project_forecast_line_bokeh_chart.pot index 4fbcd3c7d2..e920fe6545 100644 --- a/project_forecast_line_bokeh_chart/i18n/project_forecast_line_bokeh_chart.pot +++ b/project_forecast_line_bokeh_chart/i18n/project_forecast_line_bokeh_chart.pot @@ -58,7 +58,7 @@ msgstr "" #. module: project_forecast_line_bokeh_chart #: model:ir.actions.act_window,name:project_forecast_line_bokeh_chart.action_forecast_lines_reporting #: model:ir.ui.menu,name:project_forecast_line_bokeh_chart.menu_forecast_line_reporting -#: model_terms:ir.ui.view,arch_db:project_forecast_line_bokeh_chart.view_forecast_line_reporting +#: model_terms:ir.ui.view,arch_db:project_forecast_line_bokeh_chart.forecast_line_reporting_form msgid "Forecast Reporting" msgstr "" diff --git a/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py b/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py index 468ab92206..395f691827 100644 --- a/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py +++ b/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py @@ -16,7 +16,10 @@ class ForecastLineReporting(models.TransientModel): _name = "forecast.line.reporting" _description = "Forecast reporting wizard" + # allow reports to exist for 12h + _transient_max_hours = 24.0 + name = fields.Char(required=True) bokeh_chart = fields.Text(compute="_compute_bokeh_chart") date_from = fields.Date(default=fields.Date.today) nb_months = fields.Integer(default=2) @@ -217,3 +220,9 @@ def _build_plots(self, height=300, width=1024): p.add_layout(p.legend[0], "right") plots.append(p) return plots + + @api.model + def _cron_update_date_from(self): + today = fields.Date.context_today(self) + forecast_reports = self.search([]) + forecast_reports.write({"date_from": today}) diff --git a/project_forecast_line_bokeh_chart/report/forecast_line_reporting_views.xml b/project_forecast_line_bokeh_chart/report/forecast_line_reporting_views.xml index 53647c89ee..7a7b54f565 100644 --- a/project_forecast_line_bokeh_chart/report/forecast_line_reporting_views.xml +++ b/project_forecast_line_bokeh_chart/report/forecast_line_reporting_views.xml @@ -1,11 +1,30 @@ - + + forecast.line.reporting + + + + + + + + + + + forecast.line.reporting - Forecast Reporting + + + + @@ -13,7 +32,11 @@ - + @@ -23,11 +46,20 @@ + + forecast.line.reporting + + + + + + Forecast Reporting ir.actions.act_window forecast.line.reporting - form + tree,form + Project Forecast Lines Bokeh Chart !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:c3531fb0c734d3d8fc5b939e61ebcdb3578fb6f36ffa26ee23a2a21c90907610 + +!! source digest: sha256:a7327f21c129e75331cfde1eca3cd0fbbf712c6360a449038e6d09bd8cfe2718 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> This module improves the reports of project_forecast_line by using the bokeh widget available in OCA/web.
This module improves the reports of project_forecast_line by using the bokeh widget available in OCA/web.