Code review comment for lp:~camptocamp/sale-wkfl/product_procurement_type

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

I don't see a problem having these modules here. About the code: there is a migration script, and I think its purpose is to update existing products upon installation of the module. However, I don't think the script is run at module installation time. Are you sure that this is the case?

Otherwise, you will need to put it in the model's _auto_init() method. It will run every time the module is upgraded (or installed) but that should not hurt. What you can do is check if column 'procurement_type' exists, call super() and run the migration queries only if the column did not exist when you checked. This indicates the installation of the module.

review: Needs Information

« Back to merge proposal