Skip to content

Commit ffb78e4

Browse files
fix(odoo): fix odoo integration button (#2399)
* fix(odoo): fix odoo integration button * fix(odoo): update origins * Update origins.js
1 parent e71b604 commit ffb78e4

File tree

3 files changed

+22
-11
lines changed

3 files changed

+22
-11
lines changed

src/content/odoo.js

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
1-
'use strict';
1+
/**
2+
* @name Odoo
3+
* @urlAlias odoo.com
4+
* @urlRegex *://*.odoo.com/*
5+
*/
6+
'use strict'
27

38
togglbutton.render(
49
'.o_control_panel .breadcrumb:not(.toggl)',
510
{ observe: true },
611

7-
$container => {
12+
($container) => {
813
const descriptionSelector = () => {
9-
const $description = $('.breadcrumb-item.active', $container);
10-
return $description.textContent.trim();
11-
};
14+
const $description = $('.o_last_breadcrumb_item.active .text-truncate')
15+
return $description.textContent.trim()
16+
}
1217

1318
const link = togglbutton.createTimerLink({
1419
className: 'odoo',
15-
description: descriptionSelector
16-
});
20+
description: descriptionSelector,
21+
})
1722

18-
$container.appendChild(link);
19-
}
20-
);
23+
$container.appendChild(link)
24+
},
25+
)

src/origins.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,8 @@ export default {
432432
},
433433
'odoo.com': {
434434
url: '*://*.odoo.com/*',
435-
name: 'Odoo'
435+
name: 'Odoo',
436+
file: 'odoo.js'
436437
},
437438
'onlyoffice.com': {
438439
url: '*://*.onlyoffice.com/*',

src/styles/style.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1563,3 +1563,8 @@ body.notion-body.dark .toggl-button.notion {
15631563
.toggl-button.freedcamp {
15641564
margin-top: 5px;
15651565
}
1566+
1567+
/********* ODOO *********/
1568+
.toggl-button.odoo {
1569+
margin-left: 10px;
1570+
}

0 commit comments

Comments
 (0)