Home Ask Login Register

Developers Planet

Your answer is one click away!

7H3 IN5ID3R February 2016

Odoo with Google App Engine NDB | Porting from postgresql to NDB

I am planning to port Odoo to Google App Engine Web application. As I came to know that Odoo uses postgresql., Is it possible to port that database connections, queries and all from Postgresql db to NDB so that I can run it on Google App Engine ?


Tim Hoffman February 2016

It would be a big job ;-) I think the only way to approach such an exercise is see how you could re-implement odoo ORM engine (custom to odoo), and asses that effort.


It is an explicit homegrown orm, that emboddies things like relations/constraints grouping, etc... many of which have no analog in the datastore.

So the the effort involved would become quite huge.

Higher level abstractions in odoo will depend on model methods of the orm like

 def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False, lazy=True):
    Get the list of records in list view grouped by the given ``groupby`` fields
    :param cr: database cursor
    :param uid: current user id
    :param domain: list specifying search criteria [['field_name', 'operator', 'value'], ...]
    :param list fields: list of fields present in the list view specified on the object
    :param list groupby: list of groupby descriptions by which the records will be grouped.  
            A groupby description is either a field (then it will be grouped by that field)
            or a string 'field:groupby_function'.  Right now, the only functions supported
            are 'day', 'week', 'month', 'quarter' or 'year', and they only make sense for 
            date/datetime fields.


Clearly much of this is irrelevant or not doable in the datastore, directly (groupby) but could be done in memory - hence in your own ORM replacement.

In the ORM you see a lot of counting going on (hmm that doesn't work well in datastore).

Also Odoo will depend on the locking/consistancy model of an RDBMS which is not the same as the datastores eventual consistancy. So there is a fundamental approach to be considered. If you create lots of ancestors keys to he

Post Status

Asked in February 2016
Viewed 3,307 times
Voted 5
Answered 1 times


Leave an answer

Quote of the day: live life