Commit Graph

325 Commits

Author SHA1 Message Date
Raphael Collet e5e00e4c0a [IMP] registry: now cursor() simply returns a cursor, which may itself be used as a context manager
bzr revid: rco@openerp.com-20140409095604-joh9dt0qkma12ykm
2014-04-09 11:56:04 +02:00
Raphael Collet f0fd48c44a [IMP] http tests: implement a test cursor that keeps a transaction open accross requests
- TestCursor subclasses Cursor, and simulates commit and rollback with savepoints
 - the registry manages a test mode, in which it only uses the test cursor
 - a reentrant lock forces the serialization of parallel requests

bzr revid: rco@openerp.com-20140408151736-j0guy68i2wjexy3d
2014-04-08 17:17:36 +02:00
Raphael Collet 6bc60505f4 [IMP] registry: add method get_cursor() to simply retrieve a new cursor, and refactor code to use it
bzr revid: rco@openerp.com-20140408125122-ki0zmin3m21k2itd
2014-04-08 14:51:22 +02:00
Raphael Collet b49f536baf [IMP] tests.common: turn class methods into instance methods (this will ease some future refactoring)
bzr revid: rco@openerp.com-20140408114936-jfagg4qvft8bk3ms
2014-04-08 13:49:36 +02:00
Raphael Collet 81b84c62b1 [IMP] registry: switch for a dummy lock only during the execution of http tests
bzr revid: rco@openerp.com-20140408094513-ahtwod1q17ijohbg
2014-04-08 11:45:13 +02:00
Fabien Meghazi 4d850cdbc9 [REV] revert refresh_routing_map
bzr revid: fme@openerp.com-20140326160150-daoc6fypcmckyynk
2014-03-26 17:01:50 +01:00
Fabien Meghazi 2eea637227 [MERGE] upstream
bzr revid: fme@openerp.com-20140326152307-d0rn3yuzel11457g
2014-03-26 16:23:07 +01:00
Fabien Meghazi 0f9905b9f1 [IMP] better syntax for routing_map cache invalidation
bzr revid: fme@openerp.com-20140320153651-4lkoekzhawny0p85
2014-03-20 16:36:51 +01:00
Fabien Meghazi 14c3ffcb39 [IMP] Allow openerp.modules.load_information_from_description_file() to take an optional mod_path argument
bzr revid: fme@openerp.com-20140319085708-prrs0m4gjvuu4o86
2014-03-19 09:57:08 +01:00
chm@openerp.com bbca8bd17e [PATCH] sle
bzr revid: chm@openerp.com-20140318122250-22bt2bcfzvxowkvf
2014-03-18 13:22:50 +01:00
Fabien Meghazi 3d2452e8d4 [FIX] Force routing map to be rebuilt between each module test suite
bzr revid: fme@openerp.com-20140317151810-tgsvv0ip4you1qko
2014-03-17 16:18:10 +01:00
Antony Lesuisse 706ef452cb [IMP] tests prepend modules names when logging
bzr revid: al@openerp.com-20140317021317-4o3l1uf2ts62w1di
2014-03-17 03:13:17 +01:00
Antony Lesuisse 38d1ca1ff2 [MERGE] trunk
bzr revid: al@openerp.com-20140227161819-p9chmskfifo0rygs
2014-02-27 17:18:19 +01:00
Xavier Morel d926581bb9 [IMP] slightly improve error message at the end of a module's failed tests
bzr revid: xmo@openerp.com-20140218101847-mwsd2zolpze1xdhf
2014-02-18 11:18:47 +01:00
Xavier Morel 33076a34aa [FIX] run_unit_tests lying about its return value: it only ever returns a bool, never None
bzr revid: xmo@openerp.com-20140218095632-r4aq7gnzj4hq9u64
2014-02-18 10:56:32 +01:00
Xavier Morel 71259f09f4 [ADD] hooks to enable/disable tests running during install
also add flag for post_install run, but not used yet

