Hola,
Restauro una copia de seguridad de un odoo 16 en otro odoo 16 que es dos meses mas nuevo. Restauro por un lado la base de datos y por otro lado el filestore.
En el contenedor hago actualización pues uno es mas nuevo que el otro
odoo --no-xmlrpc --db_host=172.17.0.2 --db_user=odoo --db_password=odoo --stop-after-init -u all -d nombrebasedatos
Da un error y no funciona, no puedo recuperar la copia. ¿Alguien sabe como arreglarlo?
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 711, in _tag_root
raise ParseError('while parsing %s:%s, somewhere inside\n%s' % (
odoo.tools.convert.ParseError: while parsing /usr/lib/python3/dist-packages/odoo/addons/base/data/res_lang_data.xml:10, somewhere inside
2024-05-28 15:36:56,896 143 INFO teslaspain odoo.service.server: Stopping gracefully
no me deja poner todo el mensaje de error, dice algo como
<record id="base.lang_ar" model="res.lang">
<field name="flag_image" type="base64" file="base/static/img/lang_flags/lang_ar.png"/>
</record>
2024-05-28 15:36:56,896 143 INFO teslaspain odoo.service.server: Stopping gracefully
2024-05-28 15:36:56,891 143 WARNING teslaspain odoo.modules.loading: Transient module states were reset
2024-05-28 15:36:56,891 143 ERROR teslaspain odoo.modules.registry: Failed to load registry
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 698, in _tag_root
f(rec)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 599, in _tag_record
record = model._load_records([data], self.mode == 'update')
File "/usr/lib/python3/dist-packages/odoo/models.py", line 4385, in _load_records
data['record']._load_records_write(data['values'])
File "/usr/lib/python3/dist-packages/odoo/models.py", line 4316, in _load_records_write
self.write(values)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/res_lang.py", line 310, in write
res = super(Lang, self).write(vals)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3776, in write
field.write(self, value)
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 2493, in write
super(Image, self).write(records, new_value)
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 2427, in write
atts.write({'datas': value})
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_attachment.py", line 615, in write
return super(IrAttachment, self).write(vals)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3808, in write
fields[0].determine_inverse(real_recs)
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1401, in determine_inverse
determine(self.inverse, records)
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 98, in determine
return needle(*args)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_attachment.py", line 242, in _inverse_datas
self._set_attachment_data(lambda attach: base64.b64decode(attach.datas or b''))
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_attachment.py", line 255, in _set_attachment_data
self._file_delete(fname)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_attachment.py", line 144, in _file_delete
self._mark_for_gc(fname)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_attachment.py", line 157, in _mark_for_gc
open(full_path, 'ab').close()
PermissionError: [Errno 13] Permission denied: '/var/lib/odoo/filestore/teslaspain/checklist/fd/fdffc45cba0e31dd34423b54f06fd48e9824192c'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 90, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 429, in load_modules
loaded_modules, processed_modules = load_module_graph(
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 231, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 71, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 763, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 829, in convert_xml_import
obj.parse(doc.getroot())
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 749, in parse
self._tag_root(de)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 698, in _tag_root
f(rec)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 711, in _tag_root
raise ParseError('while parsing %s:%s, somewhere inside\n%s' % (
odoo.tools.convert.ParseError: while parsing /usr/lib/python3/dist-packages/odoo/addons/base/data/res_lang_data.xml:10, somewhere inside
<record id="base.lang_ar" model="res.lang">
<field name="flag_image" type="base64" file="base/static/img/lang_flags/lang_ar.png"/>
</record>
2024-05-28 15:36:56,894 143 CRITICAL teslaspain odoo.service.server: Failed to initialize database `teslaspain`.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 698, in _tag_root
f(rec)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 599, in _tag_record
record = model._load_records([data], self.mode == 'update')
File "/usr/lib/python3/dist-packages/odoo/models.py", line 4385, in _load_records
data['record']._load_records_write(data['values'])
File "/usr/lib/python3/dist-packages/odoo/models.py", line 4316, in _load_records_write
self.write(values)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/res_lang.py", line 310, in write
res = super(Lang, self).write(vals)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3776, in write
field.write(self, value)
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 2493, in write
super(Image, self).write(records, new_value)
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 2427, in write
atts.write({'datas': value})
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_attachment.py", line 615, in write
return super(IrAttachment, self).write(vals)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3808, in write
fields[0].determine_inverse(real_recs)
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1401, in determine_inverse
determine(self.inverse, records)
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 98, in determine
return needle(*args)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_attachment.py", line 242, in _inverse_datas
self._set_attachment_data(lambda attach: base64.b64decode(attach.datas or b''))
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_attachment.py", line 255, in _set_attachment_data
self._file_delete(fname)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_attachment.py", line 144, in _file_delete
self._mark_for_gc(fname)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_attachment.py", line 157, in _mark_for_gc
open(full_path, 'ab').close()
PermissionError: [Errno 13] Permission denied: '/var/lib/odoo/filestore/teslaspain/checklist/fd/fdffc45cba0e31dd34423b54f06fd48e9824192c'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/service/server.py", line 1299, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "<decorator-gen-16>", line 2, in new
File "/usr/lib/python3/dist-packages/odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 90, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 429, in load_modules
loaded_modules, processed_modules = load_module_graph(
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 231, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 71, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 763, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 829, in convert_xml_import
obj.parse(doc.getroot())
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 749, in parse
self._tag_root(de)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 698, in _tag_root
f(rec)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 711, in _tag_root
raise ParseError('while parsing %s:%s, somewhere inside\n%s' % (
odoo.tools.convert.ParseError: while parsing /usr/lib/python3/dist-packages/odoo/addons/base/data/res_lang_data.xml:10, somewhere inside
<record id="base.lang_ar" model="res.lang">
<field name="flag_image" type="base64" file="base/static/img/lang_flags/lang_ar.png"/>
</record>
2024-05-28 15:36:56,896 143 INFO teslaspain odoo.service.server: Stopping gracefully
Si restauro en el mismo disco, todo va bien. Parece ser que el problema reside en que no hay dos odoos iguales, y aunque le pases el update all, no va a funcionar. ¿Entonces hay que hacer una instalación nueva en la que el odoo core y todos los modulos sean los de la misma versíón, mismo día y mismo comit?
En gogle hay respuestas a la cadena ParseError
no se que es eso