diff --git a/addons/account/static/src/js/tax_group.js b/addons/account/static/src/js/tax_group.js index 5c6735aaa2b..a9de7f9f587 100644 --- a/addons/account/static/src/js/tax_group.js +++ b/addons/account/static/src/js/tax_group.js @@ -91,7 +91,7 @@ odoo.define('account.tax_group', function (require) { // Display the pencil and allow the event to click and edit only on purchase that are not posted and in edit mode. // since the field is readonly its mode will always be readonly. Therefore we have to use a trick by checking the // formRenderer (the parent) and check if it is in edit in order to know the correct mode. - var displayEditWidget = self._isPurchaseDocument() && this.record.data.state !== 'posted' && this.getParent().mode === 'edit'; + var displayEditWidget = self._isPurchaseDocument() && this.record.data.state === 'draft' && this.getParent().mode === 'edit'; this.$el.html($(QWeb.render('AccountTaxGroupTemplate', { lines: self.value, displayEditWidget: displayEditWidget,