Hi all,
I'm trying to use Proteus for xmlrpc access.
With a small tweak(fix?) I can succesfully do crud-operations on most
objects, but invoices are giving me trouble.
I'm pasting a backtrace from my test below, but the question is: where
does this field 'journal.rec_name' actually come from. Looking at the
code in account_invoice it looks like this field is setup in the
on_change handler, but I haven't even saved anything yet.
Of course I can start adding has_key() checks to proteus' _default_get,
but I'm not at all sure that's valid.
So where do I go from here.
test_addInvoice (__main__.test_Invoice) ...
{'account': proteus.Model.get('account.account',
proteus.config.XmlrpcConfig('http://admin:t...@localhost:8069/test'))(167),
'company': proteus.Model.get('company.company',
proteus.config.XmlrpcConfig('http://admin:t...@localhost:8069/test'))(1),
'currency': proteus.Model.get('currency.currency')(50),
'description': 'internet bestelling',
'invoice_address': proteus.Model.get('party.address',
proteus.config.XmlrpcConfig('http://admin:t...@localhost:8069/test'))(648),
'journal': proteus.Model.get('account.journal',
proteus.config.XmlrpcConfig('http://admin:t...@localhost:8069/test'))(1),
'party': proteus.Model.get('party.party',
proteus.config.XmlrpcConfig('http://admin:t...@localhost:8069/test'))(267),
'payment_term': proteus.Model.get('account.invoice.payment_term',
proteus.config.XmlrpcConfig('http://admin:t...@localhost:8069/test'))(1),
'reference': 'ref#1',
'state': 'draft',
'type': 'out_invoice'}
ERROR
======================================================================
ERROR: test_addInvoice (__main__.test_Invoice)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests.py", line 254, in test_addInvoice
invoice = self.i.add(**inv)
File "/home/paul/service/src/nfg.erp/nfg/erp/erp.py", line 173, in add
new = self.m(**kw)
File "/home/paul/service/src/proteus/proteus/__init__.py", line 268,
in __init__
self._default_get()
File "/home/paul/service/src/proteus/proteus/__init__.py", line 420,
in _default_get
self._config.context))
File "/home/paul/service/src/proteus/proteus/__init__.py", line 424,
in _default_set
definition = self._fields[field]
KeyError: 'journal.rec_name'
--
________________________________________________________________
Paul Stevens paul at nfg.nl
NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
The Netherlands________________________________http://www.nfg.nl
--
[email protected] mailing list