forked from Yaltik/golem
[REF][TYPO]GOLEM Activity Queue : remove useless wizard and typo improve last one
This commit is contained in:
parent
21e7ed9b5c
commit
15019ad0f2
@ -20,7 +20,7 @@
|
||||
'name': 'GOLEM activity queues',
|
||||
'summary': 'GOLEM activity queues',
|
||||
'description': ''' GOLEM activity queue management ''',
|
||||
'version': '10.0.1.2.2',
|
||||
'version': '10.0.1.2.3',
|
||||
'category': 'GOLEM',
|
||||
'author': 'Youssef El Ouahby, Fabien Bourgeois',
|
||||
'license': 'AGPL-3',
|
||||
@ -32,7 +32,6 @@
|
||||
'views/golem_activity_queue_views.xml',
|
||||
'views/golem_activity_views.xml',
|
||||
'views/golem_member_views.xml',
|
||||
'wizard/golem_activity_queue_choose_views.xml',
|
||||
'wizard/golem_activity_automated_queue_activate_views.xml'
|
||||
]
|
||||
}
|
||||
|
@ -16,4 +16,4 @@
|
||||
# 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/>.
|
||||
|
||||
from . import golem_activity_queue_choose, golem_activity_automated_queue_activate
|
||||
from . import golem_activity_automated_queue_activate
|
||||
|
@ -16,37 +16,22 @@
|
||||
# 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/>.
|
||||
|
||||
""" GOLEM Activity Automated Queue """
|
||||
""" GOLEM Activity Automated Queue Activation """
|
||||
|
||||
from odoo import models, fields
|
||||
|
||||
class GolemActivityAutomatedQueueActivateWizard(models.TransientModel):
|
||||
"""GOLEM Activity Automated Queue wizard : Activatate automated Queue """
|
||||
_name = "golem.activity.automated.queue.activate.wizard"
|
||||
""" GOLEM Activity Automated Queue wizard : activate automated queue processing """
|
||||
_name = 'golem.activity.automated.queue.activate.wizard'
|
||||
|
||||
activity_id = fields.Many2one("golem.activity")
|
||||
activity_id = fields.Many2one('golem.activity')
|
||||
auto_registration_from_queue = fields.Boolean(default=True)
|
||||
|
||||
# lancer liste editable d'inscription sur attente
|
||||
def activate_queue(self):
|
||||
""" Activate Queue for the activity"""
|
||||
|
||||
self.ensure_one()
|
||||
activation = self[0]
|
||||
activation.activity_id.write({
|
||||
'queue_allowed': True,
|
||||
'auto_registration_from_queue': activation.auto_registration_from_queue
|
||||
})
|
||||
|
||||
|
||||
"""
|
||||
self.env['golem.activity.queue'].create({'member_id': activityQueue.member_id.id,
|
||||
'activity_id': activityQueue.activity_id.id})
|
||||
message = _('the member {} is registred in queue for the activity {} with success')
|
||||
return {
|
||||
'warning' : {
|
||||
'title' : _('Warning'),
|
||||
'message': (message.format(activityQueue.member_id.name,
|
||||
activityQueue.activity_id.name))
|
||||
}
|
||||
}"""
|
||||
})
|
||||
|
@ -26,11 +26,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<field name="model">golem.activity.automated.queue.activate.wizard</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Rejection reason">
|
||||
<group>
|
||||
<label
|
||||
class="oe_edit_only" for="name"
|
||||
string="Are you sure you want to Add queue to this activity ? If yes please confirm if you want automated registration from queue to activity"/>
|
||||
</group>
|
||||
<p colspan="2">
|
||||
Are you sure you want to Add queue to this activity ?<br />
|
||||
If yes please confirm if you want automated registration from queue to activity.
|
||||
</p>
|
||||
<group>
|
||||
<field name="activity_id" invisible="1" />
|
||||
<field name="auto_registration_from_queue"/>
|
||||
|
@ -1,37 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
|
||||
# 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/>.
|
||||
|
||||
""" GOLEM Activity Queue Choice """
|
||||
|
||||
from odoo import models, fields
|
||||
|
||||
class GolemActivityQueueChooseWizard(models.TransientModel):
|
||||
""" GOLEM Activity Queue Choice """
|
||||
_name = "golem.activity.queue.choose.wizard"
|
||||
|
||||
activity_id = fields.Many2one("golem.activity")
|
||||
member_id = fields.Many2one("golem.member")
|
||||
|
||||
|
||||
# lancer liste editable d'inscription sur attente
|
||||
def register_in_queue(self):
|
||||
""" Choisir l'activité pour s'inscrire sur sa liste d'attente"""
|
||||
self.ensure_one()
|
||||
activity_queue = self[0]
|
||||
self.env['golem.activity.queue'].create({'member_id': activity_queue.member_id.id,
|
||||
'activity_id': activity_queue.activity_id.id})
|
@ -1,44 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
|
||||
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/>.
|
||||
-->
|
||||
<odoo>
|
||||
<data>
|
||||
|
||||
<!-- Forms -->
|
||||
<record model="ir.ui.view" id="golem_activity_queue_choose_wizard_view_form">
|
||||
<field name="name">GOLEM Activity Queue Choose Wizard Form</field>
|
||||
<field name="model">golem.activity.queue.choose.wizard</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Rejection reason">
|
||||
<group>
|
||||
<field name="member_id" invisible="1" />
|
||||
<field name="activity_id"
|
||||
domain="[('places_remain','<' , 1), ('queue_allowed', '=', True), ('is_current', '=', True)]"
|
||||
options="{'no_create': True}" />
|
||||
</group>
|
||||
<footer>
|
||||
<button name="register_in_queue" string="Validate" type="object"
|
||||
class="oe_highlight" />
|
||||
<button string="Cancel" class="oe_link" special="cancel" />
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</odoo>
|
Loading…
Reference in New Issue
Block a user