diff options
| author | Vincent Schippefilt <vsc@odoo.com> | 2019-03-07 14:29:30 +0000 |
|---|---|---|
| committer | Vincent Schippefilt <vsc@odoo.com> | 2019-03-07 14:50:31 +0000 |
| commit | 7221aa7db443b5da8df50b24ea6afb31b86043d4 (patch) | |
| tree | 31e48fefc2803a24334ec15e828cce58e9be6d85 /addons/account/static/src/js/section_and_note_fields_backend.js | |
| parent | 1d3af8e9570b31318386c09a3410271435e60774 (diff) | |
[FIX] account: add missing class on section and note field
after the update of jquery, all promises are asynchronous.
In the invoices, a class was added to the section and note field before
it was rendered.
To fix this, we are now waiting for the rendering to be completed before
adding the class.
closes odoo/odoo#31666
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Diffstat (limited to 'addons/account/static/src/js/section_and_note_fields_backend.js')
| -rw-r--r-- | addons/account/static/src/js/section_and_note_fields_backend.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/addons/account/static/src/js/section_and_note_fields_backend.js b/addons/account/static/src/js/section_and_note_fields_backend.js index 624a7ce3a5c..26328cc045b 100644 --- a/addons/account/static/src/js/section_and_note_fields_backend.js +++ b/addons/account/static/src/js/section_and_note_fields_backend.js @@ -68,9 +68,10 @@ var SectionAndNoteListRenderer = ListRenderer.extend({ * @private */ _renderView: function () { - var def = this._super(); - this.$el.find('> table').addClass('o_section_and_note_list_view'); - return def; + var self = this; + return this._super.apply(this, arguments).then(function () { + self.$('> table').addClass('o_section_and_note_list_view'); + }); }, /** * Add support for product configurator |
