Discussion:
[Erp5-dev] patch for Base_edit
Bartek Gorny
2006-07-20 18:12:01 UTC
Permalink
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.

Bartek
--
"Software is largely a service industry operating under the persistent
but unfounded delusion that it is a manufacturing industry."
Eric S.Raymond, "The Magic Cauldron"
Jean-Paul Smets
2006-07-20 19:26:46 UTC
Permalink
I think this should be handled by vincent's new xhtml_style system.
Vincent: can you check this ?
JPS.
Post by Bartek Gorny
dialog_id=dialog_id or 'view'
The reason is that after editing a relation there is no dialog_id, and
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.
Bartek
--
Jean-Paul Smets-Solanes, Nexedi CEO - Tel. +33(0)6 62 05 76 14
Nexedi: Consulting and Development of Libre / Open Source Software
http://www.nexedi.com
ERP5: Libre/ Open Source ERP Software for small and medium companies
http://www.erp5.org
Rentalinux: Desktop Linux Server
http://www.rentalinux.com
Bartek Gorny
2006-07-22 11:40:02 UTC
Permalink
By the same token: breadcrumb links have bare object urls, so if a
File contains something and one wants to go up from it to the file, it
starts a download. It'd be better if breadcrumb links had the "/view"
suffix.

Bartek
Post by Jean-Paul Smets
I think this should be handled by vincent's new xhtml_style system.
Vincent: can you check this ?
JPS.
Post by Bartek Gorny
dialog_id=dialog_id or 'view'
The reason is that after editing a relation there is no dialog_id, and
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.
Bartek
--
Jean-Paul Smets-Solanes, Nexedi CEO - Tel. +33(0)6 62 05 76 14
Nexedi: Consulting and Development of Libre / Open Source Software
http://www.nexedi.com
ERP5: Libre/ Open Source ERP Software for small and medium companies
http://www.erp5.org
Rentalinux: Desktop Linux Server
http://www.rentalinux.com
_______________________________________________
Erp5-dev mailing list
Erp5-dev at erp5.org
http://erp5.org/mailman/listinfo/erp5-dev
--
"Software is largely a service industry operating under the persistent
but unfounded delusion that it is a manufacturing industry."
Eric S.Raymond, "The Magic Cauldron"
Yoshinori Okuji
2006-07-24 20:47:01 UTC
Permalink
Post by Bartek Gorny
By the same token: breadcrumb links have bare object urls, so if a
File contains something and one wants to go up from it to the file, it
starts a download. It'd be better if breadcrumb links had the "/view"
suffix.
You are right. Vincent, can you check this?

YO
--
Yoshinori Okuji, Nexedi CTO
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.com
ERP5: Full Featured High End Open Source ERP
http://www.erp5.com
ERP5 Wiki: Developer Zone for ERP5 Community
http://wiki.erp5.org
Pelletier Vincent
2006-07-25 08:50:01 UTC
Permalink
Post by Yoshinori Okuji
Post by Bartek Gorny
By the same token: breadcrumb links have bare object urls, so if a
File contains something and one wants to go up from it to the file, it
starts a download. It'd be better if breadcrumb links had the "/view"
suffix.
You are right. Vincent, can you check this?
Done.
--
Vincent Pelletier
Pelletier Vincent
2006-07-25 08:06:43 UTC
Permalink
Post by Jean-Paul Smets
I think this should be handled by vincent's new xhtml_style system.
Vincent: can you check this ?
Sorry for the delay.
Post by Jean-Paul Smets
Post by Bartek Gorny
dialog_id=dialog_id or 'view'
The reason is that after editing a relation there is no dialog_id, and
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
Loading...