changeset c5e580405dd5 in modules/sale_subscription:default
details:
https://hg.tryton.org/modules/sale_subscription?cmd=changeset&node=c5e580405dd5
description:
Prevent changing the company when party is set
As many fields are set using party which depends on the company
context, the
company can not be changed once they are set.
issue10289
review332591002
diffstat:
subscription.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (15 lines):
diff -r 5afee301915e -r c5e580405dd5 subscription.py
--- a/subscription.py Tue Apr 20 09:18:58 2021 +0200
+++ b/subscription.py Thu Apr 22 00:03:28 2021 +0200
@@ -32,9 +32,9 @@
company = fields.Many2One(
'company.company', "Company", required=True, select=True,
states={
- 'readonly': Eval('state') != 'draft',
+ 'readonly': (Eval('state') != 'draft') | Eval('party', True),
},
- depends=['state'],
+ depends=['state', 'party'],
help="Make the subscription belong to the company.")
number = fields.Char(