[IMP][I18N][MIG]GOLEM Resource end renaming work

This commit is contained in:
Fabien BOURGEOIS 2018-08-03 10:54:28 +02:00
parent 8060d261e3
commit 757089762f
6 changed files with 76 additions and 49 deletions

View File

@ -20,7 +20,7 @@
'name': 'GOLEM non-profit resources',
'summary': 'GOLEM resources management',
'description': ''' GOLEM resources management ''',
'version': '10.0.1.13.3',
'version': '10.0.1.14.0',
'category': 'GOLEM',
'author': 'Youssef El Ouahby, Fabien Bourgeois',
'license': 'AGPL-3',

View File

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-04-16 14:29+0000\n"
"PO-Revision-Date: 2018-04-16 14:29+0000\n"
"POT-Creation-Date: 2018-08-03 08:52+0000\n"
"PO-Revision-Date: 2018-08-03 10:53+0200\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -16,9 +16,9 @@ msgstr ""
"Plural-Forms: \n"
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_availibility_24_7
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_resource_avaibility_24_7
msgid "24/7 availibility"
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_availability_24_7
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_resource_availability_24_7
msgid "24/7 availability"
msgstr "Disponibilité 24h/24 7j/7"
#. module: golem_resource
@ -42,7 +42,7 @@ msgid "Active"
msgstr "Actif"
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_timetable_availibility_24
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_timetable_availability_24
msgid "All day"
msgstr "Toute la journée"
@ -52,26 +52,21 @@ msgid "Archived"
msgstr "Archivé"
#. module: golem_resource
#: model:ir.ui.view,arch_db:golem_resource.golem_resource_view_form
msgid "Availibility configuration"
msgstr "Configuration des disponibilités"
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_avaibility_start
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_resource_avaibility_start
msgid "Availibility start date"
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_availability_start
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_resource_availability_start
msgid "Availability start date"
msgstr "Début de disponibilité"
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_avaibility_stop
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_resource_avaibility_stop
msgid "Availibility stop date"
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_availability_stop
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_resource_availability_stop
msgid "Availability stop date"
msgstr "Fin de disponibilité"
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_resource_timetable_ids
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_timetable_ids
msgid "Availibility timetable"
msgid "Availability timetable"
msgstr "Tableau des disponibilités"
#. module: golem_resource
@ -161,7 +156,7 @@ msgstr "Brouillon"
#. module: golem_resource
#: code:addons/golem_resource/models/golem_resource.py:94
#, python-format
msgid "End availibility should be after than start availibility"
msgid "End availability should be after than start availability"
msgstr "La fin de disponibilité ne peut pas être après le début"
#. module: golem_resource
@ -330,7 +325,7 @@ msgstr "Merci de saisir le motif du refus"
#. module: golem_resource
#: model:ir.ui.view,arch_db:golem_resource.golem_resource_view_form
msgid "Please save the resource before fixing the timetable availibility\""
msgid "Please save the resource before fixing the timetable availability\""
msgstr "Merci de sauvegarder la ressource avant de pouvoir définir ses disponibilités\""
#. module: golem_resource
@ -426,7 +421,6 @@ msgid "Resource Types"
msgstr "Types de ressource"
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_product_product_resource_ids
#: model:ir.model.fields,field_description:golem_resource.field_product_template_resource_ids
msgid "Resource ids"
msgstr "Ressources"
@ -579,7 +573,13 @@ msgstr "Sans validation"
msgid "You do not have permissions to validate or reject a reservation."
msgstr "Vous n'avez pas les autorisations nécessaires pour valider ou refuser une réservation."
#. module: golem_resource
#: model:ir.ui.view,arch_db:golem_resource.golem_resource_view_form
msgid "availability configuration"
msgstr "Configuration des disponibilités"
#. module: golem_resource
#: model:ir.model,name:golem_resource.model_golem_reservation_rejection_wizard
msgid "golem.reservation.rejection.wizard"
msgstr "golem.reservation.rejection.wizard"

