I need to add another state to a function in account/static/src/js/ tax_group.js line 94
var displayEditWidget = self._isPurchaseDocument() && this.record.data.state === 'draft' && this.getParent().mode === 'edit';
I already added inheritance to web.assets_backend but don't know how to exactly overwrite the function.
I hope somebody can help me.
Thank you very much
Paul
For your purpose, Because the js refers to the field of a record:
To add a new state value, you just have to add a new state in the corresponding python field "state" of the account.move model:
__manifest__.pyfile, you should add theaccountmodule in thedependssection:statefield:After this python customization, if you really need to override the js:
In you custom module ("my_custom_module"),
in a new js file, you should call the original js class and using include to "patch" it this way: