[Erp5-dev] acquire local roles removed on Sale Invoice Transaction, accepting it but not everything works

Jérome Perrin jerome at nexedi.com
Mon Sep 17 18:07:23 CEST 2007


Łukasz Nowak a écrit :
> Hello,
> 
> On 2007-09-17, 13:05:08
> Łukasz Nowak <lukasz.nowak at ventis.com.pl> wrote:
> 
>> Hello,
> (...)
> 
> I've made some more investigation. Those problems are associated with
> my workflow, which is trying to invoke getSimulationState on freshly
> created Sale Invoice Transaction.
> 
> I've checked twice - no workflows revokes View or Access Content
> Information permission from Sale Invoice Transaction portal type, but
> I'm still not able to invoke getSimulationState on freshly creating
> invoice.
> 
> So what might stopping user from invoking getSimulationState on freshly
> creating invoice? (Or any other script/method which needs permission
> View or Access Content Information)?

ERP5Type.ERP5Type.constructInstance calls _finishConstruction, which 
calls notifyWorkflowCreated before this line:
         if len(self._roles):
             self.updateLocalRolesOnSecurityGroups(ob)

notifyWorkflowCreated will pass all possible workflow transitions. If 
this is where your problem happen, can you try to call 
"updateLocalRolesOnSecurityGroups" before _finishConstruction ?

( I'm not sure updateLocalRolesOnSecurityGroups works if 
_setPortalTypeName hasn't been called before. )

Jérome



More information about the Erp5-dev mailing list