← Back to team overview

openerp-community-reviewer team mailing list archive

Re: [Merge] lp:~camptocamp/sale-wkfl/product_procurement_type into lp:sale-wkfl

 

> 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?

Yes it is run at installation time, I checked for this. 


> 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.

Not sure what the cleanest way is. Do you have an opinion about the cleanness of either options, and what we should aim for in OCA modules?
-- 
https://code.launchpad.net/~camptocamp/sale-wkfl/product_procurement_type/+merge/207638
Your team Sale Core Editors is subscribed to branch lp:sale-wkfl.


References