[IMP] base: default name for ir.actions.act_window

Take the name of the model if no name is set for an action

closes odoo/odoo#29027
This commit is contained in:
Antony Lesuisse
2018-11-29 09:06:33 +00:00
committed by Raphael Collet
parent d82b3f143c
commit 0af56a4364
+3
View File
@@ -234,6 +234,9 @@ class IrActionsActWindow(models.Model):
@api.model_create_multi
def create(self, vals_list):
self.clear_caches()
for vals in vals_list:
if not vals.get('name') and vals.get('res_model'):
vals['name'] = self.env[vals['res_model']]._description
return super(IrActionsActWindow, self).create(vals_list)
@api.multi