Allow deactivate Approval Group

This commit is contained in:
shervasElec 2023-05-12 09:13:12 +02:00 committed by GitHub
parent 5100e0b212
commit 13bbdaece4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View File

@ -1,5 +1,5 @@
from datetime import datetime
from trytond.model import Workflow, ModelSQL, ModelView, fields
from trytond.model import Workflow, ModelSQL, ModelView, fields, DeactivableMixin
from trytond.pyson import Eval, Bool
from trytond.pool import Pool
from trytond.transaction import Transaction
@ -9,7 +9,7 @@ from trytond.exceptions import UserError
__all__ = ['Group', 'GroupUser', 'Request']
class Group(ModelSQL, ModelView):
class Group(ModelSQL, ModelView, DeactivableMixin):
'Approval Group'
__name__ = 'approval.group'
name = fields.Char('Name', required=True)

View File

@ -1,11 +1,13 @@
<?xml version="1.0"?>
<!-- The COPYRIGHT file at the top level of this repository contains the full
copyright notices and license terms. -->
<form>
<form col="6">
<label name="name"/>
<field name="name"/>
<field name="name" xexpand="1"/>
<label name="model"/>
<field name="model"/>
<separator name="users" colspan="4"/>
<field name="users" colspan="4"/>
<label name="active"/>
<field name="active" xexpand="0" width="100"/>
<separator name="users" colspan="6"/>
<field name="users" colspan="6"/>
</form>