← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 660049] Re: [5.2] one2many field doesn't send default values

 

Hola Jay (OpenERP)!

> You can check the accounting configuration wizard and see its working.

As far as I can see in the account/account.py file, the only one2many field
used in an osv_memory object is:

'bank_accounts_id': fields.one2many('account.bank.accounts.wizard',
    'bank_account_id', 'Bank Accounts',required=True)

Which is not populated through a defaults function, so I fail to see how
this relates to what is reported in the bug.

The problem is that the defaults function correctly populates the one2many,
but then this info is neither stored in memory neither sent back by the
client.  Only the modified info is sent and given an id.

And it's not even trivial to merge with the items returned by the default
function, because there's no id to match them with. You need to somehow
identify the items and depending on the situation that might be difficult,
very difficult or impossible.

I'll try to make my module into a test case and attach it here.

-- 
Love,
Marga

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/660049

Title:
  [5.2] one2many field doesn't send default values

Status in OpenObject GTK Client:
  Invalid

Bug description:
  Hi community!

Using 5.2 version both in GTK client and server (June 21st 2010 revision), I got following error: After building an "osv_memory wizard" with a one2many field inside of it, I realized that if I didn't change the default values I filled it with (through a function), I didn't receive any value at all; however, if I add/edit/delete some values, all values of this field were properly sent.

Any idea?

Thanks in advance!





References