[Erp5-dev] Copy or Move for Assignor in modules?
Jérôme Perrin
jerome at nexedi.com
Thu Nov 16 15:10:35 CET 2006
Le Jeudi 16 Novembre 2006 11:15, Łukasz Nowak a écrit :
> Hello Jérôme,
>
> (I'm replying like that, because you email hasn't arrvied)
(should be ok now)
> > Copy and paste can have many consequences, because all properties are
> > copied (except uid and workflow history that are always resetted).
> > For example, when copy & pasting an invoice, invoice number must be
> > resetted. That's why we extended manage_afterClone to call a script based
> > on the portal type ( see testERP5Type or Invoice_afterClone for usage
> > examples).
>
> Ok, got it - so I have to be more careful in such situations, and check, if
> that document might be copied.
>
> > So, when you are sure that documents in a module supports copy and paste,
> > just add this permission on the module, or manage it by those documents
> > workflow ( btw, is the permission checked on the module or on documents ?
> > )
>
> I've checked that permission on modules. AFAIS for example
> accounting_module document's shouldn't be copied, but sale_order_module
> document's might be?
As long as you implement an after clone script to reset properties that have
to be resetted, any document can be copied.
With Invoice_afterClone, it should be ok to copy / paste documents in
accounting_module.
For Orders, it's probably ok too.
Jérome
More information about the Erp5-dev
mailing list