diff --git a/sign_oca/static/src/elements/check.js b/sign_oca/static/src/elements/check.js index eb2b10ed..86e67348 100644 --- a/sign_oca/static/src/elements/check.js +++ b/sign_oca/static/src/elements/check.js @@ -42,7 +42,8 @@ odoo.define("sign_oca.checkElement", function (require) { ev.preventDefault(); var next_items = _.filter( parent.info.items, - (i) => i.tabindex > item.tabindex && i.role_id === parent.role_id + (i) => + i.tabindex > item.tabindex && i.role_id === parent.info.role_id ).sort((a, b) => a.tabindex - b.tabindex); if (next_items.length > 0) { ev.currentTarget.blur(); diff --git a/sign_oca/static/src/elements/signature.js b/sign_oca/static/src/elements/signature.js index 26498858..4b7c57bc 100644 --- a/sign_oca/static/src/elements/signature.js +++ b/sign_oca/static/src/elements/signature.js @@ -63,7 +63,9 @@ odoo.define("sign_oca.signatureElement", function (require) { this.getParent().checkFilledAll(); var next_items = _.filter( this.getParent().info.items, - (i) => i.tabindex > this.item.tabindex + (i) => + i.tabindex > this.item.tabindex && + i.role_id === this.getParent().info.role_id ).sort((a, b) => a.tabindex - b.tabindex); if (next_items.length > 0) { this.getParent().items[next_items[0].id].dispatchEvent( diff --git a/sign_oca/static/src/elements/text.js b/sign_oca/static/src/elements/text.js index 02bcac04..c24a7bd5 100644 --- a/sign_oca/static/src/elements/text.js +++ b/sign_oca/static/src/elements/text.js @@ -42,7 +42,8 @@ odoo.define("sign_oca.textElement", function (require) { ev.preventDefault(); var next_items = _.filter( parent.info.items, - (i) => i.tabindex > item.tabindex && i.role_id === parent.role_id + (i) => + i.tabindex > item.tabindex && i.role_id === parent.info.role_id ).sort((a, b) => a.tabindex - b.tabindex); if (next_items.length > 0) { ev.currentTarget.blur();