changeset 48ef9a0e4c97 in modules/sale_opportunity:default
details: 
https://hg.tryton.org/modules/sale_opportunity?cmd=changeset;node=48ef9a0e4c97
description:
        Remove required on description

        Description field is used when creating the sale but not required for 
this model.
        So required constraint seems unnecessary.

        issue8092
        review68491002
diffstat:

 CHANGELOG      |  2 ++
 opportunity.py |  5 ++++-
 2 files changed, 6 insertions(+), 1 deletions(-)

diffs (31 lines):

diff -r b24d8d0d9f71 -r 48ef9a0e4c97 CHANGELOG
--- a/CHANGELOG Thu Mar 21 15:17:48 2019 +0100
+++ b/CHANGELOG Fri Mar 22 11:12:06 2019 +0100
@@ -1,3 +1,5 @@
+* Make description on sale opportunity optional
+
 Version 5.0.0 - 2018-10-01
 * Bug fixes (see mercurial logs for details)
 * Remove support for Python 2.7
diff -r b24d8d0d9f71 -r 48ef9a0e4c97 opportunity.py
--- a/opportunity.py    Thu Mar 21 15:17:48 2019 +0100
+++ b/opportunity.py    Fri Mar 22 11:12:06 2019 +0100
@@ -83,7 +83,7 @@
         states=_STATES_START, depends=_DEPENDS_START)
     end_date = fields.Date('End Date', select=True,
         states=_STATES_STOP, depends=_DEPENDS_STOP)
-    description = fields.Char('Description', required=True,
+    description = fields.Char('Description',
         states=_STATES_STOP, depends=_DEPENDS_STOP)
     comment = fields.Text('Comment', states=_STATES_STOP,
         depends=_DEPENDS_STOP)
@@ -149,6 +149,9 @@
         # Migration from 4.2: make employee not required
         table.not_null_action('employee', action='remove')
 
+        # Migration from 5.0: drop required on description
+        table.not_null_action('description', action='remove')
+
     @classmethod
     def __setup__(cls):
         super(SaleOpportunity, cls).__setup__()

Reply via email to