alyf-de / banking

An Open Banking Integration with ERPNext
GNU General Public License v3.0
39 stars 20 forks source link

fix: create custom fields after install #1

Closed barredterra closed 1 year ago

barredterra commented 1 year ago

We tried to create custom fields via a patch. However, when we first install an app, all existing patches get marked as run and will never be executed. Therefore, it might be better to use the after_install hook for this.

To keep after_install clean and have a single point of configuration, I defined the custom fields in hooks.py, a pattern we use a lot in our other projects.

I think that in this setup we won't need the patch anymore. In case it is still needed, it could now be executed by adding the following line to patches.txt:

execute:from klarna_kosma_integration.install import after_install; after_install()