← Back to team overview

openerp-india team mailing list archive

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

 

Ok, so that's what I've figured out so far:

All the action takes place in BaseModel class, inside create method, on
lines 4233-4240:

At the beginning of new account.invoice creation, an ID is acquired for
this new object. This ID is passed to _store_get_values method (line
4234)  which returns a list of tuples, which looks like this:

[(10, 'account.invoice', [52L], ['number']), (50, 'test.invoice', [52L],
['reconciled'])]

Then (line 4239) _store_set_values method is invoked on every object
from the list, but IDS passed for each method invocation is one of the
account.invoice object, which second invocation (test.invoice object)
makes illogical (because IDS belongs to account.invoice object, not
test.invoice).

Of course the problem lies somewhere deeper, but this should be good
entry point for solving this issue.

Cheers,

-- 
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:
  New

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