Not sure to be in the right topic...
I created an object based on a pgsql view :
Code:
def init(self, cr):
cr.execute("""
create or replace view my_object ...
As the result of the query doesn't have unique id inside, I create a pgsql sequence (my_object_id_seq) and use someting like this :
Code:
SELECT cast (nextval('my_object_id_seq') as integer) as id,
The cast is used to get id as integer because sequences are bigint by default.
The view works fine in PgAdmin and no error when upgrading my module but when I open the view of my object in OpenErp, the view is empty, means no records are shown (fields name are visible and ok)
I also tried to concatenate existing fields in the query to make the id but it does not work either.
Any idea?
Thanx