[Erp5-dev] erp5_csv_style global action prio patch

Łukasz Nowak lukasz.nowak at ventis.com.pl
Fri Sep 14 10:10:03 CEST 2007


Hello,

On 2007-09-14, 09:35:21
Jérome Perrin <jerome at nexedi.com> wrote:

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

OK, I'm sure your theory is correct :)

But I've set up fresh site, and actions from portal_properties was
shown before actions from portal_types. Used revision was 16327. I've
checked portal_actions/manage_actionProviders and portal_types is above
portal_properties - but changing its priority cause showing actions
from portal_properties before portal_actions on Sale Packing List
portal type. It might be may failure/misconfiguration - is anyone able
to reproduce it? (I'll do it myself in short time).

Luke

-- 
Łukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 768 16 85 fax: +48 32 392 10 61
``Use the Source, Luke...''



More information about the Erp5-dev mailing list