diff --git a/yaltik_dsl/__manifest__.py b/yaltik_dsl/__manifest__.py index 33cb835..5c8c70d 100644 --- a/yaltik_dsl/__manifest__.py +++ b/yaltik_dsl/__manifest__.py @@ -1,4 +1,6 @@ -# Copyright 2019-2024 Fabien Bourgeois +# -*- coding: utf-8 -*- + +# 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 @@ -17,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': '12.0.0.5.16', + 'version': '12.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 5e6f883..c5ce358 100644 --- a/yaltik_dsl/src/odoo_dsl.py +++ b/yaltik_dsl/src/odoo_dsl.py @@ -1,4 +1,4 @@ -# 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 @@ -45,7 +45,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)