← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 839915] Re: Database views fail silently on function fields

 

I have discovered that it is a function field in my query that causes this problem, even though it is stored and PostgreSQL has no problem making a view with it.
I think this should be allowed, and furthermore a meaningful message should be given if a (non-stored) function field is used in a view query.

I'm running 6.0.3 BTW.

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/839915

Title:
  Database views fail silently on function fields

Status in OpenERP Server:
  New

Bug description:
  I am creating database views as a basis for reports. I've done three
  that work fine. The fourth does not. When I click on its menu item I
  get this error:

  ProgrammingError: relation "citrus_fruit_received_report" does not exist
  LINE 1: SELECT "citrus_fruit_received_report".id FROM "citrus_fruit_...

  Sure enough, the view is not in the database.
  Now I've gone through my code, the query works fine in pgadmin, if I make _auto=True I get a working object, the field names and types all match.

  Stepping through in the debugger I see that the view is created in the
  database but then it gets dropped again. I cannot see why, or how.
  What could cause this?

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/839915/+subscriptions


References