Ignore initial on_change call from modify header wizard
issue11703 review433471003 (grafted from 66e5451115cc00fde55e1c1ffafb83bf7c9c859e) --HG-- branch : 6.0
This commit is contained in:
1 parent
8a2c9439bd
commit
105ae8b4e9
1 file changed
+11
@@ -925,6 +925,17 @@ class Sale(
|
||||
sale=sale.rec_name))
|
||||
super(Sale, cls).delete(sales)
|
||||
|
||||
def on_change(self, fieldnames):
|
||||
pool = Pool()
|
||||
ModelData = pool.get('ir.model.data')
|
||||
context = Transaction().context
|
||||
wizard_modify_header_id = ModelData.get_id(
|
||||
'sale', 'wizard_modify_header')
|
||||
if (len(fieldnames) > 1
|
||||
and context.get('action_id') == wizard_modify_header_id):
|
||||
return []
|
||||
return super().on_change(fieldnames)
|
||||
|
||||
@classmethod
|
||||
@ModelView.button
|
||||
@Workflow.transition('cancelled')
|
||||
|
||||
Reference in new issue
Block a user