Use ModelData.get_id instead of searching
issue5006 review22481002
This commit is contained in:
1 parent
e4f368076e
commit
1809bee864
1 file changed
+1
-7
@@ -1525,13 +1525,7 @@ class OpenCustomer(Wizard):
|
||||
customer_ids = [line[0] for line in Transaction().cursor.fetchall()]
|
||||
action['pyson_domain'] = PYSONEncoder().encode(
|
||||
[('id', 'in', customer_ids)])
|
||||
|
||||
model_data, = ModelData.search([
|
||||
('fs_id', '=', 'act_open_customer'),
|
||||
('module', '=', 'sale'),
|
||||
], limit=1)
|
||||
wizard = Wizard(model_data.db_id)
|
||||
|
||||
wizard = Wizard(ModelData.get_id('sale', 'act_open_customer'))
|
||||
action['name'] = wizard.name
|
||||
return action, {}
|
||||
|
||||
|
||||
Reference in new issue
Block a user