summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_renderer.js
diff options
context:
space:
mode:
authorBruno Boi <boi@odoo.com>2020-08-06 12:41:39 +0000
committerBruno Boi <boi@odoo.com>2020-08-17 08:30:52 +0000
commit26633ea8bb22a55c7dbb3acc75cde7371172d38b (patch)
tree349c1a423dff1beb89253cab3720110c68512917 /addons/web/static/src/js/views/basic/basic_renderer.js
parent5750adea3a0aa44fd416935ed46f1fca745b1b43 (diff)
[IMP] hr: add a standalone version of the avatar employee widget
This will be useful for special views like gantt, grid… A StandaloneM2OAvatarEmployee widget will be available and would allow to instantiate a Many2OneAvatarEmployee widget anywhere. Usage: const widget = new StandaloneM2OAvatarEmployee(<parent>, <value>); widget.appendTo(<Node>); Where: <parent> the widget parent, if it is given <value> {number|[number, char]} either the employee id or an array representing the employee: [id, display_name]. If only the id is passed, the widget will fetch the display_name through a name_get rpc. <Node> any DOM Node object you want the widget to be appended to. Examples: const w1 = new StandaloneM2OAvatarEmployee(null, 3); const w2 = new StandaloneM2OAvatarEmployee(null, [1, 'Mitchell Admin']); w1.appendTo(document.body); w2.appendTo(document.body); closes odoo/odoo#54230 Taskid: 2272544 Taskid: 2272582 Related: odoo/enterprise#11412 Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com> Co-authored-by: Aaron Bohy (aab) <aab@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_renderer.js')
0 files changed, 0 insertions, 0 deletions