diff --git a/yaltik_dsl/__manifest__.py b/yaltik_dsl/__manifest__.py index 18e4ad3..6b8307c 100644 --- a/yaltik_dsl/__manifest__.py +++ b/yaltik_dsl/__manifest__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2019-2024 Fabien Bourgeois +# Copyright 2019-2025 Fabien Bourgeois # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -19,7 +19,7 @@ 'name': 'Yaltik Odoo DSL base module and fns', 'summary': 'Yaltik Odoo Domain Specific Language base module and functions', 'description': """ Yaltik Odoo Domain Specific Language base module and functions """, - 'version': '10.0.0.5.16', + 'version': '10.0.0.5.17', 'category': 'Yaltik', 'author': 'Fabien Bourgeois', 'license': 'AGPL-3', diff --git a/yaltik_dsl/src/odoo_dsl.py b/yaltik_dsl/src/odoo_dsl.py index 9e824e9..13e0005 100644 --- a/yaltik_dsl/src/odoo_dsl.py +++ b/yaltik_dsl/src/odoo_dsl.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019-2024 Fabien Bourgeois +# Copyright 2019-2025 Fabien Bourgeois # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -48,7 +48,10 @@ act_window = lambda *args: xmln('act_window', *args) def act_window_model(model, attrs): """ Build new act_window from model and args """ xmlid = '%s_view_action' % (model.replace('.', '_')) - name = '%s Action' % ' '.join(map(lambda w: w.capitalize(), model.split('.'))) + if 'name' in attrs: + name = attrs['name'] + else: + name = '%s Action' % ' '.join(map(lambda w: w.capitalize(), model.split('.'))) attrs_clone = attrs.copy() # Avoid side-effect attrs_clone.update({'id': xmlid, 'name': name, 'res_model': model}) return act_window(attrs_clone)