← Back to team overview

openerp-india team mailing list archive

[Bug 1026578] Re: Prototype inheritance on account.invoice doesn't work.

 

Hello all,

seems similar problem persists on OpenERP v7, I'm trying to inherit
sale.order by prototyping and when trying to create default object sales
order I'm getting an error linked to my new object, as I understand my
inheritance should have no affect to original object. The error I get:

OpenERP Server Error
Client Traceback (most recent call last):
  File "/home/ignas/workspace/OpenERP7/openerp/addons/web/http.py", line 195, in dispatch
    response["result"] = method(self, **self.params)
  File "/home/ignas/workspace/OpenERP7/openerp/addons/web/controllers/main.py", line 1079, in call_kw
    return self._call_kw(req, model, method, args, kwargs)
  File "/home/ignas/workspace/OpenERP7/openerp/addons/web/controllers/main.py", line 1071, in _call_kw
    return getattr(req.session.model(model), method)(*args, **kwargs)
  File "/home/ignas/workspace/OpenERP7/openerp/addons/web/session.py", line 43, in proxy
    result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
  File "/home/ignas/workspace/OpenERP7/openerp/addons/web/session.py", line 31, in proxy_method
    result = self.session.send(self.service_name, method, *args)
  File "/home/ignas/workspace/OpenERP7/openerp/addons/web/session.py", line 104, in send
    raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)


Server Traceback (most recent call last):
  File "/home/ignas/workspace/OpenERP7/openerp/addons/web/session.py", line 90, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/home/ignas/workspace/OpenERP7/openerp/netsvc.py", line 295, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/home/ignas/workspace/OpenERP7/openerp/service/web_services.py", line 614, in dispatch
    res = fn(db, uid, *params)
  File "/home/ignas/workspace/OpenERP7/openerp/osv/osv.py", line 169, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/home/ignas/workspace/OpenERP7/openerp/osv/osv.py", line 123, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/ignas/workspace/OpenERP7/openerp/osv/osv.py", line 179, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/ignas/workspace/OpenERP7/openerp/osv/osv.py", line 166, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/ignas/workspace/OpenERP7/openerp/addons/sale/sale.py", line 341, in create
    return super(sale_order, self).create(cr, uid, vals, context=context)
  File "/home/ignas/workspace/OpenERP7/openerp/addons/mail/mail_thread.py", line 241, in create
    thread_id = super(mail_thread, self).create(cr, uid, values, context=context)
  File "/home/ignas/workspace/OpenERP7/openerp/osv/orm.py", line 4479, in create
    self.pool.get(object)._store_set_values(cr, user, ids, fields2, context)
  File "/home/ignas/workspace/OpenERP7/openerp/osv/orm.py", line 4601, in _store_set_values
    result = self._columns[val[0]].get(cr, self, ids, val, SUPERUSER_ID, context=context)
  File "/home/ignas/workspace/OpenERP7/openerp/osv/fields.py", line 1131, in get
    result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
  File "/home/ignas/workspace/OpenERP7/openerp/addons/sale/sale.py", line 96, in _amount_all
    cur = order.pricelist_id.currency_id
  File "/home/ignas/workspace/OpenERP7/openerp/osv/orm.py", line 486, in __getattr__
    raise AttributeError(e)
AttributeError: 'Field pricelist_id not found in browse_record(project.deliverables, 11)'

Thank you.

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/1026578

Title:
  Prototype inheritance on account.invoice doesn't work.

Status in OpenERP Server:
  Confirmed

Bug description:
  Steps to reproduce:
  1. install account module
  2. install module which uses prototype inheritance on account.invoice object (I created a dummy module. You can find it in attachments)
  3. Try to create an invoice and receive an error:
  > Unknown Error
  > Field move_id not found in browse_record(test.invoice, 3)

  I used openerp 6.1 nightly built server and fresh database.
  http://nightly.openerp.com/6.1/nightly/src/openerp-6.1-20120718-233405.tar.gz

  Cheers

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/1026578/+subscriptions


References