Giter Club home page Giter Club logo

Comments (4)

xmo-odoo avatar xmo-odoo commented on May 22, 2024

Can't repro, whether locally or on http://runbot.openerp.com

Is base_import installed? Do you have third-party modules installed which could interfere with it?

from odoo.

blaggacao avatar blaggacao commented on May 22, 2024
Issue Type:

Bug Report (structured)

Ansible Odoo Version:

8.0dev-20140416-230101

Environment:

Ubuntu precise64 build from hashicorp/precise64 - box (https://vagrantcloud.com/hashicorp/precise64/version/2)

Odoo:
Fresh fresh fresh install, with demo data. No modules installed. The first thing of all I wanted to do is to import the company to prevent something is registerd under "Your Company".

  • I cannot say if base_import was installed. I think it is by default?
Summary:

Import of csv did not behave. Even not previously exported ones of the environment itself.
Fails at the following state:

Uploading csv to the import screen -> hangs on every tested csv (including ones exported from the same pristine installation)

  • Hint: Doesn't this mean base_import installed?
Steps To Reproduce:

fire up the box vagrant up in the directory of this vagrant file with vagrant installed.

# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "hashicorp/precise64"
  config.vm.network "forwarded_port", guest: 8069, host: 8079
  config.vm.network "public_network"

end

install version 8.0dev-20140416-230101 deb package (was latest at that time)
following roughly the steps by http://www.theopensourcerer.com/2012/12/how-to-install-openerp-7-0-on-ubuntu-12-04-lts/

tweaks to make it work: https://www.odoo.com/forum/Help-1/question/Postgres-Psycopg2-Unix-Socket-problemito-52426
Caution! Locale of hashicorp/precise65 is not en_US.UTF-8 which makes postgres behave badly, has to be set prior to install postgres like https://index.docker.io/u/flox/ubuntu-openerp/ seems to be a more common problem. Hint -> include into future provisioning scripts, if planned so.

Expected Results:

Can import csvs like in saas3-online of 18.05.2014

Actual Results:
File "/usr/share/pyshared/openerp/addons/base/ir/ir_http.py", line 89, in _han
dle_exception
    return request._handle_exception(exception)
  File "/usr/share/pyshared/openerp/addons/base/ir/ir_http.py", line 116, in _di
spatch
    result = request.dispatch()
  File "/usr/share/pyshared/openerp/http.py", line 537, in dispatch
    r = self._call_function(**self.params)
  File "/usr/share/pyshared/openerp/http.py", line 294, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/usr/share/pyshared/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/usr/share/pyshared/openerp/http.py", line 291, in checked_call
    return self.endpoint(*a, **kw)
  File "/usr/share/pyshared/openerp/http.py", line 638, in __call__
    return self.method(*args, **kw)
  File "/usr/share/pyshared/openerp/http.py", line 337, in response_wrap
    response = f(*args, **kw)
TypeError: set_file() takes at least 4 arguments (4 given)

from odoo.

paragkumar avatar paragkumar commented on May 22, 2024

This issue can be resolved by making changes in addons/base_import/controller.py file and upgrading base_import module.


import simplejson
from openerp.http import Controller, route, request

class ImportController(Controller):
@route('/base_import/set_file')
def set_file(self, file, import_id, jsonp='callback'):
import_id = int(import_id)

     written = request.session.model('base_import.import').write(import_id, {
         'file': file.read(),
         'file_name': file.filename,
         'file_type': file.content_type,
     }, request.context)

     return 'window.top.%s(%s)' % (
         jsonp, simplejson.dumps({'result': written}))

from odoo.

blaggacao avatar blaggacao commented on May 22, 2024

could not reproduce it anymore, solved

from odoo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.