Commit 47991652 authored by Jean-Paul Smets's avatar Jean-Paul Smets

added auto increment system for relation fields


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2283 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f00262fe
...@@ -124,7 +124,7 @@ class ERP5Field(Field): ...@@ -124,7 +124,7 @@ class ERP5Field(Field):
# if normal value is a callable itself, wrap it # if normal value is a callable itself, wrap it
if callable(value): if callable(value):
value = value.__of__(self) value = value.__of__(self)
#value=value() # Mising call ??? XXX Make sure compatible with listbox methods #value=value() # Mising call ??? XXX Make sure compatible with listbox methods
if id == 'default': if id == 'default':
...@@ -338,6 +338,7 @@ class ERP5Form(ZMIForm, ZopePageTemplate): ...@@ -338,6 +338,7 @@ class ERP5Form(ZMIForm, ZopePageTemplate):
# Proxy method to PageTemplate # Proxy method to PageTemplate
def __call__(self, *args, **kwargs): def __call__(self, *args, **kwargs):
self._v_relation_field_index = 0 # We initialize here an index which is used to generate different method ids for every field
if not kwargs.has_key('args'): if not kwargs.has_key('args'):
kwargs['args'] = args kwargs['args'] = args
form = self form = self
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment