Discussion:
[Erp5-dev] Copy or Move for Assignor in modules?
Łukasz Nowak
2006-11-14 15:57:25 UTC
Permalink
Hello,

I was wondering if it would be good, to set Copy or Move permission for
Assignor role in default configuration? It's not set in
Base_setDefaultSecurity, but than using system is not nice. I was
looking in wiki for any guideline, but w/o succes.

Patch attached.

Bye,
Luke
--
?ukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 392 10 60 int 37 fax: +48 32 392 10 61
https://ssl.ventis.com.pl/keys/lukasz.nowak.pub.asc
``Use the Source, Luke...''
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Base_setDefaultSecurity.xml.patch
Type: text/x-patch
Size: 402 bytes
Desc: not available
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20061114/3f29318f/attachment.bin>
Jérôme Perrin
2006-11-14 16:18:52 UTC
Permalink
Post by Łukasz Nowak
Hello,
I was wondering if it would be good, to set Copy or Move permission for
Assignor role in default configuration? It's not set in
Base_setDefaultSecurity, but than using system is not nice. I was
looking in wiki for any guideline, but w/o succes.
Hello,

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

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

J?rome
Łukasz Nowak
2006-11-16 10:15:09 UTC
Permalink
Hello J?r?me,

(I'm replying like that, because you email hasn't arrvied)
Post by Jérôme Perrin
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.
Post by Jérôme Perrin
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?

Thanks,
Luke
--
?ukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 392 10 60 int 37 fax: +48 32 392 10 61
https://ssl.ventis.com.pl/keys/lukasz.nowak.pub.asc
``Use the Source, Luke...''
Jérôme Perrin
2006-11-16 14:10:35 UTC
Permalink
Post by Łukasz Nowak
Hello J?r?me,
(I'm replying like that, because you email hasn't arrvied)
(should be ok now)
Post by Łukasz Nowak
Post by Jérôme Perrin
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.
Post by Jérôme Perrin
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

Loading...