bzr revid: xmo@openerp.com-20140218095452-pptez5rlpdez1ttl
2014-02-18 10:54:52 +01:00
Xavier Morel 9a22d42b8b [IMP] unwrap tests suites during module loading, prepare for storing/filtering attributes
bzr revid: xmo@openerp.com-20140217155830-dcacx7qvyf7i0i4m
2014-02-17 16:58:30 +01:00
Xavier Morel 665e2629e2 [FIX] only run test modules called test_*, similar to normal autodiscovery
bzr revid: xmo@openerp.com-20140217151521-vyg130iznzojv3e4
2014-02-17 16:15:21 +01:00
Antony Lesuisse 91b1c8472f [FIX] ir.http testing generate a router including the current module
this fix is a dirty hack, the proper fix could be a new 'installing' state in
modules, or an improved registry object.

bzr revid: al@openerp.com-20140217005137-mhrzc4znr8rqe9yu
2014-02-17 01:51:37 +01:00
Antony Lesuisse c8324bafcc [IMP] phantomjs testing
- avoid dbmanager by presetting db in the test session
- correctly handle login option
- serialize test cursor access

bzr revid: al@openerp.com-20140216212222-4o6x9uljyua3g1og
2014-02-16 22:22:22 +01:00
Xavier Morel 13fc1e885c [FIX] missed case where sys.modules values can be None
bzr revid: xmo@openerp.com-20140214153055-xguhxigsnrzy3ejq
2014-02-14 16:30:55 +01:00
Xavier Morel a86d7a548d [IMP] use TestSuite.addTests instead of manually iterating on loadTestsFromModule results
bzr revid: xmo@openerp.com-20140214145257-2alo4dvn8rmq3xfj
2014-02-14 15:52:57 +01:00
Xavier Morel 4d32dabdd6 [IMP] replace explicit iteration by listcomp
bzr revid: xmo@openerp.com-20140214143932-8nb30mkdxzt96fd5
2014-02-14 15:39:32 +01:00
Xavier Morel 2921fa339d [REM] unused variable
bzr revid: xmo@openerp.com-20140214143724-fcxy9tn8gmodi223
2014-02-14 15:37:24 +01:00
Xavier Morel 8e63677c90 [IMP] fix flow analysis warning, simplify loader code
bzr revid: xmo@openerp.com-20140214143549-sezf14rvt0cnm2cr
2014-02-14 15:35:49 +01:00
Xavier Morel f4d155fce8 [REM] redundant logger initialization
bzr revid: xmo@openerp.com-20140214143444-z5ez21g0t61jh81u
2014-02-14 15:34:44 +01:00
Antony Lesuisse 16fd821ed6 [FIX] restore testing after patching runbot
bzr revid: al@openerp.com-20140209141912-rh3yedrmjudv8jif
2014-02-09 15:19:12 +01:00
Antony Lesuisse bd16076431 fix try to fix runbot oe command
bzr revid: al@openerp.com-20140209022520-p55nlctjru58ans5
2014-02-09 03:25:20 +01:00
Antony Lesuisse 278ed718e9 new test execution engine
remove deprecated zipfile support
add preload_registry option when server is running
allow registries to be used in contruction in test mode
add a rollback test case for http tests
add a phantomjs helper

