Merge pull request #5871 from expsa/14.0-i18n-system_dashboard_classic-auto-20251229_121109

[FIX] system_dashboard_classic: fix issues and bugs
This commit is contained in:
Mohamed Eltayar 2025-12-29 12:11:30 +03:00 committed by GitHub
commit 12085bc268
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 27 additions and 13 deletions

View File

@ -931,3 +931,19 @@ msgstr ""
#: model:ir.model.fields,field_description:system_dashboard_classic.field_stage_stage__value
msgid "value"
msgstr "القيمة"
#. module: system_dashboard_classic
#: model_terms:ir.ui.view,arch_db:system_dashboard_classic.res_config_settings_view_form_dashboard
msgid "Work Timer Settings"
msgstr "إعدادات مؤقت العمل"
#. module: system_dashboard_classic
#: model:ir.model.fields,field_description:system_dashboard_classic.field_res_config_settings__dashboard_show_work_timer
#: model_terms:ir.ui.view,arch_db:system_dashboard_classic.res_config_settings_view_form_dashboard
msgid "Show Work Timer"
msgstr "إظهار مؤقت العمل"
#. module: system_dashboard_classic
#: model_terms:ir.ui.view,arch_db:system_dashboard_classic.res_config_settings_view_form_dashboard
msgid "Display live work hour countdown timer with real-time remaining hours"
msgstr "عرض مؤقت تنازلي لساعات العمل يُظهر الوقت المتبقي حتى نهاية الدوام"

View File

@ -683,9 +683,11 @@ odoo.define('system_dashboard_classic.dashboard_self_services', function(require
// ACTIVE TAB HANDLING - Activate correct tab from context
// Used when returning from approval record view via breadcrumb
// Note: 'context' here is actually the action object
// additional_context merges into context.context
// ============================================================
var activeTab = (context && context.params && context.params.active_tab) ||
(context && context.context && context.context.active_tab);
var activeTab = (context && context.context && context.context.active_tab) ||
(context && context.params && context.params.active_tab) ||
(context && context.active_tab);
if (activeTab === 'to_approve') {
setTimeout(function() {
$('a[href="#to_approve"]').tab('show');
@ -1860,17 +1862,14 @@ odoo.define('system_dashboard_classic.dashboard_self_services', function(require
var self = this;
},
reload: function(options) {
// Properly reload dashboard by triggering the action again
// options.active_tab can be passed to specify which tab to open
// Properly reload dashboard by triggering the registered action
// This ensures proper translation and breadcrumb behavior
var activeTab = (options && options.active_tab) || 'to_approve';
this.do_action({
name: _t('Self-Service'),
type: 'ir.actions.client',
tag: 'system_dashboard_classic.dashboard_self_services',
target: 'main',
params: {
this.do_action('system_dashboard_classic.action_self_service_dashboard', {
additional_context: {
active_tab: activeTab
}
},
clear_breadcrumbs: true
});
},
/**

View File

@ -244,8 +244,7 @@
<div class="o_setting_right_pane">
<label for="dashboard_show_work_timer" string="Show Work Timer"/>
<div class="text-muted">
Display live work hour countdown timer showing remaining time until end of shift.
<br/><em>Updates every second with real-time progress bar.</em>
Display live work hour countdown timer with real-time remaining hours
</div>
</div>
</div>