Edit /usr/lib/python2.7/dist-packages/openerp/addons/base/base.sql
put new line after 4: SET LOCAL default_sequenceam = 'bdr';
cut all lines from 181 to the end of the file and paste them in new file /usr/lib/python2.7/dist-packages/openerp/addons/base/base2.sql
Edit /usr/lib/python2.7/dist-packages/openerp/addons/base/base2.sql
comment with -- all lines that begin with 'select setval'
Edit /usr/lib/python2.7/dist-packages/openerp/modules/db.py
put before 56 two lines: import time
time.sleep(10)
# they should have the same indent as next line
copy lines from 45 to 'base_sql_file.close()'
paste them after two lines we added before
Edit first line of the pasted block
before: f = openerp.modules.get_module_resource('base', 'base.sql')
should be: f = openerp.modules.get_module_resource('base', 'base2.sql')
Edit /usr/lib/python2.7/dist-packages/openerp/models.py
create new line after 2722: cr.execute("SET LOCAL default_sequenceam = 'bdr'")
2800: cr.execute('CREATE TABLE "%s" ("%s" INTEGER NOT NULL, "%s" INTEGER NOT NULL, UNIQUE("%s","%s"))' % (m2m_tbl, col1, col2, col1, col2))
2800: 2799: cr.execute('CREATE TABLE "%s" ("%s" INTEGER NOT NULL, "%s" INTEGER NOT NULL, PRIMARY KEY("%s","%s"))' % (m2m_tbl, col1, col2, col1, col2))
Edit /usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_sequence.py
138: sql = "CREATE SEQUENCE ir_sequence_%03d INCREMENT BY %%s START WITH %%s" % id
138: sql = "CREATE SEQUENCE ir_sequence_%03d START WITH %%s USING bdr" % id
139: cr.execute(sql, (number_increment, number_next))
139: cr.execute(sql, (number_next,))
106: 'implementation': 'standard',
106: 'implementation': 'no_gap',
Edit /usr/lib/python2.7/dist-packages/openerp/modules/registry.py
232: cr.execute("""CREATE SEQUENCE base_registry_signaling INCREMENT BY 1 START WITH 1""")
232: cr.execute("""CREATE SEQUENCE base_registry_signaling START WITH 1 USING bdr""")
234: cr.execute("""CREATE SEQUENCE base_cache_signaling INCREMENT BY 1 START WITH 1""")
234: cr.execute("""CREATE SEQUENCE base_cache_signaling START WITH 1 USING bdr""")