loxamir / sincronizador

Synchronize Odoo databases in Realtime and store all changes
4 stars 13 forks source link

Get an error at the time of Database creation in V8. #1

Open Hetal-SerpentCS opened 7 years ago

Hetal-SerpentCS commented 7 years ago

Traceback (most recent call last): File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/http.py", line 546, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/http.py", line 583, in dispatch result = self._call_function(self.params) File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/http.py", line 320, in _call_function return self.endpoint(*args, *kwargs) File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/http.py", line 812, in call return self.method(args, kw) File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/http.py", line 412, in response_wrap response = f(*args, kw) File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/addons/web/controllers/main.py", line 705, in create request.session.authenticate(params['db_name'], 'admin', params['create_admin_pwd']) File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/http.py", line 965, in authenticate uid = dispatch_rpc('common', 'authenticate', [db, login, password, env]) File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/http.py", line 115, in dispatch_rpc result = dispatch(method, params) File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/service/common.py", line 26, in dispatch return fn(params) File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/service/common.py", line 37, in exp_authenticate res_users = openerp.registry(db)['res.users'] File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/init.py", line 68, in registry return modules.registry.RegistryManager.get(database_name) File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/modules/registry.py", line 339, in get update_module) File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/modules/registry.py", line 370, in new openerp.modules.load_modules(registry._db, force_demo, status, update_module) File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/modules/loading.py", line 297, in load_modules loaded_modules, processed_modules = load_module_graph(cr, graph, status, perform_checks=update_module, report=report) File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/modules/loading.py", line 157, in load_module_graph init_module_models(cr, package.name, models) File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/modules/module.py", line 290, in init_module_models obj.init(cr) File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/tools/misc.py", line 1156, in deco return func(args, kwargs) File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/addons/base/ir/ir_config_parameter.py", line 72, in init self.set_param(cr, SUPERUSER_ID, key, value, groups=groups) File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/api.py", line 268, in wrapper return old_api(self, *args, kwargs) File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/addons/base/ir/ir_config_parameter.py", line 120, in set_param self.create(cr, uid, vals, context=context) File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/api.py", line 268, in wrapper return old_api(self, *args, *kwargs) File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/api.py", line 372, in old_api result = method(recs, args, kwargs) File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/addons/connector_sincronizador/models/models.py", line 35, in create_couch if module and module.state == 'installed': File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/fields.py", line 835, in get self.determine_value(record) File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/fields.py", line 928, in determine_value record._prefetch_field(self) File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/api.py", line 266, in wrapper return new_api(self, *args, kwargs) File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/models.py", line 3246, in _prefetch_field result = records.read(list(fnames), load='_classic_write') File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/api.py", line 266, in wrapper return new_api(self, *args, *kwargs) File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/models.py", line 3183, in read self._read_from_database(stored, inherited) File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/api.py", line 266, in wrapper return new_api(self, args, kwargs) File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/models.py", line 3315, in _read_from_database cr.execute(query_str, [tuple(sub_ids)] + where_params) File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/sql_db.py", line 171, in wrapper return f(self, *args, **kwargs) File "/home/serpentcs/WorkSpace/openerp/8.0/odoo/openerp/sql_db.py", line 247, in execute res = self._obj.execute(query, params) ProgrammingError: column ir_module_module.menus_by_module does not exist LINE 1: ..."latest_version","ir_module_module"."application","ir_module... ^

loxamir commented 7 years ago

This is a known issue caused because I have to override the write and create methods to odoo be able to write to couchdb just after write to postgres This override it's not good yet, it doesn't diferentiate between the databases, I tried to check if the module is installed but it doesn't work well The true is this module is under development, it is tested and works when you install it on a database, duplicate the database and configure it, so this two database are in sync

The solution is find another way trigger the write in couchdb just after a successful write on odoo, I will work at that soon but if you can help me with that I will apprecitate