2014-09-12 17:55 GMT+02:00 Cédric Krier <[email protected]>: > On 12 Sep 16:29, Dominique Chabord wrote: >> hello >> >> I've never seen, up to now, a sane use of multi-company >> As far as business applisation is concerned, I don't even think it can >> be a legal approach in EU. Group reports are the worst reason to do >> it. > >> As Sebastian explained, there is a problem to move existing >> multi-companiy solutions. > > Indeed I really think it is doable to split such DB into many DB. > > - make a copy of the DB for each company > - add delete cascading on all company foreign key > - delete all but one company > - remove the delete cascading > - update the DB
I've created a simple script that helps in removing stuff. It's been quick and for the usage in a working database so there are some specific tables, but at least there's a function that can be easily used to cascade without setting cascade in all foreign keys. Of course, the latter would be better and more generic, but just in case it is useful to somebody else: https://bitbucket.org/nantic/tryton-tasks/src/e9b83654b3b4a1da0c3555401bc8c1a268f67e92/single-company.py?at=default -- Albert Cervera i Areny Tel. 93 553 18 03 @albertnan www.NaN-tic.com
