cacher onglet d'attente et rendre en lecture seule traitement automatisé au cas d'attente non permis
This commit is contained in:
parent
d479a0ca45
commit
c9a4cc5950
@ -40,7 +40,13 @@ class GolemActivity(models.Model):
|
|||||||
@api.multi
|
@api.multi
|
||||||
def queue_allowed_toggle(self):
|
def queue_allowed_toggle(self):
|
||||||
for activity in self:
|
for activity in self:
|
||||||
activity.queue_allowed = not activity.queue_allowed
|
if activity.queue_allowed:
|
||||||
|
activity.queue_allowed = not activity.queue_allowed
|
||||||
|
activity.automated_registration_from_queue = False
|
||||||
|
else:
|
||||||
|
activity.queue_allowed = not activity.queue_allowed
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#contraint sur nombre d'inscription : une desincription declanche une inscription depuis attente
|
#contraint sur nombre d'inscription : une desincription declanche une inscription depuis attente
|
||||||
@api.multi
|
@api.multi
|
||||||
|
@ -28,7 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
<!--Ajout du case file d'attente et inscription automatisé sur activity form-->
|
<!--Ajout du case file d'attente et inscription automatisé sur activity form-->
|
||||||
<xpath expr="//field[@name='is_overbooked']" position="after">
|
<xpath expr="//field[@name='is_overbooked']" position="after">
|
||||||
<field name="queue_allowed"/>
|
<field name="queue_allowed"/>
|
||||||
<field name="automated_registration_from_queue"/>
|
<field name="automated_registration_from_queue" attrs="{'readonly': [('queue_allowed','=', False )]}"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
<!--Ajout du bouton inscription en file d'attente sur activity form-->
|
<!--Ajout du bouton inscription en file d'attente sur activity form-->
|
||||||
<xpath expr="//field[@name='activity_registration_ids']" position="after">
|
<xpath expr="//field[@name='activity_registration_ids']" position="after">
|
||||||
@ -41,7 +41,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
</xpath>
|
</xpath>
|
||||||
<!--Ajout onglet queue sur activity form-->
|
<!--Ajout onglet queue sur activity form-->
|
||||||
<xpath expr="//page[@name='invoicing']" position="before">
|
<xpath expr="//page[@name='invoicing']" position="before">
|
||||||
<page name="queue" string="Queue">
|
<page name="queue" string="Queue" attrs="{'invisible': [('queue_allowed', '=', False)]}">
|
||||||
<group>
|
<group>
|
||||||
<field name="queue_activity_number" readonly='1'/>
|
<field name="queue_activity_number" readonly='1'/>
|
||||||
<field name="activity_queue_ids"
|
<field name="activity_queue_ids"
|
||||||
|
Loading…
Reference in New Issue
Block a user