diff --git a/addons/project/static/src/js/widgets/html_with_action_widget.js b/addons/project/static/src/js/widgets/html_with_action_widget.js deleted file mode 100644 index e56a79f712d..00000000000 --- a/addons/project/static/src/js/widgets/html_with_action_widget.js +++ /dev/null @@ -1,42 +0,0 @@ -/** @odoo-module **/ - -import { device } from 'web.config'; -import { bus } from 'web.core'; -import fieldRegistry from 'web.field_registry'; -import FieldHtml from 'web_editor.field.html'; - -export const FieldHtmlWithAction = FieldHtml.extend({ - events: Object.assign({}, FieldHtml.prototype.events, { - 'click a[type="object"]': '_onClickObject' - }), - init() { - this._super(...arguments); - if (!device.isMobile) { - bus.on("DOM_updated", this, () => { - const $editable = this.$el.find('.note-editable'); - if ($editable.length) { - const minHeight = window.innerHeight - $editable.offset().top - 30; - $editable.css('min-height', minHeight + 'px'); - } - }); - } - }, - /** - * Handle the click on a link with object as type - * @param {*} event - */ - _onClickObject: async function (event) { - event.preventDefault(); - const action = await this._rpc({ - model: this.model, - method: event.target.name, - args: [this.res_id], - context: this.record.context, - }); - if (action) { - this.do_action(action); - } - } -}); - -fieldRegistry.add('html_with_action', FieldHtmlWithAction); diff --git a/addons/project/views/project_update_views.xml b/addons/project/views/project_update_views.xml index 0e3627e50e1..cdf2206bb99 100644 --- a/addons/project/views/project_update_views.xml +++ b/addons/project/views/project_update_views.xml @@ -46,7 +46,7 @@ - +