stock_reports should drop view instead of replacing it

Bug #531479 reported by Albert Cervera i Areny - http://www.NaN-tic.com
6
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

Revision history for this message
Albert Cervera i Areny - http://www.NaN-tic.com (albert-nan) wrote :
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hello Albert,

Will this patch be enough?

https://bugs.launchpad.net/openobject-addons/+bug/550500

Thanks.

Revision history for this message
Albert Cervera i Areny - http://www.NaN-tic.com (albert-nan) wrote : Re: [Bug 531479] Re: stock_reports should drop view instead of replacing it

A Dilluns, 29 de març de 2010, Jay (Open ERP) va escriure:
> Hello Albert,
>
> Will this patch be enough?
>
> https://bugs.launchpad.net/openobject-addons/+bug/550500
>
> Thanks.
>

Yes, I think so.

--

Albert Cervera i Areny
http://www.NaN-tic.com
OpenERP Partner
Mòbil: +34 669 40 40 18

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Improved by revision 2681 <email address hidden>.
Thanks.

Changed in openobject-addons:
milestone: none → 5.0.8
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.