boxwise / boxwise_wms

1 stars 4 forks source link

Rather than relying on XML to update and remove database entries, swi… #53

Closed jamescrowley closed 5 years ago

jamescrowley commented 5 years ago

…tch to python so we can fail gracefully when there is no action to take rather than generating loads of errors and noise.

I had originally thought I could use the post_init_hook but this is only triggered on first install, not subsequent upgrades. Given we're lazy at the moment in terms of module versioning, using Odoo's support for migrations didn't seem to make sense - so instead I've done an ugly hack that abuses the ability to call functions from data files.

I had to create a dummy model for this which I'm not too happy about (boxwise_config). If someone has a better way to do this later, then please knock yourselves out!