changeset d00b051057d1 in modules/sale_opportunity:default details: https://hg.tryton.org/modules/sale_opportunity?cmd=changeset&node=d00b051057d1 description: Add pre_validate on opportunity button
issue11055 review381521003 diffstat: opportunity.py | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diffs (18 lines): diff -r c9301042bdf0 -r d00b051057d1 opportunity.py --- a/opportunity.py Sat Dec 18 16:34:36 2021 +0100 +++ b/opportunity.py Thu Jan 13 12:48:17 2022 +0100 @@ -211,6 +211,14 @@ 'depends': ['state'], }, 'opportunity': { + 'pre_validate': [ + If(~Eval('party'), + ('party', '!=', None), + ()), + If(~Eval('employee'), + ('employee', '!=', None), + ()), + ], 'invisible': ~Eval('state').in_(['lead']), 'depends': ['state'], },