Why does server stop when xml test raises an exception?

Asked by Numérigraphe

The 5.0.7 server stops if you run it with parameter "-i some_module" and an exception is raised by xml tests (constraint violation for example).
Should it not report the error and keep running?
Lionel

Question information

Language:
English Edit question
Status:
Solved
For:
Odoo Server (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Solved by:
Olivier Dony (Odoo)
Solved:
Last query:
Last reply:
Revision history for this message
Borja López Soilán (NeoPolus) (borjals) said :
#1

Also does stop if you do an --update=<module>.

For example if you have an unbalanced entry on the accounting, you'll discover that you cannot login to fix the problem from OpenERP, but have to use SQL instead.

Maybe he need two levels of 'exceptions':
     - Critical ones (server must display the error and stop).
     - And Errors (a warning should be displayed to the user when he logs in, but he should be able to log in to fix the problem).

Revision history for this message
Samantha (samantha-z-mathews) said :
#2

Fooops,
i hv got one, its severe assertion failure !

Revision history for this message
Best Olivier Dony (Odoo) (odo-openerp) said :
#3

Hello,

This is a feature, not a bug :-) XML files are by default assumed to contain critical data or assertions, which means that the server state could be too corrupted to safely continue running when an exception occurs.
You can however control this behavior with the --assert-exit-level server startup parameters (see the output of openerp-server.py ---help)

Note that in v6.0 we have added a 'test' section in module descriptors for adding explicit test content, which will never block server startup.

Revision history for this message
Numérigraphe (numerigraphe) said :
#4

Thanks Olivier Dony (OpenERP), that solved my question.