This branch makes a few changes to the server to make it possible 1/ to install 
the demo data, 2/ to run the tests with a single update (i.e. the -u 
command-line flag) and have the tests pass.

This is intended to somewhat test a migrated database (which would normally not 
contain the demo data necessary to properly run the tests). The only trick is 
to set demo=True on the ir_module_module table before proceeding to the update.

So let's go through this.

- Changes in openerp/addons/base/ir/workflow/print_instance.py don't matter, 
this is just some minimal refactoring and exposes the ability to dump workflows 
as SVGs on disk.

- The if self.pool._init and False: in orm.py should clearly be reverted. This 
means that computing the left/right parents can't be deferred to after the 
tests (i.e. some tests need that information to be available).

- Changes in openerp/tests/test_ir_sequence.py are made to make sure the tests 
on ir_sequence can be played over again (i.e. one run doesn't affect the next 
run).

- Changes in openerp/tools/convert.py are made so we know which data are fresh 
(i.e. we just created them while reading the imported file): if the data is 
new, let the workflow run. Maybe it is not necessary any more because of the 
new noupdate semantic (see next bullet point).

- Changes in openerp/modules/loading.py: noupdate is forced only for CSV files. 
Otherwise, the noupdate attribute is honored (previously, demo data were always 
in noupdate).

- The openerp/workflow sub-module is changed to ignore activities and 
transitions that are available in db but defined by modules not already loaded 
(this is necessary to let workflows run in tests, while being in the middle of 
the update module graph).
-- 
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-for-caribou-jam/+merge/118926
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-server/trunk-for-caribou-jam.

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to