bzr revid: al@openerp.com-20140209004005-p5pwym4sqc23vw5b
2014-02-09 01:40:05 +01:00
Olivier Dony 30513f498c [FIX] modules.loading: clear caches after test rollback, to avoid stale caches
bzr revid: odo@openerp.com-20140130153835-i5wb7nr0cwl3kjee
2014-01-30 16:38:35 +01:00
Christophe Simonis 378c908d4c [MERGE] forward port of branch saas-2 up to revid 5006 chs@openerp.com-20140129140159-9vwkpr078shoonum
bzr revid: chs@openerp.com-20140129094847-4rsg0kjio0ed0rjk
bzr revid: chs@openerp.com-20140129141002-4p8fttm8ii0ogsse
2014-01-29 15:10:02 +01:00
Christophe Simonis a69f789b41 [MERGE] forward port of branch 7.0 up to revid 5224 chs@openerp.com-20140206105141-7e8bv8ordqqsswh7
bzr revid: dle@openerp.com-20140205105045-j95kduyjiq83e57z
bzr revid: dle@openerp.com-20140114173613-ruxye1m7fxtcjfim
bzr revid: dle@openerp.com-20140116161158-u95vcs3os4tk2zob
bzr revid: dle@openerp.com-20140121172737-gzawfi3ssg7xifef
bzr revid: chs@openerp.com-20140129094554-c3abc8x3qz9mpszr
bzr revid: chs@openerp.com-20140129140159-9vwkpr078shoonum
bzr revid: chs@openerp.com-20140206110220-myn57cryam1y4k9v
2014-02-06 12:02:20 +01:00
Denis Ledoux 4aeba0c12e [FIX] modules: multi worker signaling initialize variables before loading registry
bzr revid: dle@openerp.com-20140121171836-dxs7cvqcd9nxytu1
2014-01-21 18:18:36 +01:00
Christophe Simonis a45b2c6b90 merge upstream
bzr revid: chs@openerp.com-20140117092206-ha47ryhjc4ph50nl
2014-01-17 10:22:06 +01:00
Olivier Dony 212b6bc480 [FIX] modules: set initial values for multi-process signaling to None to avoid missing events
For fresh databases, the signaling sequences in the
database stays at 1 until the installation of the
first module. If several workers are hit for this
database before the first module is installed,
this database registry will be loaded with a signaling
sequence of 1. Since  was the default value, any
signal received by workers in this state was ignored 
because they thought the registry was previously
not loaded.
Using None to indicate an  sequence value
is more accurate and avoids this error

