[Erp5-dev] erp5_csv_style global action prio patch

Jérome Perrin jerome at nexedi.com
Fri Sep 14 09:35:21 CEST 2007


Łukasz Nowak a écrit :
> Hello,
> 
> I think that prio of import/export csv is too high - eg. on Sale
> Packing List it is showed before packing.

Hello,

The priority here is only used to order actions when installing them by 
a business template (simply because business template system doesn't 
keep ordering of subobjects).

When rendering actions, we use CMFCore's ActionsTool:

     def listFilteredActionsFor(self, object=None):
...
         # Include actions from specific tools.
         for provider_name in self.listActionProviders():
             provider = getattr(self, provider_name)
             if IActionProvider.isImplementedBy(provider):
                 actions.extend( provider.listActionInfos(object=object)
...

'packing' action is from 'portal_types' action provider, csv actions are
from 'portal_properties' action provider. So for this case, only the 
order of listActionProviders makes the difference.

I have put those csv "global" actions on portal_properties, because it 
comes after portal_types in listActionProviders, to have csv actions 
after portal type actions. ( The order of actions providers is 
configured on portal_actions/manage_actionProviders )

So in theory this patch is not necessary

Jérome



More information about the Erp5-dev mailing list