View File

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-04-16 14:29+0000\n"
"PO-Revision-Date: 2018-04-16 14:29+0000\n"
"POT-Creation-Date: 2018-08-03 08:52+0000\n"
"PO-Revision-Date: 2018-08-03 08:52+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -16,9 +16,9 @@ msgstr ""
"Plural-Forms: \n"
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_availibility_24_7
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_resource_avaibility_24_7
msgid "24/7 availibility"
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_availability_24_7
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_resource_availability_24_7
msgid "24/7 availability"
msgstr ""
#. module: golem_resource
@ -42,7 +42,7 @@ msgid "Active"
msgstr ""
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_timetable_availibility_24
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_timetable_availability_24
msgid "All day"
msgstr ""
@ -52,26 +52,21 @@ msgid "Archived"
msgstr ""
#. module: golem_resource
#: model:ir.ui.view,arch_db:golem_resource.golem_resource_view_form
msgid "Availibility configuration"
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_availability_start
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_resource_availability_start
msgid "Availability start date"
msgstr ""
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_avaibility_start
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_resource_avaibility_start
msgid "Availibility start date"
msgstr ""
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_avaibility_stop
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_resource_avaibility_stop
msgid "Availibility stop date"
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_availability_stop
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_resource_availability_stop
msgid "Availability stop date"
msgstr ""
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_resource_timetable_ids
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_timetable_ids
msgid "Availibility timetable"
msgid "Availability timetable"
msgstr ""
#. module: golem_resource
@ -161,7 +156,7 @@ msgstr ""
#. module: golem_resource
#: code:addons/golem_resource/models/golem_resource.py:94
#, python-format
msgid "End availibility should be after than start availibility"
msgid "End availability should be after than start availability"
msgstr ""
#. module: golem_resource
@ -330,7 +325,7 @@ msgstr ""
#. module: golem_resource
#: model:ir.ui.view,arch_db:golem_resource.golem_resource_view_form
msgid "Please save the resource before fixing the timetable availibility\""
msgid "Please save the resource before fixing the timetable availability\""
msgstr ""
#. module: golem_resource
@ -426,7 +421,6 @@ msgid "Resource Types"
msgstr ""
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_product_product_resource_ids
#: model:ir.model.fields,field_description:golem_resource.field_product_template_resource_ids
msgid "Resource ids"
msgstr ""
@ -579,6 +573,11 @@ msgstr ""
msgid "You do not have permissions to validate or reject a reservation."
msgstr ""
#. module: golem_resource
#: model:ir.ui.view,arch_db:golem_resource.golem_resource_view_form
msgid "availability configuration"
msgstr ""
#. module: golem_resource
#: model:ir.model,name:golem_resource.model_golem_reservation_rejection_wizard
msgid "golem.reservation.rejection.wizard"

View File

@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
""" Pre-migration script """
from openupgradelib import openupgrade
@openupgrade.migrate(use_env=False)
def migrate(cursor, version):
""" Keep old columns in database for migration """
cursor.execute('ALTER TABLE golem_resource RENAME COLUMN avaibility_start TO availability_start')
cursor.execute('ALTER TABLE golem_resource RENAME COLUMN avaibility_stop TO availability_stop')
cursor.execute('ALTER TABLE golem_resource RENAME COLUMN availibility_24_7 TO availability_24_7')
cursor.execute('ALTER TABLE golem_resource_timetable RENAME COLUMN availibility_24 TO availability_24')

View File

@ -42,11 +42,11 @@ class GolemResource(models.Model):
'order to sell reservations (work in '
'progress)')
availability_start = fields.Date(required=True, string='availability start date')
availability_stop = fields.Date(required=True, string='availability stop date')
availability_start = fields.Date(required=True, string='Availability start date')
availability_stop = fields.Date(required=True, string='Availability stop date')
availability_24_7 = fields.Boolean(string='24/7 availability')
timetable_ids = fields.One2many('golem.resource.timetable', 'resource_id',
string='availability timetable')
string='Availability timetable')
reservation_ids = fields.One2many('golem.resource.reservation', 'resource_id',
string='Reservations')
reservation_count = fields.Integer(compute='_compute_reservation_count')

View File

@ -41,9 +41,9 @@ class TestGolemResourceReservation(TransactionCase):
})
self.resource = self.env['golem.resource'].create({
'name': 'Resource',
'avaibility_start': '2018-01-01',
'avaibility_stop': '2020-01-01',
'availibility_24_7': True
'availability_start': '2018-01-01',
'availability_stop': '2020-01-01',
'availability_24_7': True
})
self.partner = self.env['res.partner'].create({'firstname': 'John',