Buenas tardes,
Finalmente instalé Odoo 11.0 para importar todo lo de contaplus y facturaplus con tus scripts :)
Pero el script de import_asientos_peek.py me falla :(
Me sale este error:
Traceback (most recent call last):
File "import_asientos_peek.py", line 175, in
importar()
File "import_asientos_peek.py", line 167, in importar
crearAsiento(apuntes)
File "import_asientos_peek.py", line 88, in crearAsiento
move_id = move_obj.create(account_move)
File "/home/ndata/.local/lib/python2.7/site-packages/erppeek.py", line 1238, in create
new_id = self._execute('create', values, context=context)
File "/home/ndata/.local/lib/python2.7/site-packages/erppeek.py", line 826, in execute
res = self._execute(obj, method, *params)
File "/home/ndata/.local/lib/python2.7/site-packages/erppeek.py", line 462, in
wrapper = lambda s, *args: s._dispatch(name, args)
File "/usr/lib/python2.7/xmlrpclib.py", line 1602, in __request
verbose=self.__verbose
File "/usr/lib/python2.7/xmlrpclib.py", line 1283, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/lib/python2.7/xmlrpclib.py", line 1316, in single_request
return self.parse_response(response)
File "/usr/lib/python2.7/xmlrpclib.py", line 1493, in parse_response
return u.close()
File "/usr/lib/python2.7/xmlrpclib.py", line 800, in close
raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault The operation cannot be completed: another model requires the record being deleted. If possible, archive it instead.
Model: Account Entry (account.move), Constraint: account_move_journal_id_fkey
None: 'Traceback (most recent call last):\n File "/opt/odoo/odoo/odoo/service/model.py", line 97, in wrapper\n return f(dbname, *args, **kwargs)\n File "/opt/odoo/odoo/odoo/service/model.py", line 179, in execute\n res = execute_cr(cr, uid, obj, method, *args, **kw)\n File "/opt/odoo/odoo/odoo/service/model.py", line 168, in execute_cr\n return odoo.api.call_kw(recs, method, args, kw)\n File "/opt/odoo/odoo/odoo/api.py", line 697, in call_kw\n return call_kw_model(method, model, args, kwargs)\n File "/opt/odoo/odoo/odoo/api.py", line 682, in call_kw_model\n result = method(recs, *args, **kwargs)\n File "/opt/odoo/odoo/addons/account/models/account_move.py", line 127, in create\n move = super(AccountMove, self.with_context(check_move_validity=False, partner_id=vals.get('partner_id'))).create(vals)\n File "/opt/odoo/odoo/odoo/models.py", line 3452, in create\n record = self.browse(self._create(old_vals))\n File "/opt/odoo/odoo/odoo/models.py", line 3545, in _create\n cr.execute(query, tuple(u[2] for u in updates if len(u) > 2))\n File "/opt/odoo/odoo/odoo/sql_db.py", line 155, in wrapper\n return f(self, *args, **kwargs)\n File "/opt/odoo/odoo/odoo/sql_db.py", line 232, in execute\n res = self._obj.execute(query, params)\npsycopg2.IntegrityError: insert or update on table "account_move" violates foreign key constraint "account_move_journal_id_fkey"\nDETAIL: Key (journal_id)=(3) is not present in table "account_journal".\n\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File "/opt/odoo/odoo/odoo/service/wsgi_server.py", line 124, in wsgi_xmlrpc\n result = odoo.http.dispatch_rpc(service, method, params)\n File "/opt/odoo/odoo/odoo/http.py", line 118, in dispatch_rpc\n result = dispatch(method, params)\n File "/opt/odoo/odoo/odoo/service/model.py", line 39, in dispatch\n res = fn(db, uid, *params)\n File "/opt/odoo/odoo/odoo/service/model.py", line 157, in wrapper\n raise ValidationError(msg)\nodoo.exceptions.ValidationError: ('The operation cannot be completed: another model requires the record being deleted. If possible, archive it instead.\n\nModel: Account Entry (account.move), Constraint: account_move_journal_id_fkey', None)\n'>
Podrías ayudarme? Lo estoy haciendo con Python2.7 y Ubuntu18 aunque tengo el 3 instalado también.
Muchas gracias