bzr revid: dle@openerp.com-20140116151157-3zlyrg48xqn2lkd0
2014-01-16 16:11:57 +01:00
Christophe Simonis 0771ca2692 [MERGE] forward port of branch saas-2 up to revid 5002 dle@openerp.com-20140114173613-ruxye1m7fxtcjfim
bzr revid: chs@openerp.com-20140115205357-arptzm69logz3osm
2014-01-15 21:53:57 +01:00
Christophe Simonis 5269664102 [FIX] correct uses of addons_path
bzr revid: chs@openerp.com-20140115180313-pqcrfmstci2w21y8
2014-01-15 19:03:13 +01:00
Christophe Simonis a6b947d84b [FIX] migration: correct the verification of module version against running server
bzr revid: chs@openerp.com-20140110162705-6vy67xbdje507bla
2014-01-10 17:27:05 +01:00
jke-openerp b7a001866d [IMP] Move threading.currentThread().testing from load_test to load_data. The purpose is to dont send mail when we are installing the demo data
bzr revid: jke@openerp.com-20131218123858-09hitdpxxqa5uh3j
2013-12-18 13:38:58 +01:00
Christophe Simonis 56bb1b9869 [MERGE] forward port of branch saas-2 up to revid 4992 chs@openerp.com-20131202105848-33gcz1715w370rve
bzr revid: chs@openerp.com-20131127110757-5kaay2kcxq0ysb59
bzr revid: chs@openerp.com-20131127161639-yur4rdh3wx43kxle
bzr revid: chs@openerp.com-20131127180647-f8uws77gaym5kfvd
bzr revid: chs@openerp.com-20131202110030-gf20dv2uj5fqv7c2
2013-12-02 12:00:30 +01:00
Christophe Simonis c901141cec [FIX] module loading: do not warn about missing access rules for AbstractModels
bzr revid: chs@openerp.com-20131127180530-aoslbam8almrmpbl
2013-11-27 19:05:30 +01:00
Christophe Simonis ab386c0f5f [MERGE] forward port of branch saas-2 up to revid 4984 chs@openerp.com-20131125151017-lmj53bxg1pfrr4a7
bzr revid: chs@openerp.com-20131125154140-cpbk4tcdml2a3b9n
2013-11-25 16:41:40 +01:00
Denis Ledoux 6fd552c3ce [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 5139 rev-id: dle@openerp.com-20131121132305-qjlclgz5v9tze1fr
bzr revid: odo@openerp.com-20131120102545-2tlp031yib6viz35
bzr revid: chs@openerp.com-20131120161708-c8sbom592moukwxw
bzr revid: dle@openerp.com-20131121155457-lh7fzouk2upeiu16
2013-11-21 16:54:57 +01:00
Christophe Simonis cd810ea7bd merge upstream
bzr revid: chs@openerp.com-20131119185353-qfhaice61xg7qfhn
2013-11-19 19:53:53 +01:00
Martin Trigaux 7ae9e1c86d [FIX] registry: missing a threading.RLock in RegistryManager.get():
if no registry exists and several calls to RegistryManager.get() are called at the same time
by several threads, several registries will be created one after the other and only the last
one will be kept in cls.registries (courtesy of Guewen Baconnier (Camptocamp)

Invert behaviour of commit 3685 because, at that time, the new trigger the schedule_cron_jobs method which ran another lock and called get on the registry. We had a deadlock with the cron. This is no longer the case as we don't call the same method at the end of the creation of the registry and it does not trigger a lock

bzr revid: mat@openerp.com-20131114144401-k00podawlem7cjd1
2013-11-14 15:44:01 +01:00
Christophe Simonis 864af467e1 [FIX] module loading: do not warn about missing access rules for AbstractModels
bzr revid: chs@openerp.com-20131031193228-agj0qa9ceolpmvy6
2013-10-31 20:32:28 +01:00
niv-openerp 5696282656 [MERGE] saas2
bzr revid: nicolas.vanhoren@openerp.com-20131018103501-sns9zca0nmpm9efn
2013-10-18 12:35:01 +02:00
Christophe Simonis 6a1079822e [IMP] module loading: run post- migration scripts before running the tests. This allow migration of demo databases
bzr revid: chs@openerp.com-20131016100540-i9nospifzzzsilt2
2013-10-16 12:05:40 +02:00
Olivier Dony 54f740960e [MERGE] Forward-port of latest saas-1 bugfixes, up to rev. 4912 rev-id: odo@openerp.com-20131016110621-36vvlpn8dgsabyt1
bzr revid: odo@openerp.com-20131016111800-jjybreg62bwz61zn
2013-10-16 13:18:00 +02:00
Olivier Dony 8ac110c4dd [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 5098 rev-id: odo@openerp.com-20131011123914-7zuvd9mch21yxgj8
bzr revid: dle@openerp.com-20131009131902-a93nsbou4w8y0vlx
bzr revid: chs@openerp.com-20131009175454-j06y1ngylfbqyrpj
bzr revid: dle@openerp.com-20130918160049-fo88fl7uyhfoofkv
bzr revid: dle@openerp.com-20130924130544-kmkyr0d73cusvdav
bzr revid: odo@openerp.com-20131011134433-nyfjipvlql4xu127
2013-10-11 15:44:33 +02:00
Olivier Dony 088cb0255d [FIX] registry: restore `elif` changed to `if` in previous commit, for better readability (no effect)
This should have no effect because when the first `if`
is entered a new registry is instantiated with
the default value for base_cache_signaling_sequence
set to 1, preventing entering the next `if` even
without `elif`.

bzr revid: odo@openerp.com-20131011123914-7zuvd9mch21yxgj8
2013-10-11 14:39:14 +02:00
Olivier Dony 78579d289b [FIX] registry: avoid discarding registry or cache when the registry is fresh
When the sequence value is 1 it means that either:
 - the registry was just instantiated, so there is no
   reason to reload it immediately, the real checks will
   start at next request
 - the db was just created with new sequences set to 1,
   so there has been no change to reload

In both cases there is no good reason to reload the
registry, and it is actually a performance killer,
especially for cron workers that keep iterating on
the list of databases.

bzr revid: odo@openerp.com-20131011100313-4bud8e9xq2afp9z7
2013-10-11 12:03:13 +02:00
Guewen Baconnier 9c769c9a99 [FIX] missing a threading.RLock in RegistryManager.get():
if no registry exists and several calls to RegistryManager.get() are called at the same time
by several threads, several registries will be created one after the other and only the last
one will be kept in cls.registries

lp bug: https://launchpad.net/bugs/1238560 fixed

bzr revid: guewen.baconnier@camptocamp.com-20131011092632-b267vhdadh7q9som
2013-10-11 11:26:32 +02:00
Christophe Simonis fd9a9577df [MERGE] forward port of branch saas-1 up to revid 4908 dle@openerp.com-20130918160049-fo88fl7uyhfoofkv
bzr revid: chs@openerp.com-20130918171816-cxxt3c9ktcq4a8oz
2013-09-18 19:18:16 +02:00
Christophe Simonis 7081038378 [IMP] validate custom views at the end of update of database
bzr revid: chs@openerp.com-20130912182926-3lectt8mvd9smwfb
2013-09-12 20:29:26 +02:00
Christophe Simonis 4ec71c74d1 [FIX] do not run migration scripts on empty databases
bzr revid: chs@openerp.com-20130912182827-iknosbmr7kni7ulo
2013-09-12 20:28:27 +02:00
Christophe Simonis e13ffe7e11 [MERGE] forward port of branch 7.0 up to revid 5075 chs@openerp.com-20130912141018-qmcyase8zqov9d01
bzr revid: chs@openerp.com-20130906165207-1oklc8cqs0rex3kg
bzr revid: dle@openerp.com-20130909170248-a4t5y6qd5ikkhhac
bzr revid: dle@openerp.com-20130911083736-6jfkb140jxbbx7j6
bzr revid: chs@openerp.com-20130912150616-v0c383trj7gaa7eu
2013-09-12 17:06:16 +02:00
Christophe Simonis 4327e09a55 [MERGE] forward port of branch saas-1 up to revid 4903 dle@openerp.com-20130909170248-a4t5y6qd5ikkhhac
bzr revid: chs@openerp.com-20130910121230-xcr2yj6rpbo83wy0
2013-09-10 14:12:30 +02:00
Antony Lesuisse dfb9d317f2 [MERGE] data file loading refactoring, ready for code autoreload
bzr revid: al@openerp.com-20130909105523-jkffhy5gr34k25hr
2013-09-09 12:55:23 +02:00
Samus CTO (OpenERP) 4dd565b647 [FIX] modules.loading: extra loop when installing/upgrading modules to help solve missing deps
In some rare cases the dependencies have changed, and modules that depend on an uninstalled module
will not be processed on the first pass.

bzr revid: odo@openerp.com-20130909095004-n1dp2w5wnlb36742
2013-09-09 11:50:04 +02:00
Antony Lesuisse aa2a854af7 [MERGE] icon moved to description
bzr revid: al@openerp.com-20130628150755-2z42ct0p819ajtyq
2013-06-28 17:07:55 +02:00
niv-openerp ac1d0742a0 [IMP] minor improvement in RegistryManager, useful for web client
bzr revid: nicolas.vanhoren@openerp.com-20130619105335-w3xftm6g0llh1ade
2013-06-19 12:53:35 +02:00
Christophe Simonis 23f326328a [IMP] openerp.modules.migration: lint file; remove unused imports, reorder imports, reformat literal dict creation
bzr revid: chs@openerp.com-20130508105056-v4arz8d2kem5sngi
2013-05-08 12:50:56 +02:00
Christophe Simonis 4897f1740e [FIX] openerp.modules.migration: do not shadow AttributeError that may occure when executing the migrate() function
bzr revid: chs@openerp.com-20130508104658-d2553vdx0etiuhpk
2013-05-08 12:46:58 +02:00
Olivier Dony 54ad990e48 [MERGE] Forward-port of 7.0 bugfixes up to rev.4970
revision-id: odo@openerp.com-20130507104025-em6w03pcxeq92az9

bzr revid: odo@openerp.com-20130507112024-p3cukmwp7d8xm2e0
2013-05-07 13:20:24 +02:00
Quentin (OpenERP) 0d21c3eba3 [IMP] modules loading: log as INFO test files because, if they are logged as TEST, the loading statement get lost in the mass of real TEST logs in case there are a lot of test files (more visible that way) + there are no reason to special case these files
bzr revid: qdp-launchpad@openerp.com-20130507092422-co9w0qug8k9zw16n
2013-05-07 11:24:22 +02:00
Raphael Collet 05851d21ba [MERGE] from trunk
bzr revid: rco@openerp.com-20130411073017-x6e4h8xbvmy3ofdw
2013-04-11 09:30:17 +02:00
Vo Minh Thu 307ca374d6 [MERGE] forward merge 7.0 until revision 4919.
bzr revid: vmt@openerp.com-20130404130704-24vsmczw34cssytd
2013-04-04 15:07:04 +02:00
Raphael Collet b99398fa29 [IMP] registry: make class Registry inherit from abstract class collections.Mapping
bzr revid: rco@openerp.com-20130404102524-innz9qu824yfds4b
2013-04-04 12:25:24 +02:00
Vo Minh Thu 27ab383508 [FIX] loading: typo.
lp bug: https://launchpad.net/bugs/1162753 fixed

bzr revid: vmt@openerp.com-20130402092914-cqrjxveg66gbpm3s
2013-04-02 11:29:14 +02:00
Raphael Collet 09be864f1d [IMP] replace all tests like 'registry.get(X)' by 'X in registry' where X is non static
bzr revid: rco@openerp.com-20130329140723-dnrl02saky570xg0
2013-03-29 15:07:23 +01:00
Raphael Collet d3657d858f [IMP] registry: add convenience operators ('in' and 'iter') on registry objects
bzr revid: rco@openerp.com-20130329135853-woi26cl2yiofv7h2
2013-03-29 14:58:53 +01:00
Vo Minh Thu 4ed7ec95b7 [MERGE] removed LocalService("workflow"), Logger class, and TEST log level.
bzr revid: vmt@openerp.com-20130327170639-uamgg7shlmtxgpxv
2013-03-27 18:06:39 +01:00
Vo Minh Thu d6ea526e36 [MERGE] openerp.pooler is deprecated.
bzr revid: vmt@openerp.com-20130327164045-ziw4lj50owdvmfbw
2013-03-27 17:40:45 +01:00
Vo Minh Thu 7b8f4fe5ee [REF] tests: use the openerp.tests namespace for test-related logging.
bzr revid: vmt@openerp.com-20130327153843-u62ftp74qv01u1ww
2013-03-27 16:38:43 +01:00
Vo Minh Thu 1e7e2ca753 [REF] no longer use openerp.pooler.
Either use openerp.modules.registry.RegistryManager when the full
new() signature is needed, or use openerp.registry().

Replaced also some pool.get() with pool[] because KeyErrors
are better than AttributeErrors on None.

bzr revid: vmt@openerp.com-20130327111014-2i0hlvpy5y5ku7hm
2013-03-27 12:10:14 +01:00
Vo Minh Thu 684bd35442 [REF] registry: begin to remove openerp.pooler:
- call openerp.modules.registry.RegistryManager instead
- expose openerp.get_pool()

bzr revid: vmt@openerp.com-20130327093125-iqsyvvjm0ej7do14
2013-03-27 10:31:25 +01:00
Vo Minh Thu a4fbd26541 [REF]: use openerp.workflow instead of LocalService("workflow").
bzr revid: vmt@openerp.com-20130326162040-kkq46wrur3pgn6eh
2013-03-26 17:20:40 +01:00
Vo Minh Thu c313b4073a [REF] logging: removed pseudo log-level TEST.
When --test-enable is used, it is expected that test output is visible,
thus using log-level INFO is natural.

On the down side you lose the nice blue hint that tests did actually
run when --log-level test was given.

bzr revid: vmt@openerp.com-20130326155844-83e2tcqokvblr0ln
2013-03-26 16:58:44 +01:00
Vo Minh Thu b08d7ef6bd [REF] ir.actions.report.xml: register_all do not make sense any more:
auto=True reports are looked up in the database for each rendering, so they do
no have to be in the report registry any longer.
auto=False reports will register themselves but at this point
they can be updated to use the new `parser` XML attribute.

bzr revid: vmt@openerp.com-20130322153955-s6nyux2pyez6c01w
2013-03-22 16:39:55 +01:00
Vo Minh Thu ef127fddc7 [IMP] netsvc: removed unused import.
bzr revid: vmt@openerp.com-20130222145250-qd9v52tu2xt8jyb2
2013-02-22 15:52:50 +01:00
Vo Minh Thu b985c7302f [FIX] openerp namespace: the import hook was still inserting modules in sys.moduls at their shortname.
bzr revid: vmt@openerp.com-20130218164839-2qludhn3znpdftq5
2013-02-18 17:48:39 +01:00
Vo Minh Thu 9f9c9585a1 [REF] Removed support for __terp__.py files and `terp` root elements in XML files.
bzr revid: vmt@openerp.com-20130212152328-flpn1tbz75lhi2m2
2013-02-12 16:23:28 +01:00
Vo Minh Thu 96f7f49b3e [MERGE] Latest bugfixes from 7.0, up to rev 4834.
bzr revid: vmt@openerp.com-20130212104546-v2w5k59egx1fiony
2013-02-12 11:45:46 +01:00
Vo Minh Thu e746cb1654 [FIX] registry: fix a bug where RegistryManager.new() could return an out-of-date registry.
bzr revid: vmt@openerp.com-20130212085311-o53wv7yful39kktd
2013-02-12 09:53:11 +01:00
Vo Minh Thu 69fefde965 [IMP] The open openerp namespace is removed.
bzr revid: vmt@openerp.com-20130209060246-o7qs51c2uc0kecjo
2013-02-09 07:02:46 +01:00
Christophe Simonis 4857a8a020 [FIX] module loading: call adapt_version() instead of computing it ourself
bzr revid: chs@openerp.com-20130117135108-a4wt4wtbtfdwiui3
2013-01-17 14:51:08 +01:00
Raphael Collet e7ce4a4529 [MERGE] from trunk
bzr revid: rco@openerp.com-20121221134259-scc92nby1dn91pe8
2012-12-21 14:42:59 +01:00
Olivier Dony 4fd1bc7b3c [IMP] cron: remove useless pooljobs and schedule_cron_jobs methods
The pooljobs and scheduled_cron_jobs stuff was only used to
delay the processing of cron jobs until after the registry
was fully loaded. However this is already the case because
RegistryManager.new() only sets the flag at the end of the
init step.
The flag was named `registry.cron` but simply meant that the
registry was fully loaded and ready, so it is simpler to
rename it to `registry.ready`.

In multiprocess mode this flag is enterily irrelevant
so there is no need to selectively set it to True or
False. `registry.ready` is simpler.

bzr revid: odo@openerp.com-20121221133751-h4x670vblfr3d09e
2012-12-21 14:37:51 +01:00
Olivier Dony e373ac5aeb [MERGE] *: fix/rationalize db logging to avoid incorrect values during logging
The setting/clearing of the tracking were not done
consistently, causing log messages that appeared
to come from one database while coming from another
one or none at all.

The tracker is now set at the earliest points
of request handling as possible:
- in web, when creating WebRequests (dbname, uid)
- at RPC dispatching in server (uid)
- at cron job acquisition in CronWorker (dbname)
- at Registry acquisition in RegistryManager (dbname)


The tracker is cleared at the very entrance of
the request in the WSGI `application`, ensuring
that no logging is produced with an obsolete
db name. (It cannot be cleared at the end of
the request handling because the werkzeug
wrapper outputs more logging afterwards)

bzr revid: odo@openerp.com-20130301182510-1fqo9o8di0jw95b5
2013-03-01 19:25:10 +01:00
Olivier Dony 9770caedf3 [FIX] registry: another pass of cleanup for registry signaling
Some important points to consider:
 - signaling should be done after any schema alteration (including module [un]installation),
   service registration (e.g. reports)
 - the changes need to be committed to the database *before* signaling, otherwise an
   obvious race condition occurs during reload by other workers
 - any call to restart_pool() must be considered a possible candidate for
   signaling, and the 2 above conditions must be checked

The number of explicit calls was reduced by forcing the signaling at the end of
Registry.new() in case `update_module` was passed as True. In that situation
we always want to signal the changes - so all the redundant signaling calls
can be centralized. We can also assume that the relevant changes have already
been committed at that point, otherwise the registry update would not
have worked in the first place.
This means that there is no need for explicit signaling anymore everytime
`restart_pool` is called with `update_module=True`.

Some missing cr.commit() and explicit signaling calls were added or
moved to the right place. As a reminder: signaling must be done
*after* committing the changes, and usually *after* reloading the
registry on the current worker.

bzr revid: odo@openerp.com-20130301143203-e2csf5pkllwhmwqs
2013-03-01 15:32:03 +01:00
Olivier Dony db81edc287 [FIX] *: fix/rationalize db logging to avoid incorrect values during logging
The setting/clearing of the tracking were not done
consistently, causing log messages that appeared
to come from one database while coming from another
one or none at all.

The tracker is now set at the earliest points
of request handling where we can:
- in web client, when creating WebRequests (dbname, uid)
- at RPC dispatching in server (uid)
- at cron job acquisition in CronWorker (dbname)
- at Registry acquisition in RegistryManager (dbname)


The tracker is cleared at the very entrance of
the request in the WSGI `application`, ensuring
that no logging is produced with an obsolete
db name. (It cannot be cleared at the end of
the request handling because the werkzeug
wrapper outputs more logging afterwards)

bzr revid: odo@openerp.com-20130301120744-jfitcmze2jldecod
2013-03-01 13:07:44 +01:00
Antony Lesuisse 1a5b4160ef [FIX] logging level of pooler loading, number of modules is info, the actual list of modules is debug
bzr revid: al@openerp.com-20130218121441-i8tidklmhafudp4k
2013-02-18 13:14:41 +01:00
Antony Lesuisse 565853b732 [MERGE] trunk
bzr revid: al@openerp.com-20121219030106-i59u10tml3baqvun
bzr revid: al@openerp.com-20121219150107-8l92w2bi510yem45
2012-12-19 16:01:07 +01:00
Raphael Collet 95b41b40e9 [IMP] register_hook: improve a bit the code
bzr revid: rco@openerp.com-20121219132138-npf12n5l5ug6ujvx
2012-12-19 14:21:38 +01:00
Raphael Collet fd5dee2267 [MERGE] from trunk
bzr revid: rco@openerp.com-20121219130750-3ljqo3dyz05zww08
2012-12-19 14:07:50 +01:00
Olivier Dony 9f77d2e2f4 [FIX] orm,registry: properly check m2o FKs during model update + fix some models `auto_init`ed multiple times
The case where no constraint existed at all was not working,
and after fixing it, the ORM started to re-create the same
constraints multiple times for some modules. This was for
models that are split within a module (such as res.users in
base, which is made of several small classes): all the
partial models were going through _auto_init instead
of only the final one - doing useless extra work.
      
Unfortunately establishing the FK happens before the
XML data files are loaded, so a number of FK and
NOT NULL constraints failed to apply due to missing
tables/records. base.sql had to be extended a bit
to cover these cases in a minimalist fashion

bzr revid: odo@openerp.com-20121217214645-av9n003yzterhujw
2012-12-17 22:46:45 +01:00
Christophe Simonis 0c7f17c0ac merge upstream
bzr revid: chs@openerp.com-20121217172614-3z1pstu5th26wuuc
2012-12-17 18:26:14 +01:00
Olivier Dony f0c826cec6 [IMP] loading.py: lint cleanup - unused code
bzr revid: odo@openerp.com-20121217151626-1pbzf7mxh9inx1y9
2012-12-17 16:16:26 +01:00
Antony Lesuisse 14ad37779c cleanups
bzr revid: al@openerp.com-20121216015214-kfo6zlarh4gdccrx
2012-12-16 02:52:14 +01:00