stock_reports should drop view instead of replacing it
Bug #531479 reported by
Albert Cervera i Areny - http://www.NaN-tic.com
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
stock_reports.py creates a view but uses "CREATE OR REPLACE VIEW" syntax instead of "DROP VIEW" and "CREATE VIEW" in two separate commands. This becomes a problem if you need to alter the view in another module to add new columns. In the new module you will use "DROP + CREATE",but if you happen to need to update all modules (-u all), executing "CREATE OR REPLACE VIEW" of 'stock' module will crash because in PostgreSQL the REPLACE part is not able to modify the number of columns of a view.
The attached patch fixes this problem.
Related branches
To post a comment you must log in.
Hello Albert,
Will this patch be enough?
https:/ /bugs.launchpad .net/openobject -addons/ +bug/550500
Thanks.