changeset 3745b4750a4d in modules/sale_subscription:default
details: 
https://hg.tryton.org/modules/sale_subscription?cmd=changeset;node=3745b4750a4d
description:
        Allow services to be deactivated

        issue8351
        review251361002
diffstat:

 CHANGELOG             |  2 ++
 service.py            |  4 ++--
 view/service_form.xml |  4 +++-
 3 files changed, 7 insertions(+), 3 deletions(-)

diffs (41 lines):

diff -r 0d78a0ed5795 -r 3745b4750a4d CHANGELOG
--- a/CHANGELOG Wed May 22 18:37:08 2019 +0200
+++ b/CHANGELOG Fri May 24 09:23:21 2019 +0200
@@ -1,3 +1,5 @@
+* Allow services to be deactivated
+
 Version 5.2.0 - 2019-05-06
 * Bug fixes (see mercurial logs for details)
 * Use ir.calendar.day
diff -r 0d78a0ed5795 -r 3745b4750a4d service.py
--- a/service.py        Wed May 22 18:37:08 2019 +0200
+++ b/service.py        Fri May 24 09:23:21 2019 +0200
@@ -1,12 +1,12 @@
 # This file is part of Tryton.  The COPYRIGHT file at the top level of
 # this repository contains the full copyright notices and license terms.
-from trytond.model import ModelSQL, ModelView, fields
+from trytond.model import ModelSQL, ModelView, DeactivableMixin, fields
 from trytond.pyson import Eval
 
 __all__ = ['Service']
 
 
-class Service(ModelSQL, ModelView):
+class Service(DeactivableMixin, ModelSQL, ModelView):
     "Subscription Service"
     __name__ = 'sale.subscription.service'
 
diff -r 0d78a0ed5795 -r 3745b4750a4d view/service_form.xml
--- a/view/service_form.xml     Wed May 22 18:37:08 2019 +0200
+++ b/view/service_form.xml     Fri May 24 09:23:21 2019 +0200
@@ -3,7 +3,9 @@
 this repository contains the full copyright notices and license terms. -->
 <form>
     <label name="product"/>
-    <field name="product" colspan="3"/>
+    <field name="product"/>
+    <label name="active"/>
+    <field name="active"/>
     <label name="consumption_recurrence"/>
     <field name="consumption_recurrence"/>
     <label name="consumption_delay"/>

Reply via email to