[Erp5-dev] optional actions

Jean-Paul Smets jp at nexedi.com
Wed Jul 6 00:08:50 CEST 2005


Le mardi 5 Juillet 2005 17:38, Yoshinori Okuji a écrit :
> On Tuesday 05 July 2005 09:24, Jean-Paul Smets wrote:
> > Very nice. What happens if I want to modifiy existing actions to change
> > their behaviour ? (ex. printing with a custom form layout rather than
> > the default printing action)
>
> It is not an issue about actions, but about skins, right?

Not always. Most print actions currently call a standard script which 
redirects to the current view of the portal_type and sets portal_skin=Print 
to get a PDF rendering of the current form. This is achieved by:

	Id: print
	Action: string:${object_url}/Base_printPdf
	Category: object_print

Sometimes, we would like to override this behaviour. One way would be in 
this case to move the print action definition to the page template 
(efficient but neither very clean nor very flexible).

Another way would be to override Base_printPdf so that the default print 
behaviour can be overriden by an optional action (with a Category such as 
"object_default_print" instead of "object_print")

Another issue is that sometimes, we want to change the permission or 
condition of actions to customise ERP5 for a given customer.

I like optional actions (it is simple and efficient) but I am not sure it 
solves the upgrade issue for actions which have been overriden for a given 
customer site.

JPS.

>
> YO

-- 
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




More information about the Erp5-dev mailing list