From b1c535a6070ed739bfa194e6c5dd9550b17eff5f Mon Sep 17 00:00:00 2001 From: Elouan Le Bars Date: Mon, 16 Sep 2019 11:21:41 +0200 Subject: [PATCH] [FIX] beesdoo_shift : Error when saving a temporary exempt Add beesdoo_shift_temporary_exemption_id_seq. --- beesdoo_shift/__openerp__.py | 2 +- .../migrations/9.0.1.2.3/post-migrate.py | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 beesdoo_shift/migrations/9.0.1.2.3/post-migrate.py diff --git a/beesdoo_shift/__openerp__.py b/beesdoo_shift/__openerp__.py index c5920b2..3344656 100644 --- a/beesdoo_shift/__openerp__.py +++ b/beesdoo_shift/__openerp__.py @@ -13,7 +13,7 @@ 'website': "https://github.com/beescoop/Obeesdoo", 'category': 'Cooperative management', - 'version': '9.0.1.2.1', + 'version': '9.0.1.2.3', 'depends': ['beesdoo_base'], diff --git a/beesdoo_shift/migrations/9.0.1.2.3/post-migrate.py b/beesdoo_shift/migrations/9.0.1.2.3/post-migrate.py new file mode 100644 index 0000000..88297a5 --- /dev/null +++ b/beesdoo_shift/migrations/9.0.1.2.3/post-migrate.py @@ -0,0 +1,16 @@ +# coding: utf-8 + + +def migrate(cr, version): + """Fix bug occuring when trying to save a temporary exempt + (missing sequence in database). """ + cr.execute( + """ + CREATE SEQUENCE IF NOT EXISTS beesdoo_website_shift_config_settings_id_seq + """ + ) + cr.execute( + """ + CREATE SEQUENCE IF NOT EXISTS beesdoo_shift_temporary_exemption_id_seq + """ + )