From 639af6a7c7c3de535c0a46309911e7182c131e3a Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Fri, 18 May 2018 14:07:43 +0200 Subject: [PATCH 01/25] [ADD] sequence_reset_period --- sequence_reset_period/README.rst | 38 ++++++++++ sequence_reset_period/__init__.py | 1 + sequence_reset_period/__manifest__.py | 21 ++++++ .../i18n/sequence_reset_period.pot | 45 +++++++++++ sequence_reset_period/models/__init__.py | 1 + sequence_reset_period/models/ir_sequence.py | 58 ++++++++++++++ .../static/description/icon.png | Bin 0 -> 9455 bytes sequence_reset_period/tests/__init__.py | 1 + sequence_reset_period/tests/test_period.py | 71 ++++++++++++++++++ .../views/sequence_views.xml | 12 +++ 10 files changed, 248 insertions(+) create mode 100644 sequence_reset_period/README.rst create mode 100644 sequence_reset_period/__init__.py create mode 100644 sequence_reset_period/__manifest__.py create mode 100644 sequence_reset_period/i18n/sequence_reset_period.pot create mode 100644 sequence_reset_period/models/__init__.py create mode 100644 sequence_reset_period/models/ir_sequence.py create mode 100644 sequence_reset_period/static/description/icon.png create mode 100644 sequence_reset_period/tests/__init__.py create mode 100644 sequence_reset_period/tests/test_period.py create mode 100644 sequence_reset_period/views/sequence_views.xml diff --git a/sequence_reset_period/README.rst b/sequence_reset_period/README.rst new file mode 100644 index 0000000000..ef1ba94f7a --- /dev/null +++ b/sequence_reset_period/README.rst @@ -0,0 +1,38 @@ +.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.png + :alt: License: LGPL-3 + +===================== +Sequence Reset period +===================== + +This module was written to reset the sequences on the specified times, because +by default they are reset yearly. + +Usage +===== + +* Access sequences and configurate the model to use. +* When sequence is computed, date_range will follow the specified rules + +Credits +======= + +Contributors +------------ + +* Enric Tobella + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +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. + +To contribute to this module, please visit https://odoo-community.org. diff --git a/sequence_reset_period/__init__.py b/sequence_reset_period/__init__.py new file mode 100644 index 0000000000..0650744f6b --- /dev/null +++ b/sequence_reset_period/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/sequence_reset_period/__manifest__.py b/sequence_reset_period/__manifest__.py new file mode 100644 index 0000000000..d8402ce0a8 --- /dev/null +++ b/sequence_reset_period/__manifest__.py @@ -0,0 +1,21 @@ +# Copyright (C) 2017 Creu Blanca +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). + +{ + "name": "Reset Sequences on selected period ranges", + "version": "11.0.1.0.0", + "category": "Reporting", + "website": "https://github.com/OCA/server-tools", + "author": "Creu Blanca, " + "Odoo Community Association (OCA)", + "license": "LGPL-3", + "installable": True, + "application": False, + "summary": "Adds a check digit on sequences", + "depends": [ + "base", + ], + "data": [ + "views/sequence_views.xml", + ], +} diff --git a/sequence_reset_period/i18n/sequence_reset_period.pot b/sequence_reset_period/i18n/sequence_reset_period.pot new file mode 100644 index 0000000000..e8a136c6e4 --- /dev/null +++ b/sequence_reset_period/i18n/sequence_reset_period.pot @@ -0,0 +1,45 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sequence_reset_period +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: sequence_reset_period +#: selection:ir.sequence,range_reset:0 +msgid "Daily" +msgstr "" + +#. module: sequence_reset_period +#: selection:ir.sequence,range_reset:0 +msgid "Monthly" +msgstr "" + +#. module: sequence_reset_period +#: model:ir.model.fields,field_description:sequence_reset_period.field_ir_sequence_range_reset +msgid "Range Reset" +msgstr "" + +#. module: sequence_reset_period +#: selection:ir.sequence,range_reset:0 +msgid "Weekly" +msgstr "" + +#. module: sequence_reset_period +#: selection:ir.sequence,range_reset:0 +msgid "Yearly" +msgstr "" + +#. module: sequence_reset_period +#: model:ir.model,name:sequence_reset_period.model_ir_sequence +msgid "ir.sequence" +msgstr "" + diff --git a/sequence_reset_period/models/__init__.py b/sequence_reset_period/models/__init__.py new file mode 100644 index 0000000000..5b015772ab --- /dev/null +++ b/sequence_reset_period/models/__init__.py @@ -0,0 +1 @@ +from . import ir_sequence diff --git a/sequence_reset_period/models/ir_sequence.py b/sequence_reset_period/models/ir_sequence.py new file mode 100644 index 0000000000..2e2aca7980 --- /dev/null +++ b/sequence_reset_period/models/ir_sequence.py @@ -0,0 +1,58 @@ +# Copyright (C) 2017 Creu Blanca +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). + +from odoo import fields, models +from datetime import datetime, timedelta, date as datetime_date +from dateutil.relativedelta import relativedelta + + +class IrSequence(models.Model): + _inherit = "ir.sequence" + + range_reset = fields.Selection([ + ('daily', 'Daily'), + ('weekly', 'Weekly'), + ('monthly', 'Monthly'), + ('yearly', 'Yearly') + ]) + + def _compute_date_from_to(self, date): + self.ensure_one() + date_from = date_to = fields.Date.from_string(date) + if self.range_reset == 'weekly': + date_from = date_from - timedelta(days=date_from.weekday()) + date_to = date_from + timedelta(days=6) + elif self.range_reset == 'monthly': + date_from = datetime_date(date_from.year, date_from.month, 1) + date_to = date_from + relativedelta(months=1) + date_to += relativedelta(days=-1) + elif self.range_reset == 'yearly': + date_from = datetime_date(date_from.year, 1, 1) + date_to = datetime_date(date_from.year, 12, 31) + return date_from.strftime('%Y-%m-%d'), date_to.strftime('%Y-%m-%d') + + def _create_date_range_seq(self, date): + self.ensure_one() + if not self.range_reset: + return super()._create_date_range_seq(date) + date_from, date_to = self._compute_date_from_to(date) + date_range = self.env['ir.sequence.date_range'].search( + [('sequence_id', '=', self.id), ('date_from', '>=', date), + ('date_from', '<=', date_to)], order='date_from desc', limit=1) + if date_range: + date_to = datetime.strptime(date_range.date_from, + '%Y-%m-%d') + timedelta(days=-1) + date_to = date_to.strftime('%Y-%m-%d') + date_range = self.env['ir.sequence.date_range'].search( + [('sequence_id', '=', self.id), ('date_to', '>=', date_from), + ('date_to', '<=', date)], order='date_to desc', limit=1) + if date_range: + date_from = datetime.strptime(date_range.date_to, + '%Y-%m-%d') + timedelta(days=1) + date_from = date_from.strftime('%Y-%m-%d') + seq_date_range = self.env['ir.sequence.date_range'].sudo().create({ + 'date_from': date_from, + 'date_to': date_to, + 'sequence_id': self.id, + }) + return seq_date_range diff --git a/sequence_reset_period/static/description/icon.png b/sequence_reset_period/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 zcmW++2RxMjAAjx~&dlBk9S+%}OXg)AGE&Cb*&}d0jUxM@u(PQx^-s)697TX`ehR4?GS^qbkof1cslKgkU)h65qZ9Oc=ml_0temigYLJfnz{IDzUf>bGs4N!v3=Z3jMq&A#7%rM5eQ#dc?k~! zVpnB`o+K7|Al`Q_U;eD$B zfJtP*jH`siUq~{KE)`jP2|#TUEFGRryE2`i0**z#*^6~AI|YzIWy$Cu#CSLW3q=GA z6`?GZymC;dCPk~rBS%eCb`5OLr;RUZ;D`}um=H)BfVIq%7VhiMr)_#G0N#zrNH|__ zc+blN2UAB0=617@>_u;MPHN;P;N#YoE=)R#i$k_`UAA>WWCcEVMh~L_ zj--gtp&|K1#58Yz*AHCTMziU1Jzt_jG0I@qAOHsk$2}yTmVkBp_eHuY$A9)>P6o~I z%aQ?!(GqeQ-Y+b0I(m9pwgi(IIZZzsbMv+9w{PFtd_<_(LA~0H(xz{=FhLB@(1&qHA5EJw1>>=%q2f&^X>IQ{!GJ4e9U z&KlB)z(84HmNgm2hg2C0>WM{E(DdPr+EeU_N@57;PC2&DmGFW_9kP&%?X4}+xWi)( z;)z%wI5>D4a*5XwD)P--sPkoY(a~WBw;E~AW`Yue4kFa^LM3X`8x|}ZUeMnqr}>kH zG%WWW>3ml$Yez?i%)2pbKPI7?5o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_kQsPz~fIUKym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{} zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 diff --git a/sequence_reset_period/tests/__init__.py b/sequence_reset_period/tests/__init__.py new file mode 100644 index 0000000000..6021908c4a --- /dev/null +++ b/sequence_reset_period/tests/__init__.py @@ -0,0 +1 @@ +from . import test_period diff --git a/sequence_reset_period/tests/test_period.py b/sequence_reset_period/tests/test_period.py new file mode 100644 index 0000000000..07cbce6ec2 --- /dev/null +++ b/sequence_reset_period/tests/test_period.py @@ -0,0 +1,71 @@ +# Copyright 2017 Creu Blanca +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). + + +from odoo.tests import common +from datetime import datetime + + +class TestSequence(common.TransactionCase): + def setUp(self): + super().setUp() + self.date = datetime(2018, 3, 14).strftime('%Y-%m-%d') + + def get_sequence(self, method): + return self.env['ir.sequence'].create({ + 'name': 'Test sequence', + 'implementation': 'standard', + 'use_date_range': True, + 'range_reset': method, + 'padding': '5' + }) + + def test_none(self): + sequence = self.get_sequence(False) + self.assertFalse(sequence.date_range_ids) + self.assertEqual('00001', sequence.with_context( + ir_sequence_date=self.date).next_by_id()) + range = sequence.date_range_ids + self.assertTrue(range) + self.assertEqual('2018-01-01', range.date_from) + self.assertEqual('2018-12-31', range.date_to) + + def test_daily(self): + sequence = self.get_sequence('daily') + self.assertFalse(sequence.date_range_ids) + self.assertEqual('00001', sequence.with_context( + ir_sequence_date=self.date).next_by_id()) + range = sequence.date_range_ids + self.assertTrue(range) + self.assertEqual(self.date, range.date_from) + self.assertEqual(self.date, range.date_to) + + def test_weekly(self): + sequence = self.get_sequence('weekly') + self.assertFalse(sequence.date_range_ids) + self.assertEqual('00001', sequence.with_context( + ir_sequence_date=self.date).next_by_id()) + range = sequence.date_range_ids + self.assertTrue(range) + self.assertEqual('2018-03-12', range.date_from) + self.assertEqual('2018-03-18', range.date_to) + + def test_monthly(self): + sequence = self.get_sequence('monthly') + self.assertFalse(sequence.date_range_ids) + self.assertEqual('00001', sequence.with_context( + ir_sequence_date=self.date).next_by_id()) + range = sequence.date_range_ids + self.assertTrue(range) + self.assertEqual('2018-03-01', range.date_from) + self.assertEqual('2018-03-31', range.date_to) + + def test_yearly(self): + sequence = self.get_sequence('yearly') + self.assertFalse(sequence.date_range_ids) + self.assertEqual('00001', sequence.with_context( + ir_sequence_date=self.date).next_by_id()) + range = sequence.date_range_ids + self.assertTrue(range) + self.assertEqual('2018-01-01', range.date_from) + self.assertEqual('2018-12-31', range.date_to) diff --git a/sequence_reset_period/views/sequence_views.xml b/sequence_reset_period/views/sequence_views.xml new file mode 100644 index 0000000000..e6313577dc --- /dev/null +++ b/sequence_reset_period/views/sequence_views.xml @@ -0,0 +1,12 @@ + + + + ir.sequence + + + + + + + + From 86f4a9fcdd9a99b562e8e9c0268d844b02387c5b Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Fri, 13 Jul 2018 08:37:35 +0000 Subject: [PATCH 02/25] =?UTF-8?q?Added=20translation=20using=20Weblate=20(?= =?UTF-8?q?Espa=C3=B1ol=20(Espa=C3=B1a))?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sequence_reset_period/i18n/es.po | 45 ++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 sequence_reset_period/i18n/es.po diff --git a/sequence_reset_period/i18n/es.po b/sequence_reset_period/i18n/es.po new file mode 100644 index 0000000000..c1bf326637 --- /dev/null +++ b/sequence_reset_period/i18n/es.po @@ -0,0 +1,45 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sequence_reset_period +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\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" + +#. module: sequence_reset_period +#: selection:ir.sequence,range_reset:0 +msgid "Daily" +msgstr "" + +#. module: sequence_reset_period +#: selection:ir.sequence,range_reset:0 +msgid "Monthly" +msgstr "" + +#. module: sequence_reset_period +#: model:ir.model.fields,field_description:sequence_reset_period.field_ir_sequence_range_reset +msgid "Range Reset" +msgstr "" + +#. module: sequence_reset_period +#: selection:ir.sequence,range_reset:0 +msgid "Weekly" +msgstr "" + +#. module: sequence_reset_period +#: selection:ir.sequence,range_reset:0 +msgid "Yearly" +msgstr "" + +#. module: sequence_reset_period +#: model:ir.model,name:sequence_reset_period.model_ir_sequence +msgid "ir.sequence" +msgstr "" From 2a9b66429bb428c2f8b127d29f9b4aa27b096671 Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Fri, 13 Jul 2018 08:45:34 +0000 Subject: [PATCH 03/25] =?UTF-8?q?Translated=20using=20Weblate=20(Espa?= =?UTF-8?q?=C3=B1ol=20(Espa=C3=B1a))?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 100,0% (6 of 6 strings) Translation: server-ux-11.0/server-ux-11.0-sequence_reset_period Translate-URL: https://translation.odoo-community.org/projects/server-ux-11-0/server-ux-11-0-sequence_reset_period/es/ --- sequence_reset_period/i18n/es.po | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/sequence_reset_period/i18n/es.po b/sequence_reset_period/i18n/es.po index c1bf326637..83d5e8302c 100644 --- a/sequence_reset_period/i18n/es.po +++ b/sequence_reset_period/i18n/es.po @@ -6,40 +6,42 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2018-07-13 08:46+0000\n" +"Last-Translator: Enric Tobella \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 3.0.1\n" #. module: sequence_reset_period #: selection:ir.sequence,range_reset:0 msgid "Daily" -msgstr "" +msgstr "Diario" #. module: sequence_reset_period #: selection:ir.sequence,range_reset:0 msgid "Monthly" -msgstr "" +msgstr "Mensual" #. module: sequence_reset_period #: model:ir.model.fields,field_description:sequence_reset_period.field_ir_sequence_range_reset msgid "Range Reset" -msgstr "" +msgstr "Reinicio del Rango" #. module: sequence_reset_period #: selection:ir.sequence,range_reset:0 msgid "Weekly" -msgstr "" +msgstr "Semanal" #. module: sequence_reset_period #: selection:ir.sequence,range_reset:0 msgid "Yearly" -msgstr "" +msgstr "Anual" #. module: sequence_reset_period #: model:ir.model,name:sequence_reset_period.model_ir_sequence msgid "ir.sequence" -msgstr "" +msgstr "ir.sequence" From b722575b1d94facd092daefbab71173d830bbea9 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Wed, 5 Dec 2018 15:59:13 +0100 Subject: [PATCH 04/25] sequence_reset_period: fix summary and website in manifest. --- sequence_reset_period/__manifest__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sequence_reset_period/__manifest__.py b/sequence_reset_period/__manifest__.py index d8402ce0a8..5f3e92718a 100644 --- a/sequence_reset_period/__manifest__.py +++ b/sequence_reset_period/__manifest__.py @@ -5,13 +5,14 @@ "name": "Reset Sequences on selected period ranges", "version": "11.0.1.0.0", "category": "Reporting", - "website": "https://github.com/OCA/server-tools", + "website": "https://github.com/OCA/server-ux", "author": "Creu Blanca, " "Odoo Community Association (OCA)", "license": "LGPL-3", "installable": True, "application": False, - "summary": "Adds a check digit on sequences", + "summary": "Auto-generate yearly/monthly/weekly/daily sequence " + "period ranges", "depends": [ "base", ], From 88348a0bdf74536cf9ec6a512c5ca2b19b9c53d6 Mon Sep 17 00:00:00 2001 From: Jaume Planas Date: Fri, 27 Sep 2019 11:51:09 +0200 Subject: [PATCH 05/25] [MIG] sequence_reset_period: Migration to 12.0 --- sequence_reset_period/README.rst | 63 ++- sequence_reset_period/__manifest__.py | 2 +- sequence_reset_period/i18n/es.po | 16 +- .../i18n/sequence_reset_period.pot | 14 +- sequence_reset_period/models/ir_sequence.py | 14 +- sequence_reset_period/readme/CONTRIBUTORS.rst | 2 + sequence_reset_period/readme/DESCRIPTION.rst | 2 + sequence_reset_period/readme/USAGE.rst | 2 + .../static/description/index.html | 429 ++++++++++++++++++ sequence_reset_period/tests/test_period.py | 59 ++- 10 files changed, 547 insertions(+), 56 deletions(-) create mode 100644 sequence_reset_period/readme/CONTRIBUTORS.rst create mode 100644 sequence_reset_period/readme/DESCRIPTION.rst create mode 100644 sequence_reset_period/readme/USAGE.rst create mode 100644 sequence_reset_period/static/description/index.html diff --git a/sequence_reset_period/README.rst b/sequence_reset_period/README.rst index ef1ba94f7a..e7c2b36124 100644 --- a/sequence_reset_period/README.rst +++ b/sequence_reset_period/README.rst @@ -1,38 +1,81 @@ -.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.png +========================================= +Reset Sequences on selected period ranges +========================================= + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :alt: License: LGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--ux-lightgray.png?logo=github + :target: https://github.com/OCA/server-ux/tree/12.0/sequence_reset_period + :alt: OCA/server-ux +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/server-ux-12-0/server-ux-12-0-sequence_reset_period + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/250/12.0 + :alt: Try me on Runbot -===================== -Sequence Reset period -===================== +|badge1| |badge2| |badge3| |badge4| |badge5| This module was written to reset the sequences on the specified times, because by default they are reset yearly. +**Table of contents** + +.. contents:: + :local: + Usage ===== * Access sequences and configurate the model to use. * When sequence is computed, date_range will follow the specified rules +Bug Tracker +=========== + +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. + Credits ======= +Authors +~~~~~~~ + +* Creu Blanca + Contributors ------------- +~~~~~~~~~~~~ * Enric Tobella +* Jaume Planas -Maintainer ----------- +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. .. image:: https://odoo-community.org/logo.png :alt: Odoo Community Association :target: https://odoo-community.org -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. -To contribute to this module, please visit https://odoo-community.org. +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. diff --git a/sequence_reset_period/__manifest__.py b/sequence_reset_period/__manifest__.py index 5f3e92718a..143a1c95ec 100644 --- a/sequence_reset_period/__manifest__.py +++ b/sequence_reset_period/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Reset Sequences on selected period ranges", - "version": "11.0.1.0.0", + "version": "12.0.1.0.0", "category": "Reporting", "website": "https://github.com/OCA/server-ux", "author": "Creu Blanca, " diff --git a/sequence_reset_period/i18n/es.po b/sequence_reset_period/i18n/es.po index 83d5e8302c..e4ad0ef448 100644 --- a/sequence_reset_period/i18n/es.po +++ b/sequence_reset_period/i18n/es.po @@ -1,6 +1,6 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * sequence_reset_period +# * sequence_reset_period # msgid "" msgstr "" @@ -27,10 +27,17 @@ msgid "Monthly" msgstr "Mensual" #. module: sequence_reset_period -#: model:ir.model.fields,field_description:sequence_reset_period.field_ir_sequence_range_reset +#: model:ir.model.fields,field_description:sequence_reset_period.field_ir_sequence__range_reset msgid "Range Reset" msgstr "Reinicio del Rango" +#. module: sequence_reset_period +#: model:ir.model,name:sequence_reset_period.model_ir_sequence +#, fuzzy +#| msgid "ir.sequence" +msgid "Sequence" +msgstr "ir.sequence" + #. module: sequence_reset_period #: selection:ir.sequence,range_reset:0 msgid "Weekly" @@ -40,8 +47,3 @@ msgstr "Semanal" #: selection:ir.sequence,range_reset:0 msgid "Yearly" msgstr "Anual" - -#. module: sequence_reset_period -#: model:ir.model,name:sequence_reset_period.model_ir_sequence -msgid "ir.sequence" -msgstr "ir.sequence" diff --git a/sequence_reset_period/i18n/sequence_reset_period.pot b/sequence_reset_period/i18n/sequence_reset_period.pot index e8a136c6e4..43604c0e32 100644 --- a/sequence_reset_period/i18n/sequence_reset_period.pot +++ b/sequence_reset_period/i18n/sequence_reset_period.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" +"Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: <>\n" "Language-Team: \n" @@ -24,22 +24,22 @@ msgid "Monthly" msgstr "" #. module: sequence_reset_period -#: model:ir.model.fields,field_description:sequence_reset_period.field_ir_sequence_range_reset +#: model:ir.model.fields,field_description:sequence_reset_period.field_ir_sequence__range_reset msgid "Range Reset" msgstr "" #. module: sequence_reset_period -#: selection:ir.sequence,range_reset:0 -msgid "Weekly" +#: model:ir.model,name:sequence_reset_period.model_ir_sequence +msgid "Sequence" msgstr "" #. module: sequence_reset_period #: selection:ir.sequence,range_reset:0 -msgid "Yearly" +msgid "Weekly" msgstr "" #. module: sequence_reset_period -#: model:ir.model,name:sequence_reset_period.model_ir_sequence -msgid "ir.sequence" +#: selection:ir.sequence,range_reset:0 +msgid "Yearly" msgstr "" diff --git a/sequence_reset_period/models/ir_sequence.py b/sequence_reset_period/models/ir_sequence.py index 2e2aca7980..2b5a29b211 100644 --- a/sequence_reset_period/models/ir_sequence.py +++ b/sequence_reset_period/models/ir_sequence.py @@ -2,7 +2,7 @@ # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). from odoo import fields, models -from datetime import datetime, timedelta, date as datetime_date +from datetime import timedelta, date as datetime_date from dateutil.relativedelta import relativedelta @@ -18,7 +18,7 @@ class IrSequence(models.Model): def _compute_date_from_to(self, date): self.ensure_one() - date_from = date_to = fields.Date.from_string(date) + date_from = date_to = date if self.range_reset == 'weekly': date_from = date_from - timedelta(days=date_from.weekday()) date_to = date_from + timedelta(days=6) @@ -29,7 +29,7 @@ def _compute_date_from_to(self, date): elif self.range_reset == 'yearly': date_from = datetime_date(date_from.year, 1, 1) date_to = datetime_date(date_from.year, 12, 31) - return date_from.strftime('%Y-%m-%d'), date_to.strftime('%Y-%m-%d') + return date_from, date_to def _create_date_range_seq(self, date): self.ensure_one() @@ -40,16 +40,12 @@ def _create_date_range_seq(self, date): [('sequence_id', '=', self.id), ('date_from', '>=', date), ('date_from', '<=', date_to)], order='date_from desc', limit=1) if date_range: - date_to = datetime.strptime(date_range.date_from, - '%Y-%m-%d') + timedelta(days=-1) - date_to = date_to.strftime('%Y-%m-%d') + date_to = date_range.date_from + timedelta(days=-1) date_range = self.env['ir.sequence.date_range'].search( [('sequence_id', '=', self.id), ('date_to', '>=', date_from), ('date_to', '<=', date)], order='date_to desc', limit=1) if date_range: - date_from = datetime.strptime(date_range.date_to, - '%Y-%m-%d') + timedelta(days=1) - date_from = date_from.strftime('%Y-%m-%d') + date_from = date_range.date_to + timedelta(days=1) seq_date_range = self.env['ir.sequence.date_range'].sudo().create({ 'date_from': date_from, 'date_to': date_to, diff --git a/sequence_reset_period/readme/CONTRIBUTORS.rst b/sequence_reset_period/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000000..b26e2823b7 --- /dev/null +++ b/sequence_reset_period/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Enric Tobella +* Jaume Planas diff --git a/sequence_reset_period/readme/DESCRIPTION.rst b/sequence_reset_period/readme/DESCRIPTION.rst new file mode 100644 index 0000000000..6a37fdbd10 --- /dev/null +++ b/sequence_reset_period/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module was written to reset the sequences on the specified times, because +by default they are reset yearly. diff --git a/sequence_reset_period/readme/USAGE.rst b/sequence_reset_period/readme/USAGE.rst new file mode 100644 index 0000000000..526779fada --- /dev/null +++ b/sequence_reset_period/readme/USAGE.rst @@ -0,0 +1,2 @@ +* Access sequences and configurate the model to use. +* When sequence is computed, date_range will follow the specified rules diff --git a/sequence_reset_period/static/description/index.html b/sequence_reset_period/static/description/index.html new file mode 100644 index 0000000000..825a39f3e1 --- /dev/null +++ b/sequence_reset_period/static/description/index.html @@ -0,0 +1,429 @@ + + + + + + +Reset Sequences on selected period ranges + + + +
+

Reset Sequences on selected period ranges

+ + +

Beta License: LGPL-3 OCA/server-ux Translate me on Weblate Try me on Runbot

+

This module was written to reset the sequences on the specified times, because +by default they are reset yearly.

+

Table of contents

+ +
+

Usage

+
    +
  • Access sequences and configurate the model to use.
  • +
  • When sequence is computed, date_range will follow the specified rules
  • +
+
+
+

Bug Tracker

+

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.

+
+
+

Credits

+
+

Authors

+
    +
  • Creu Blanca
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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.

+
+
+
+ + diff --git a/sequence_reset_period/tests/test_period.py b/sequence_reset_period/tests/test_period.py index 07cbce6ec2..44d9082991 100644 --- a/sequence_reset_period/tests/test_period.py +++ b/sequence_reset_period/tests/test_period.py @@ -3,13 +3,13 @@ from odoo.tests import common -from datetime import datetime +from datetime import date class TestSequence(common.TransactionCase): def setUp(self): super().setUp() - self.date = datetime(2018, 3, 14).strftime('%Y-%m-%d') + self.date = date(2018, 3, 14) def get_sequence(self, method): return self.env['ir.sequence'].create({ @@ -25,47 +25,62 @@ def test_none(self): self.assertFalse(sequence.date_range_ids) self.assertEqual('00001', sequence.with_context( ir_sequence_date=self.date).next_by_id()) - range = sequence.date_range_ids - self.assertTrue(range) - self.assertEqual('2018-01-01', range.date_from) - self.assertEqual('2018-12-31', range.date_to) + xrange = sequence.date_range_ids + self.assertTrue(xrange) + self.assertEqual(date(2018, 1, 1), xrange.date_from) + self.assertEqual(date(2018, 12, 31), xrange.date_to) def test_daily(self): sequence = self.get_sequence('daily') self.assertFalse(sequence.date_range_ids) self.assertEqual('00001', sequence.with_context( ir_sequence_date=self.date).next_by_id()) - range = sequence.date_range_ids - self.assertTrue(range) - self.assertEqual(self.date, range.date_from) - self.assertEqual(self.date, range.date_to) + xrange = sequence.date_range_ids + self.assertTrue(xrange) + self.assertEqual(self.date, xrange.date_from) + self.assertEqual(self.date, xrange.date_to) def test_weekly(self): sequence = self.get_sequence('weekly') self.assertFalse(sequence.date_range_ids) self.assertEqual('00001', sequence.with_context( ir_sequence_date=self.date).next_by_id()) - range = sequence.date_range_ids - self.assertTrue(range) - self.assertEqual('2018-03-12', range.date_from) - self.assertEqual('2018-03-18', range.date_to) + xrange = sequence.date_range_ids + self.assertTrue(xrange) + self.assertEqual(date(2018, 3, 12), xrange.date_from) + self.assertEqual(date(2018, 3, 18), xrange.date_to) def test_monthly(self): sequence = self.get_sequence('monthly') self.assertFalse(sequence.date_range_ids) self.assertEqual('00001', sequence.with_context( ir_sequence_date=self.date).next_by_id()) - range = sequence.date_range_ids - self.assertTrue(range) - self.assertEqual('2018-03-01', range.date_from) - self.assertEqual('2018-03-31', range.date_to) + xrange = sequence.date_range_ids + self.assertTrue(xrange) + self.assertEqual(date(2018, 3, 1), xrange.date_from) + self.assertEqual(date(2018, 3, 31), xrange.date_to) def test_yearly(self): sequence = self.get_sequence('yearly') self.assertFalse(sequence.date_range_ids) self.assertEqual('00001', sequence.with_context( ir_sequence_date=self.date).next_by_id()) - range = sequence.date_range_ids - self.assertTrue(range) - self.assertEqual('2018-01-01', range.date_from) - self.assertEqual('2018-12-31', range.date_to) + xrange = sequence.date_range_ids + self.assertTrue(xrange) + self.assertEqual(date(2018, 1, 1), xrange.date_from) + self.assertEqual(date(2018, 12, 31), xrange.date_to) + + def test_monthly_existing(self): + sequence = self.get_sequence('monthly') + self.env['ir.sequence.date_range'].create({ + 'date_from': date(2018, 3, 1), + 'date_to': date(2018, 3, 10), + 'sequence_id': sequence.id, + }) + self.env['ir.sequence.date_range'].create({ + 'date_from': date(2018, 3, 20), + 'date_to': date(2018, 3, 25), + 'sequence_id': sequence.id, + }) + self.assertEqual('00001', sequence.with_context( + ir_sequence_date=self.date).next_by_id()) From 9600a6b8974c37bab3de91318d51d55095cb43d3 Mon Sep 17 00:00:00 2001 From: Bole Date: Wed, 4 Dec 2019 09:14:11 +0000 Subject: [PATCH 06/25] Added translation using Weblate (Croatian) --- sequence_reset_period/i18n/hr.po | 46 ++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 sequence_reset_period/i18n/hr.po diff --git a/sequence_reset_period/i18n/hr.po b/sequence_reset_period/i18n/hr.po new file mode 100644 index 0000000000..a48fb95ff3 --- /dev/null +++ b/sequence_reset_period/i18n/hr.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sequence_reset_period +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: hr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=" +"4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. module: sequence_reset_period +#: selection:ir.sequence,range_reset:0 +msgid "Daily" +msgstr "" + +#. module: sequence_reset_period +#: selection:ir.sequence,range_reset:0 +msgid "Monthly" +msgstr "" + +#. module: sequence_reset_period +#: model:ir.model.fields,field_description:sequence_reset_period.field_ir_sequence__range_reset +msgid "Range Reset" +msgstr "" + +#. module: sequence_reset_period +#: model:ir.model,name:sequence_reset_period.model_ir_sequence +msgid "Sequence" +msgstr "" + +#. module: sequence_reset_period +#: selection:ir.sequence,range_reset:0 +msgid "Weekly" +msgstr "" + +#. module: sequence_reset_period +#: selection:ir.sequence,range_reset:0 +msgid "Yearly" +msgstr "" From 043b7b5aa2eb6e9bac8cac2e4fbe1e5fbae66a21 Mon Sep 17 00:00:00 2001 From: Bole Date: Wed, 4 Dec 2019 09:14:19 +0000 Subject: [PATCH 07/25] Translated using Weblate (Croatian) Currently translated at 100.0% (6 of 6 strings) Translation: server-ux-12.0/server-ux-12.0-sequence_reset_period Translate-URL: https://translation.odoo-community.org/projects/server-ux-12-0/server-ux-12-0-sequence_reset_period/hr/ --- sequence_reset_period/i18n/hr.po | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/sequence_reset_period/i18n/hr.po b/sequence_reset_period/i18n/hr.po index a48fb95ff3..a0f3e58f11 100644 --- a/sequence_reset_period/i18n/hr.po +++ b/sequence_reset_period/i18n/hr.po @@ -6,7 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2019-12-04 12:04+0000\n" +"Last-Translator: Bole \n" "Language-Team: none\n" "Language: hr\n" "MIME-Version: 1.0\n" @@ -14,33 +15,34 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=" "4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 3.9.1\n" #. module: sequence_reset_period #: selection:ir.sequence,range_reset:0 msgid "Daily" -msgstr "" +msgstr "Dnevno" #. module: sequence_reset_period #: selection:ir.sequence,range_reset:0 msgid "Monthly" -msgstr "" +msgstr "Mjesečno" #. module: sequence_reset_period #: model:ir.model.fields,field_description:sequence_reset_period.field_ir_sequence__range_reset msgid "Range Reset" -msgstr "" +msgstr "Reset raspona" #. module: sequence_reset_period #: model:ir.model,name:sequence_reset_period.model_ir_sequence msgid "Sequence" -msgstr "" +msgstr "Sekvenca" #. module: sequence_reset_period #: selection:ir.sequence,range_reset:0 msgid "Weekly" -msgstr "" +msgstr "Tjedno" #. module: sequence_reset_period #: selection:ir.sequence,range_reset:0 msgid "Yearly" -msgstr "" +msgstr "Godišnje" From 0458d41951df62465aff2f38efe6584f50530ee6 Mon Sep 17 00:00:00 2001 From: ps-tubtim Date: Wed, 2 Sep 2020 09:59:01 +0700 Subject: [PATCH 08/25] [IMP] sequence_reset_period: black, isort, prettier --- sequence_reset_period/__manifest__.py | 16 ++-- sequence_reset_period/models/ir_sequence.py | 62 +++++++++----- sequence_reset_period/tests/test_period.py | 83 +++++++++++-------- .../views/sequence_views.xml | 13 +-- 4 files changed, 101 insertions(+), 73 deletions(-) diff --git a/sequence_reset_period/__manifest__.py b/sequence_reset_period/__manifest__.py index 143a1c95ec..bd466529a6 100644 --- a/sequence_reset_period/__manifest__.py +++ b/sequence_reset_period/__manifest__.py @@ -3,20 +3,14 @@ { "name": "Reset Sequences on selected period ranges", - "version": "12.0.1.0.0", + "version": "13.0.1.0.0", "category": "Reporting", "website": "https://github.com/OCA/server-ux", - "author": "Creu Blanca, " - "Odoo Community Association (OCA)", + "author": "Creu Blanca, Odoo Community Association (OCA)", "license": "LGPL-3", "installable": True, "application": False, - "summary": "Auto-generate yearly/monthly/weekly/daily sequence " - "period ranges", - "depends": [ - "base", - ], - "data": [ - "views/sequence_views.xml", - ], + "summary": "Auto-generate yearly/monthly/weekly/daily sequence period ranges", + "depends": ["base"], + "data": ["views/sequence_views.xml"], } diff --git a/sequence_reset_period/models/ir_sequence.py b/sequence_reset_period/models/ir_sequence.py index 2b5a29b211..53b09a2c25 100644 --- a/sequence_reset_period/models/ir_sequence.py +++ b/sequence_reset_period/models/ir_sequence.py @@ -1,32 +1,36 @@ # Copyright (C) 2017 Creu Blanca # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). -from odoo import fields, models -from datetime import timedelta, date as datetime_date +from datetime import date as datetime_date, timedelta + from dateutil.relativedelta import relativedelta +from odoo import fields, models + class IrSequence(models.Model): _inherit = "ir.sequence" - range_reset = fields.Selection([ - ('daily', 'Daily'), - ('weekly', 'Weekly'), - ('monthly', 'Monthly'), - ('yearly', 'Yearly') - ]) + range_reset = fields.Selection( + [ + ("daily", "Daily"), + ("weekly", "Weekly"), + ("monthly", "Monthly"), + ("yearly", "Yearly"), + ] + ) def _compute_date_from_to(self, date): self.ensure_one() date_from = date_to = date - if self.range_reset == 'weekly': + if self.range_reset == "weekly": date_from = date_from - timedelta(days=date_from.weekday()) date_to = date_from + timedelta(days=6) - elif self.range_reset == 'monthly': + elif self.range_reset == "monthly": date_from = datetime_date(date_from.year, date_from.month, 1) date_to = date_from + relativedelta(months=1) date_to += relativedelta(days=-1) - elif self.range_reset == 'yearly': + elif self.range_reset == "yearly": date_from = datetime_date(date_from.year, 1, 1) date_to = datetime_date(date_from.year, 12, 31) return date_from, date_to @@ -36,19 +40,33 @@ def _create_date_range_seq(self, date): if not self.range_reset: return super()._create_date_range_seq(date) date_from, date_to = self._compute_date_from_to(date) - date_range = self.env['ir.sequence.date_range'].search( - [('sequence_id', '=', self.id), ('date_from', '>=', date), - ('date_from', '<=', date_to)], order='date_from desc', limit=1) + date_range = self.env["ir.sequence.date_range"].search( + [ + ("sequence_id", "=", self.id), + ("date_from", ">=", date), + ("date_from", "<=", date_to), + ], + order="date_from desc", + limit=1, + ) if date_range: date_to = date_range.date_from + timedelta(days=-1) - date_range = self.env['ir.sequence.date_range'].search( - [('sequence_id', '=', self.id), ('date_to', '>=', date_from), - ('date_to', '<=', date)], order='date_to desc', limit=1) + date_range = self.env["ir.sequence.date_range"].search( + [ + ("sequence_id", "=", self.id), + ("date_to", ">=", date_from), + ("date_to", "<=", date), + ], + order="date_to desc", + limit=1, + ) if date_range: date_from = date_range.date_to + timedelta(days=1) - seq_date_range = self.env['ir.sequence.date_range'].sudo().create({ - 'date_from': date_from, - 'date_to': date_to, - 'sequence_id': self.id, - }) + seq_date_range = ( + self.env["ir.sequence.date_range"] + .sudo() + .create( + {"date_from": date_from, "date_to": date_to, "sequence_id": self.id} + ) + ) return seq_date_range diff --git a/sequence_reset_period/tests/test_period.py b/sequence_reset_period/tests/test_period.py index 44d9082991..fbf72e57c5 100644 --- a/sequence_reset_period/tests/test_period.py +++ b/sequence_reset_period/tests/test_period.py @@ -2,9 +2,10 @@ # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). -from odoo.tests import common from datetime import date +from odoo.tests import common + class TestSequence(common.TransactionCase): def setUp(self): @@ -12,75 +13,87 @@ def setUp(self): self.date = date(2018, 3, 14) def get_sequence(self, method): - return self.env['ir.sequence'].create({ - 'name': 'Test sequence', - 'implementation': 'standard', - 'use_date_range': True, - 'range_reset': method, - 'padding': '5' - }) + return self.env["ir.sequence"].create( + { + "name": "Test sequence", + "implementation": "standard", + "use_date_range": True, + "range_reset": method, + "padding": "5", + } + ) def test_none(self): sequence = self.get_sequence(False) self.assertFalse(sequence.date_range_ids) - self.assertEqual('00001', sequence.with_context( - ir_sequence_date=self.date).next_by_id()) + self.assertEqual( + "00001", sequence.with_context(ir_sequence_date=self.date).next_by_id() + ) xrange = sequence.date_range_ids self.assertTrue(xrange) self.assertEqual(date(2018, 1, 1), xrange.date_from) self.assertEqual(date(2018, 12, 31), xrange.date_to) def test_daily(self): - sequence = self.get_sequence('daily') + sequence = self.get_sequence("daily") self.assertFalse(sequence.date_range_ids) - self.assertEqual('00001', sequence.with_context( - ir_sequence_date=self.date).next_by_id()) + self.assertEqual( + "00001", sequence.with_context(ir_sequence_date=self.date).next_by_id() + ) xrange = sequence.date_range_ids self.assertTrue(xrange) self.assertEqual(self.date, xrange.date_from) self.assertEqual(self.date, xrange.date_to) def test_weekly(self): - sequence = self.get_sequence('weekly') + sequence = self.get_sequence("weekly") self.assertFalse(sequence.date_range_ids) - self.assertEqual('00001', sequence.with_context( - ir_sequence_date=self.date).next_by_id()) + self.assertEqual( + "00001", sequence.with_context(ir_sequence_date=self.date).next_by_id() + ) xrange = sequence.date_range_ids self.assertTrue(xrange) self.assertEqual(date(2018, 3, 12), xrange.date_from) self.assertEqual(date(2018, 3, 18), xrange.date_to) def test_monthly(self): - sequence = self.get_sequence('monthly') + sequence = self.get_sequence("monthly") self.assertFalse(sequence.date_range_ids) - self.assertEqual('00001', sequence.with_context( - ir_sequence_date=self.date).next_by_id()) + self.assertEqual( + "00001", sequence.with_context(ir_sequence_date=self.date).next_by_id() + ) xrange = sequence.date_range_ids self.assertTrue(xrange) self.assertEqual(date(2018, 3, 1), xrange.date_from) self.assertEqual(date(2018, 3, 31), xrange.date_to) def test_yearly(self): - sequence = self.get_sequence('yearly') + sequence = self.get_sequence("yearly") self.assertFalse(sequence.date_range_ids) - self.assertEqual('00001', sequence.with_context( - ir_sequence_date=self.date).next_by_id()) + self.assertEqual( + "00001", sequence.with_context(ir_sequence_date=self.date).next_by_id() + ) xrange = sequence.date_range_ids self.assertTrue(xrange) self.assertEqual(date(2018, 1, 1), xrange.date_from) self.assertEqual(date(2018, 12, 31), xrange.date_to) def test_monthly_existing(self): - sequence = self.get_sequence('monthly') - self.env['ir.sequence.date_range'].create({ - 'date_from': date(2018, 3, 1), - 'date_to': date(2018, 3, 10), - 'sequence_id': sequence.id, - }) - self.env['ir.sequence.date_range'].create({ - 'date_from': date(2018, 3, 20), - 'date_to': date(2018, 3, 25), - 'sequence_id': sequence.id, - }) - self.assertEqual('00001', sequence.with_context( - ir_sequence_date=self.date).next_by_id()) + sequence = self.get_sequence("monthly") + self.env["ir.sequence.date_range"].create( + { + "date_from": date(2018, 3, 1), + "date_to": date(2018, 3, 10), + "sequence_id": sequence.id, + } + ) + self.env["ir.sequence.date_range"].create( + { + "date_from": date(2018, 3, 20), + "date_to": date(2018, 3, 25), + "sequence_id": sequence.id, + } + ) + self.assertEqual( + "00001", sequence.with_context(ir_sequence_date=self.date).next_by_id() + ) diff --git a/sequence_reset_period/views/sequence_views.xml b/sequence_reset_period/views/sequence_views.xml index e6313577dc..089d0f81ba 100644 --- a/sequence_reset_period/views/sequence_views.xml +++ b/sequence_reset_period/views/sequence_views.xml @@ -1,12 +1,15 @@ - + - + ir.sequence - + - + - + From ca2646137f5a2fcfd145dec607382ef16cc07111 Mon Sep 17 00:00:00 2001 From: ps-tubtim Date: Wed, 2 Sep 2020 10:15:20 +0700 Subject: [PATCH 09/25] [MIG] sequence_reset_period: Migration to 13.0 --- sequence_reset_period/README.rst | 11 ++++++----- sequence_reset_period/readme/CONTRIBUTORS.rst | 1 + sequence_reset_period/static/description/index.html | 7 ++++--- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/sequence_reset_period/README.rst b/sequence_reset_period/README.rst index e7c2b36124..55dfb72839 100644 --- a/sequence_reset_period/README.rst +++ b/sequence_reset_period/README.rst @@ -14,13 +14,13 @@ Reset Sequences on selected period ranges :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :alt: License: LGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--ux-lightgray.png?logo=github - :target: https://github.com/OCA/server-ux/tree/12.0/sequence_reset_period + :target: https://github.com/OCA/server-ux/tree/13.0/sequence_reset_period :alt: OCA/server-ux .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/server-ux-12-0/server-ux-12-0-sequence_reset_period + :target: https://translation.odoo-community.org/projects/server-ux-13-0/server-ux-13-0-sequence_reset_period :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/250/12.0 + :target: https://runbot.odoo-community.org/runbot/250/13.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -45,7 +45,7 @@ Bug Tracker 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -62,6 +62,7 @@ Contributors * Enric Tobella * Jaume Planas +* Pimolnat Suntian Maintainers ~~~~~~~~~~~ @@ -76,6 +77,6 @@ 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. +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. diff --git a/sequence_reset_period/readme/CONTRIBUTORS.rst b/sequence_reset_period/readme/CONTRIBUTORS.rst index b26e2823b7..a3f99f8f91 100644 --- a/sequence_reset_period/readme/CONTRIBUTORS.rst +++ b/sequence_reset_period/readme/CONTRIBUTORS.rst @@ -1,2 +1,3 @@ * Enric Tobella * Jaume Planas +* Pimolnat Suntian diff --git a/sequence_reset_period/static/description/index.html b/sequence_reset_period/static/description/index.html index 825a39f3e1..c46a866315 100644 --- a/sequence_reset_period/static/description/index.html +++ b/sequence_reset_period/static/description/index.html @@ -367,7 +367,7 @@

Reset Sequences on selected period ranges

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: LGPL-3 OCA/server-ux Translate me on Weblate Try me on Runbot

+

Beta License: LGPL-3 OCA/server-ux Translate me on Weblate Try me on Runbot

This module was written to reset the sequences on the specified times, because by default they are reset yearly.

Table of contents

@@ -395,7 +395,7 @@

Bug Tracker

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.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -411,6 +411,7 @@

Contributors

@@ -420,7 +421,7 @@

Maintainers

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.

+

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.

From 522c79a931207f3f4e64448a822e240f66d05c73 Mon Sep 17 00:00:00 2001 From: oca-travis Date: Tue, 7 Jul 2020 06:31:17 +0000 Subject: [PATCH 10/25] [UPD] Update sequence_reset_period.pot --- sequence_reset_period/i18n/es.po | 8 ++++---- sequence_reset_period/i18n/hr.po | 14 +++++++------- .../i18n/sequence_reset_period.pot | 15 +++++++-------- 3 files changed, 18 insertions(+), 19 deletions(-) diff --git a/sequence_reset_period/i18n/es.po b/sequence_reset_period/i18n/es.po index e4ad0ef448..9053245dbd 100644 --- a/sequence_reset_period/i18n/es.po +++ b/sequence_reset_period/i18n/es.po @@ -17,12 +17,12 @@ msgstr "" "X-Generator: Weblate 3.0.1\n" #. module: sequence_reset_period -#: selection:ir.sequence,range_reset:0 +#: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__daily msgid "Daily" msgstr "Diario" #. module: sequence_reset_period -#: selection:ir.sequence,range_reset:0 +#: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__monthly msgid "Monthly" msgstr "Mensual" @@ -39,11 +39,11 @@ msgid "Sequence" msgstr "ir.sequence" #. module: sequence_reset_period -#: selection:ir.sequence,range_reset:0 +#: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__weekly msgid "Weekly" msgstr "Semanal" #. module: sequence_reset_period -#: selection:ir.sequence,range_reset:0 +#: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__yearly msgid "Yearly" msgstr "Anual" diff --git a/sequence_reset_period/i18n/hr.po b/sequence_reset_period/i18n/hr.po index a0f3e58f11..c356261f83 100644 --- a/sequence_reset_period/i18n/hr.po +++ b/sequence_reset_period/i18n/hr.po @@ -1,6 +1,6 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * sequence_reset_period +# * sequence_reset_period # msgid "" msgstr "" @@ -13,17 +13,17 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=" -"4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 3.9.1\n" #. module: sequence_reset_period -#: selection:ir.sequence,range_reset:0 +#: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__daily msgid "Daily" msgstr "Dnevno" #. module: sequence_reset_period -#: selection:ir.sequence,range_reset:0 +#: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__monthly msgid "Monthly" msgstr "Mjesečno" @@ -38,11 +38,11 @@ msgid "Sequence" msgstr "Sekvenca" #. module: sequence_reset_period -#: selection:ir.sequence,range_reset:0 +#: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__weekly msgid "Weekly" msgstr "Tjedno" #. module: sequence_reset_period -#: selection:ir.sequence,range_reset:0 +#: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__yearly msgid "Yearly" msgstr "Godišnje" diff --git a/sequence_reset_period/i18n/sequence_reset_period.pot b/sequence_reset_period/i18n/sequence_reset_period.pot index 43604c0e32..72c85f8650 100644 --- a/sequence_reset_period/i18n/sequence_reset_period.pot +++ b/sequence_reset_period/i18n/sequence_reset_period.pot @@ -1,12 +1,12 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * sequence_reset_period +# * sequence_reset_period # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" +"Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: <>\n" +"Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -14,12 +14,12 @@ msgstr "" "Plural-Forms: \n" #. module: sequence_reset_period -#: selection:ir.sequence,range_reset:0 +#: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__daily msgid "Daily" msgstr "" #. module: sequence_reset_period -#: selection:ir.sequence,range_reset:0 +#: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__monthly msgid "Monthly" msgstr "" @@ -34,12 +34,11 @@ msgid "Sequence" msgstr "" #. module: sequence_reset_period -#: selection:ir.sequence,range_reset:0 +#: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__weekly msgid "Weekly" msgstr "" #. module: sequence_reset_period -#: selection:ir.sequence,range_reset:0 +#: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__yearly msgid "Yearly" msgstr "" - From 0a320b0c99d43e911ac4390c26019a0698e09fd1 Mon Sep 17 00:00:00 2001 From: Dong Date: Sun, 16 Aug 2020 11:22:17 +0000 Subject: [PATCH 11/25] Added translation using Weblate (Chinese (Simplified)) --- sequence_reset_period/i18n/zh_CN.po | 45 +++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 sequence_reset_period/i18n/zh_CN.po diff --git a/sequence_reset_period/i18n/zh_CN.po b/sequence_reset_period/i18n/zh_CN.po new file mode 100644 index 0000000000..1ae58ade81 --- /dev/null +++ b/sequence_reset_period/i18n/zh_CN.po @@ -0,0 +1,45 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sequence_reset_period +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. module: sequence_reset_period +#: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__daily +msgid "Daily" +msgstr "" + +#. module: sequence_reset_period +#: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__monthly +msgid "Monthly" +msgstr "" + +#. module: sequence_reset_period +#: model:ir.model.fields,field_description:sequence_reset_period.field_ir_sequence__range_reset +msgid "Range Reset" +msgstr "" + +#. module: sequence_reset_period +#: model:ir.model,name:sequence_reset_period.model_ir_sequence +msgid "Sequence" +msgstr "" + +#. module: sequence_reset_period +#: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__weekly +msgid "Weekly" +msgstr "" + +#. module: sequence_reset_period +#: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__yearly +msgid "Yearly" +msgstr "" From 321dea86ad79c2d4257ed906dc3e9c2364e87c68 Mon Sep 17 00:00:00 2001 From: Dong Date: Sun, 16 Aug 2020 11:22:41 +0000 Subject: [PATCH 12/25] Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (6 of 6 strings) Translation: server-ux-13.0/server-ux-13.0-sequence_reset_period Translate-URL: https://translation.odoo-community.org/projects/server-ux-13-0/server-ux-13-0-sequence_reset_period/zh_CN/ --- sequence_reset_period/i18n/zh_CN.po | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/sequence_reset_period/i18n/zh_CN.po b/sequence_reset_period/i18n/zh_CN.po index 1ae58ade81..3741f93612 100644 --- a/sequence_reset_period/i18n/zh_CN.po +++ b/sequence_reset_period/i18n/zh_CN.po @@ -6,40 +6,42 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2020-08-16 11:29+0000\n" +"Last-Translator: Dong \n" "Language-Team: none\n" "Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Weblate 3.10\n" #. module: sequence_reset_period #: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__daily msgid "Daily" -msgstr "" +msgstr "每天" #. module: sequence_reset_period #: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__monthly msgid "Monthly" -msgstr "" +msgstr "每月" #. module: sequence_reset_period #: model:ir.model.fields,field_description:sequence_reset_period.field_ir_sequence__range_reset msgid "Range Reset" -msgstr "" +msgstr "重置周期" #. module: sequence_reset_period #: model:ir.model,name:sequence_reset_period.model_ir_sequence msgid "Sequence" -msgstr "" +msgstr "序列号" #. module: sequence_reset_period #: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__weekly msgid "Weekly" -msgstr "" +msgstr "每周" #. module: sequence_reset_period #: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__yearly msgid "Yearly" -msgstr "" +msgstr "每年" From 6bfed045deef33f8deabaae16eef0d25126f93f0 Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Sun, 16 Aug 2020 11:39:23 +0000 Subject: [PATCH 13/25] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: server-ux-13.0/server-ux-13.0-sequence_reset_period Translate-URL: https://translation.odoo-community.org/projects/server-ux-13-0/server-ux-13-0-sequence_reset_period/ --- sequence_reset_period/i18n/es.po | 1 - 1 file changed, 1 deletion(-) diff --git a/sequence_reset_period/i18n/es.po b/sequence_reset_period/i18n/es.po index 9053245dbd..2b9ff4aa6f 100644 --- a/sequence_reset_period/i18n/es.po +++ b/sequence_reset_period/i18n/es.po @@ -34,7 +34,6 @@ msgstr "Reinicio del Rango" #. module: sequence_reset_period #: model:ir.model,name:sequence_reset_period.model_ir_sequence #, fuzzy -#| msgid "ir.sequence" msgid "Sequence" msgstr "ir.sequence" From d905f36d586d2b007fe27e25fbc313f37b03babd Mon Sep 17 00:00:00 2001 From: schhatbar Date: Thu, 4 Mar 2021 14:51:09 +0530 Subject: [PATCH 14/25] [IMP] sequence_reset_period: black, isort, prettier --- sequence_reset_period/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sequence_reset_period/__manifest__.py b/sequence_reset_period/__manifest__.py index bd466529a6..d08108b3cb 100644 --- a/sequence_reset_period/__manifest__.py +++ b/sequence_reset_period/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Reset Sequences on selected period ranges", - "version": "13.0.1.0.0", + "version": "14.0.1.0.0", "category": "Reporting", "website": "https://github.com/OCA/server-ux", "author": "Creu Blanca, Odoo Community Association (OCA)", From fb7a2d9e835d717b6ce761265bf5e3c704b25260 Mon Sep 17 00:00:00 2001 From: schhatbar Date: Thu, 4 Mar 2021 14:56:28 +0530 Subject: [PATCH 15/25] [14.0][MIG]sequence_reset_period --- sequence_reset_period/README.rst | 11 ++++++----- .../i18n/sequence_reset_period.pot | 17 ++++++++++++++++- sequence_reset_period/readme/CONTRIBUTORS.rst | 1 + .../static/description/index.html | 7 ++++--- 4 files changed, 27 insertions(+), 9 deletions(-) diff --git a/sequence_reset_period/README.rst b/sequence_reset_period/README.rst index 55dfb72839..a77a790b95 100644 --- a/sequence_reset_period/README.rst +++ b/sequence_reset_period/README.rst @@ -14,13 +14,13 @@ Reset Sequences on selected period ranges :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :alt: License: LGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--ux-lightgray.png?logo=github - :target: https://github.com/OCA/server-ux/tree/13.0/sequence_reset_period + :target: https://github.com/OCA/server-ux/tree/14.0/sequence_reset_period :alt: OCA/server-ux .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/server-ux-13-0/server-ux-13-0-sequence_reset_period + :target: https://translation.odoo-community.org/projects/server-ux-14-0/server-ux-14-0-sequence_reset_period :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/250/13.0 + :target: https://runbot.odoo-community.org/runbot/250/14.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -45,7 +45,7 @@ Bug Tracker 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -63,6 +63,7 @@ Contributors * Enric Tobella * Jaume Planas * Pimolnat Suntian +* Sunanda Chhatbar Maintainers ~~~~~~~~~~~ @@ -77,6 +78,6 @@ 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. +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. diff --git a/sequence_reset_period/i18n/sequence_reset_period.pot b/sequence_reset_period/i18n/sequence_reset_period.pot index 72c85f8650..6fb449a571 100644 --- a/sequence_reset_period/i18n/sequence_reset_period.pot +++ b/sequence_reset_period/i18n/sequence_reset_period.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 13.0\n" +"Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -18,6 +18,21 @@ msgstr "" msgid "Daily" msgstr "" +#. module: sequence_reset_period +#: model:ir.model.fields,field_description:sequence_reset_period.field_ir_sequence__display_name +msgid "Display Name" +msgstr "" + +#. module: sequence_reset_period +#: model:ir.model.fields,field_description:sequence_reset_period.field_ir_sequence__id +msgid "ID" +msgstr "" + +#. module: sequence_reset_period +#: model:ir.model.fields,field_description:sequence_reset_period.field_ir_sequence____last_update +msgid "Last Modified on" +msgstr "" + #. module: sequence_reset_period #: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__monthly msgid "Monthly" diff --git a/sequence_reset_period/readme/CONTRIBUTORS.rst b/sequence_reset_period/readme/CONTRIBUTORS.rst index a3f99f8f91..3964543b85 100644 --- a/sequence_reset_period/readme/CONTRIBUTORS.rst +++ b/sequence_reset_period/readme/CONTRIBUTORS.rst @@ -1,3 +1,4 @@ * Enric Tobella * Jaume Planas * Pimolnat Suntian +* Sunanda Chhatbar diff --git a/sequence_reset_period/static/description/index.html b/sequence_reset_period/static/description/index.html index c46a866315..d1353f65b6 100644 --- a/sequence_reset_period/static/description/index.html +++ b/sequence_reset_period/static/description/index.html @@ -367,7 +367,7 @@

Reset Sequences on selected period ranges

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: LGPL-3 OCA/server-ux Translate me on Weblate Try me on Runbot

+

Beta License: LGPL-3 OCA/server-ux Translate me on Weblate Try me on Runbot

This module was written to reset the sequences on the specified times, because by default they are reset yearly.

Table of contents

@@ -395,7 +395,7 @@

Bug Tracker

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.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -412,6 +412,7 @@

Contributors

  • Enric Tobella <etobella@creublanca.es>
  • Jaume Planas <jaume.planas@minorisa.net>
  • Pimolnat Suntian <pimolnats@ecosoft.co.th>
  • +
  • Sunanda Chhatbar <sunanda.chhatbar@initos.com>
  • @@ -421,7 +422,7 @@

    Maintainers

    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.

    +

    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.

    From 95f3c9983a5ca35e712fc2fcc73f22cb7bd701cd Mon Sep 17 00:00:00 2001 From: Yves Le Doeuff Date: Sun, 11 Apr 2021 15:59:02 +0000 Subject: [PATCH 16/25] Added translation using Weblate (French (France)) --- sequence_reset_period/i18n/fr_FR.po | 60 +++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 sequence_reset_period/i18n/fr_FR.po diff --git a/sequence_reset_period/i18n/fr_FR.po b/sequence_reset_period/i18n/fr_FR.po new file mode 100644 index 0000000000..9121116cc3 --- /dev/null +++ b/sequence_reset_period/i18n/fr_FR.po @@ -0,0 +1,60 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sequence_reset_period +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: fr_FR\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" + +#. module: sequence_reset_period +#: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__daily +msgid "Daily" +msgstr "" + +#. module: sequence_reset_period +#: model:ir.model.fields,field_description:sequence_reset_period.field_ir_sequence__display_name +msgid "Display Name" +msgstr "" + +#. module: sequence_reset_period +#: model:ir.model.fields,field_description:sequence_reset_period.field_ir_sequence__id +msgid "ID" +msgstr "" + +#. module: sequence_reset_period +#: model:ir.model.fields,field_description:sequence_reset_period.field_ir_sequence____last_update +msgid "Last Modified on" +msgstr "" + +#. module: sequence_reset_period +#: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__monthly +msgid "Monthly" +msgstr "" + +#. module: sequence_reset_period +#: model:ir.model.fields,field_description:sequence_reset_period.field_ir_sequence__range_reset +msgid "Range Reset" +msgstr "" + +#. module: sequence_reset_period +#: model:ir.model,name:sequence_reset_period.model_ir_sequence +msgid "Sequence" +msgstr "" + +#. module: sequence_reset_period +#: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__weekly +msgid "Weekly" +msgstr "" + +#. module: sequence_reset_period +#: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__yearly +msgid "Yearly" +msgstr "" From 896e1dbede6cd47f684482740e18f2db369d07c4 Mon Sep 17 00:00:00 2001 From: Yves Le Doeuff Date: Sun, 11 Apr 2021 15:59:17 +0000 Subject: [PATCH 17/25] Translated using Weblate (French (France)) Currently translated at 77.7% (7 of 9 strings) Translation: server-ux-14.0/server-ux-14.0-sequence_reset_period Translate-URL: https://translation.odoo-community.org/projects/server-ux-14-0/server-ux-14-0-sequence_reset_period/fr_FR/ --- sequence_reset_period/i18n/fr_FR.po | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/sequence_reset_period/i18n/fr_FR.po b/sequence_reset_period/i18n/fr_FR.po index 9121116cc3..33a1f94309 100644 --- a/sequence_reset_period/i18n/fr_FR.po +++ b/sequence_reset_period/i18n/fr_FR.po @@ -6,23 +6,25 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2021-04-11 18:46+0000\n" +"Last-Translator: Yves Le Doeuff \n" "Language-Team: none\n" "Language: fr_FR\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.3.2\n" #. module: sequence_reset_period #: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__daily msgid "Daily" -msgstr "" +msgstr "Journalier" #. module: sequence_reset_period #: model:ir.model.fields,field_description:sequence_reset_period.field_ir_sequence__display_name msgid "Display Name" -msgstr "" +msgstr "Nom affiché" #. module: sequence_reset_period #: model:ir.model.fields,field_description:sequence_reset_period.field_ir_sequence__id @@ -32,17 +34,17 @@ msgstr "" #. module: sequence_reset_period #: model:ir.model.fields,field_description:sequence_reset_period.field_ir_sequence____last_update msgid "Last Modified on" -msgstr "" +msgstr "Dernière modification le" #. module: sequence_reset_period #: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__monthly msgid "Monthly" -msgstr "" +msgstr "Mensuel" #. module: sequence_reset_period #: model:ir.model.fields,field_description:sequence_reset_period.field_ir_sequence__range_reset msgid "Range Reset" -msgstr "" +msgstr "Réinitialiser la plage" #. module: sequence_reset_period #: model:ir.model,name:sequence_reset_period.model_ir_sequence @@ -52,9 +54,9 @@ msgstr "" #. module: sequence_reset_period #: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__weekly msgid "Weekly" -msgstr "" +msgstr "Hebdomadaire" #. module: sequence_reset_period #: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__yearly msgid "Yearly" -msgstr "" +msgstr "Annuel" From b1c0ee0eeb4a9e1d445a562dea3a0c0d45bac67d Mon Sep 17 00:00:00 2001 From: Alex Cuellar Date: Thu, 14 Apr 2022 07:22:16 -0500 Subject: [PATCH 18/25] [MIG] sequence_reset_period: Migration to 15.0 --- sequence_reset_period/README.rst | 10 +++++----- sequence_reset_period/__manifest__.py | 2 +- .../i18n/sequence_reset_period.pot | 17 +---------------- .../static/description/index.html | 6 +++--- 4 files changed, 10 insertions(+), 25 deletions(-) diff --git a/sequence_reset_period/README.rst b/sequence_reset_period/README.rst index a77a790b95..4b50eba986 100644 --- a/sequence_reset_period/README.rst +++ b/sequence_reset_period/README.rst @@ -14,13 +14,13 @@ Reset Sequences on selected period ranges :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :alt: License: LGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--ux-lightgray.png?logo=github - :target: https://github.com/OCA/server-ux/tree/14.0/sequence_reset_period + :target: https://github.com/OCA/server-ux/tree/15.0/sequence_reset_period :alt: OCA/server-ux .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/server-ux-14-0/server-ux-14-0-sequence_reset_period + :target: https://translation.odoo-community.org/projects/server-ux-15-0/server-ux-15-0-sequence_reset_period :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/250/14.0 + :target: https://runbot.odoo-community.org/runbot/250/15.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -45,7 +45,7 @@ Bug Tracker 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -78,6 +78,6 @@ 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. +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. diff --git a/sequence_reset_period/__manifest__.py b/sequence_reset_period/__manifest__.py index d08108b3cb..4cb1359233 100644 --- a/sequence_reset_period/__manifest__.py +++ b/sequence_reset_period/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Reset Sequences on selected period ranges", - "version": "14.0.1.0.0", + "version": "15.0.1.0.0", "category": "Reporting", "website": "https://github.com/OCA/server-ux", "author": "Creu Blanca, Odoo Community Association (OCA)", diff --git a/sequence_reset_period/i18n/sequence_reset_period.pot b/sequence_reset_period/i18n/sequence_reset_period.pot index 6fb449a571..fcb50ff852 100644 --- a/sequence_reset_period/i18n/sequence_reset_period.pot +++ b/sequence_reset_period/i18n/sequence_reset_period.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 14.0\n" +"Project-Id-Version: Odoo Server 15.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -18,21 +18,6 @@ msgstr "" msgid "Daily" msgstr "" -#. module: sequence_reset_period -#: model:ir.model.fields,field_description:sequence_reset_period.field_ir_sequence__display_name -msgid "Display Name" -msgstr "" - -#. module: sequence_reset_period -#: model:ir.model.fields,field_description:sequence_reset_period.field_ir_sequence__id -msgid "ID" -msgstr "" - -#. module: sequence_reset_period -#: model:ir.model.fields,field_description:sequence_reset_period.field_ir_sequence____last_update -msgid "Last Modified on" -msgstr "" - #. module: sequence_reset_period #: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__monthly msgid "Monthly" diff --git a/sequence_reset_period/static/description/index.html b/sequence_reset_period/static/description/index.html index d1353f65b6..2ece61975d 100644 --- a/sequence_reset_period/static/description/index.html +++ b/sequence_reset_period/static/description/index.html @@ -367,7 +367,7 @@

    Reset Sequences on selected period ranges

    !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

    Beta License: LGPL-3 OCA/server-ux Translate me on Weblate Try me on Runbot

    +

    Beta License: LGPL-3 OCA/server-ux Translate me on Weblate Try me on Runbot

    This module was written to reset the sequences on the specified times, because by default they are reset yearly.

    Table of contents

    @@ -395,7 +395,7 @@

    Bug Tracker

    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.

    +feedback.

    Do not contact contributors directly about support or help with technical issues.

    @@ -422,7 +422,7 @@

    Maintainers

    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.

    +

    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.

    From f526d21d7590ee18b238be0d4ae2a96a2a8c619b Mon Sep 17 00:00:00 2001 From: Oihane Crucelaegui Date: Thu, 2 Feb 2023 11:33:45 +0100 Subject: [PATCH 19/25] [MIG] sequence_reset_period: Migration to 16.0 --- sequence_reset_period/README.rst | 10 ++++----- sequence_reset_period/__manifest__.py | 2 +- sequence_reset_period/i18n/fr_FR.po | 21 ++++++------------- .../i18n/sequence_reset_period.pot | 2 +- .../static/description/index.html | 6 +++--- 5 files changed, 16 insertions(+), 25 deletions(-) diff --git a/sequence_reset_period/README.rst b/sequence_reset_period/README.rst index 4b50eba986..a707b9b18c 100644 --- a/sequence_reset_period/README.rst +++ b/sequence_reset_period/README.rst @@ -14,13 +14,13 @@ Reset Sequences on selected period ranges :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :alt: License: LGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--ux-lightgray.png?logo=github - :target: https://github.com/OCA/server-ux/tree/15.0/sequence_reset_period + :target: https://github.com/OCA/server-ux/tree/16.0/sequence_reset_period :alt: OCA/server-ux .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/server-ux-15-0/server-ux-15-0-sequence_reset_period + :target: https://translation.odoo-community.org/projects/server-ux-16-0/server-ux-16-0-sequence_reset_period :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/250/15.0 + :target: https://runbot.odoo-community.org/runbot/250/16.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -45,7 +45,7 @@ Bug Tracker 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -78,6 +78,6 @@ 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. +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. diff --git a/sequence_reset_period/__manifest__.py b/sequence_reset_period/__manifest__.py index 4cb1359233..8018dc6a20 100644 --- a/sequence_reset_period/__manifest__.py +++ b/sequence_reset_period/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Reset Sequences on selected period ranges", - "version": "15.0.1.0.0", + "version": "16.0.1.0.0", "category": "Reporting", "website": "https://github.com/OCA/server-ux", "author": "Creu Blanca, Odoo Community Association (OCA)", diff --git a/sequence_reset_period/i18n/fr_FR.po b/sequence_reset_period/i18n/fr_FR.po index 33a1f94309..1490153e50 100644 --- a/sequence_reset_period/i18n/fr_FR.po +++ b/sequence_reset_period/i18n/fr_FR.po @@ -21,21 +21,6 @@ msgstr "" msgid "Daily" msgstr "Journalier" -#. module: sequence_reset_period -#: model:ir.model.fields,field_description:sequence_reset_period.field_ir_sequence__display_name -msgid "Display Name" -msgstr "Nom affiché" - -#. module: sequence_reset_period -#: model:ir.model.fields,field_description:sequence_reset_period.field_ir_sequence__id -msgid "ID" -msgstr "" - -#. module: sequence_reset_period -#: model:ir.model.fields,field_description:sequence_reset_period.field_ir_sequence____last_update -msgid "Last Modified on" -msgstr "Dernière modification le" - #. module: sequence_reset_period #: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__monthly msgid "Monthly" @@ -60,3 +45,9 @@ msgstr "Hebdomadaire" #: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__yearly msgid "Yearly" msgstr "Annuel" + +#~ msgid "Display Name" +#~ msgstr "Nom affiché" + +#~ msgid "Last Modified on" +#~ msgstr "Dernière modification le" diff --git a/sequence_reset_period/i18n/sequence_reset_period.pot b/sequence_reset_period/i18n/sequence_reset_period.pot index fcb50ff852..9643c022e8 100644 --- a/sequence_reset_period/i18n/sequence_reset_period.pot +++ b/sequence_reset_period/i18n/sequence_reset_period.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 15.0\n" +"Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" diff --git a/sequence_reset_period/static/description/index.html b/sequence_reset_period/static/description/index.html index 2ece61975d..643dd2cfaf 100644 --- a/sequence_reset_period/static/description/index.html +++ b/sequence_reset_period/static/description/index.html @@ -367,7 +367,7 @@

    Reset Sequences on selected period ranges

    !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

    Beta License: LGPL-3 OCA/server-ux Translate me on Weblate Try me on Runbot

    +

    Beta License: LGPL-3 OCA/server-ux Translate me on Weblate Try me on Runbot

    This module was written to reset the sequences on the specified times, because by default they are reset yearly.

    Table of contents

    @@ -395,7 +395,7 @@

    Bug Tracker

    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.

    +feedback.

    Do not contact contributors directly about support or help with technical issues.

    @@ -422,7 +422,7 @@

    Maintainers

    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.

    +

    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.

    From f763bd06ad2c56a3a6cf43e798a9254ea028e420 Mon Sep 17 00:00:00 2001 From: Ivorra78 Date: Sun, 27 Aug 2023 09:14:09 +0000 Subject: [PATCH 20/25] Translated using Weblate (Spanish) Currently translated at 100.0% (6 of 6 strings) Translation: server-ux-16.0/server-ux-16.0-sequence_reset_period Translate-URL: https://translation.odoo-community.org/projects/server-ux-16-0/server-ux-16-0-sequence_reset_period/es/ --- sequence_reset_period/README.rst | 15 +++++--- sequence_reset_period/i18n/es.po | 9 ++--- .../static/description/index.html | 38 ++++++++++--------- 3 files changed, 33 insertions(+), 29 deletions(-) diff --git a/sequence_reset_period/README.rst b/sequence_reset_period/README.rst index a707b9b18c..ce97fa8cb1 100644 --- a/sequence_reset_period/README.rst +++ b/sequence_reset_period/README.rst @@ -2,10 +2,13 @@ Reset Sequences on selected period ranges ========================================= -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:7f18381e65f7e88cf7061788abbc5c6c5ae14ae62f13fbf222156b5b0ad18c86 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status @@ -19,11 +22,11 @@ Reset Sequences on selected period ranges .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png :target: https://translation.odoo-community.org/projects/server-ux-16-0/server-ux-16-0-sequence_reset_period :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/250/16.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/server-ux&target_branch=16.0 + :alt: Try me on Runboat -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| This module was written to reset the sequences on the specified times, because by default they are reset yearly. @@ -44,7 +47,7 @@ Bug Tracker 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 +If you spotted it first, help us to smash it by providing a detailed and welcomed `feedback `_. Do not contact contributors directly about support or help with technical issues. diff --git a/sequence_reset_period/i18n/es.po b/sequence_reset_period/i18n/es.po index 2b9ff4aa6f..fcd68cee34 100644 --- a/sequence_reset_period/i18n/es.po +++ b/sequence_reset_period/i18n/es.po @@ -6,15 +6,15 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2018-07-13 08:46+0000\n" -"Last-Translator: Enric Tobella \n" +"PO-Revision-Date: 2023-08-27 16:07+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 3.0.1\n" +"X-Generator: Weblate 4.17\n" #. module: sequence_reset_period #: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__daily @@ -33,9 +33,8 @@ msgstr "Reinicio del Rango" #. module: sequence_reset_period #: model:ir.model,name:sequence_reset_period.model_ir_sequence -#, fuzzy msgid "Sequence" -msgstr "ir.sequence" +msgstr "Secuencia" #. module: sequence_reset_period #: model:ir.model.fields.selection,name:sequence_reset_period.selection__ir_sequence__range_reset__weekly diff --git a/sequence_reset_period/static/description/index.html b/sequence_reset_period/static/description/index.html index 643dd2cfaf..42c2057d41 100644 --- a/sequence_reset_period/static/description/index.html +++ b/sequence_reset_period/static/description/index.html @@ -1,20 +1,20 @@ - + - + Reset Sequences on selected period ranges