[Erp5-dev] patch for Base_edit

Pelletier Vincent vincent at nexedi.com
Tue Jul 25 10:06:43 CEST 2006


Le Jeudi 20 Juillet 2006 21:26, Jean-Paul Smets a écrit :
> I think this should be handled by vincent's new xhtml_style system.
> Vincent: can you check this ?

Sorry for the delay.

> Le jeudi 20 juillet 2006 20:12, Bartek Gorny a écrit :
> > I would suggest adding one line to Base_edit:
> >
> > dialog_id=dialog_id or 'view'
> >
> > The reason is that after editing a relation there is no dialog_id, and
> > the url is like:
> > module/object_id/?selection_name=...
> > and in File and derived object this means a request to download data
> > (see docstring of CMFDefault.File.File.download()). The above fixes
> > this.

Looking a bit deeper into the file, I realised a patch wasn't reverted 
completelly : I earlier changed form_id for dialog_id to match xhtml 
behaviour, but I think I was wrong doing so. The form id must be gathered 
from dialog_id if present, with a fallback on form_id.

I think that the fix should actually be :

form_id = form.id

just after getting the form (we might not always come from the default tab, so 
we should not loose this information).

-- 
Vincent Pelletier



More information about the Erp5-dev mailing list