Commit Graph

118 Commits

Author SHA1 Message Date
Olivier Dony 04211015fc [MERGE] Forward-port of latest saas-4 fixes, up to 0452851 2014-05-27 20:49:49 +02:00
Olivier Dony fd21abd847 [MERGE] Forward-port latest saas-3 bugfixes, up to 30f43da 2014-05-27 17:18:43 +02:00
Denis Ledoux 51c7b55da0 [FIX] request.handle_exception: cleanup override logic, fixed chain broken by commit a096ae0
handle_exception() is supposed to try handling an exception and if it cannot,
re-raise it. Overridden methods must therefore call super() within a try/except
block, and only attempt to handle the exception if super() raised.
2014-05-23 13:15:52 +02:00
Denis Ledoux c0e9a15960 [MERGE] Forward-port of latest saas-3 bugfixes, up to rev. a096ae0080 2014-05-22 09:35:26 +02:00
Martin Trigaux a096ae0080 [FIX] http: force rolleback for failed http request
1st issue:
When an exception was raised, it was badly handled by the website in case of
website_enabled key. The response page was generated without calling super.
The WebRequest object being responsible to rollback the transaction in case
of errors.

2sd issue:
The _failed attribute is required to rollback the transaction in an WebRequest
object. Previously it was only set in the JsonRequest object (which inherit
from WebRequest), replace by call to super. The attribute _failed is now set
in the WebRequest object.
2014-05-21 19:12:37 +02:00
Xavier Morel 8c86be0c60 [FIX] indentation and formatting of various rst snippets 2014-05-19 13:59:17 +02:00
Xavier Morel f41fde480d [FIX] rST warnings & errors 2014-05-19 08:31:09 +02:00
Fabien Meghazi e9572c56b3 [IMP] monodb selects first database if only one match. Even if db-filter was not provided
bzr revid: fme@openerp.com-20140508083921-pu2zte8fq69wvo8o
2014-05-08 10:39:21 +02:00
Antony Lesuisse 7e25b9ae55 [MERGE] saas-4 report_webkit missing dependency on report
bzr revid: al@openerp.com-20140501152604-4cobh5ui47dt4pem
bzr revid: al@openerp.com-20140501155633-gefnc3zqcsr2rhaz
bzr revid: al@openerp.com-20140501161156-4wbsvhh8gz4r22h3
2014-05-01 18:11:56 +02:00
Antony Lesuisse c9873fb0b4 [FIX] http Internal Server Error when switching branches
When the source code doesnt match ir.models of the current session database,
openerp is unable to build a registry, we now clear the session instead of
issuing an http 500 error.

bzr revid: al@openerp.com-20140429232213-omao31x6fdxwg2ov
2014-04-30 01:22:13 +02:00
Fabien Meghazi db9448f8d2 [MERGE] upstream
bzr revid: fme@openerp.com-20140429142601-5pgb4l701c0deg58
2014-04-29 16:26:01 +02:00
Fabien Meghazi 2248056167 [FIX] routing_type meta info was populated too late in routing_map()
Could not call methods outside of an http request context

bzr revid: fme@openerp.com-20140429130916-7zuyzhf2ebcrlbhn
2014-04-29 15:09:16 +02:00
Denis Ledoux be43d5bdfd [FIX] http: set back the gen_session_id controller, because still used by openframework.js of web branch
Related to revision 5124 revid:al@openerp.com-20140316141311-m0xqh386ax952va1

bzr revid: dle@openerp.com-20140424135507-5130yyy5brpfqd5f
2014-04-24 15:55:07 +02:00
Fabien Meghazi 8370d3f60e [MERGE] upstream
bzr revid: fme@openerp.com-20140423123808-q58dtl8a0bb2ymlf
2014-04-23 14:38:08 +02:00
Christophe Simonis 66ba3092cf [FIX] http: correct detection of old (v7) routes that still take "req" as first argument
bzr revid: chs@openerp.com-20140418115556-717tlcwejszmi0lb
2014-04-18 13:55:56 +02:00
Fabien Meghazi 4cc3ed6fab [MERGE] trunk
bzr revid: fme@openerp.com-20140410173630-eq1uh58nba7yptf8
2014-04-10 19:36:30 +02:00
Fabien Meghazi c1dc467701 [WIP] AssetsBundle
bzr revid: fme@openerp.com-20140409161758-3hye6u21rjmoiio9
2014-04-09 18:17:58 +02:00
Raphael Collet 5640f3076a [MERGE] test_cursor: implement a cursor mockup that never commits to database, and use it for http tests
bzr revid: rco@openerp.com-20140409145830-rop8esgic2y435kf
2014-04-09 16:58:30 +02:00
Raphael Collet fd8fd0906f [IMP] make TestCursor more robust, and remove some tests on tools.config['test_enable']
bzr revid: rco@openerp.com-20140409103337-r0a1nx9h8nfg3cn3
2014-04-09 12:33:37 +02:00
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
Fabien Meghazi cbb5488f97 [ADD] t-call-assets
bzr revid: fme@openerp.com-20140408075205-9v8fxg786jj0fj77
2014-04-08 09:52:05 +02:00
Christophe Simonis 0161666e8b [MERGE] forward port of branch saas-3 up to revid 5112 chs@openerp.com-20140407144238-3s38zadkh7yxpdy7
bzr revid: chs@openerp.com-20140407160548-ttuc877kknuycoqw
2014-04-07 18:05:48 +02:00
Olivier Dony 8809c77f60 [FIX] http,ir.http: refactor exception handling to allow request-specific handling
Typically an exception during a JSON-RPC request must be
handled specifically and return a JSON-RPC error in all
cases. Previously the _authenticate() step could fail
during ir_http.dispatch() and bubble up to werkzeug,
yielding a dumb "Internal Server Error 500" even for
a JSON-RPC request.

bzr revid: odo@openerp.com-20140328142748-00haplmkc3fv6f9y
2014-03-28 15:27:48 +01:00
Fabien Meghazi 2eea637227 [MERGE] upstream
bzr revid: fme@openerp.com-20140326152307-d0rn3yuzel11457g
2014-03-26 16:23:07 +01:00
Fabien Meghazi f86967960d [MERGE] upstream
bzr revid: fme@openerp.com-20140325153725-67hb463km4yvsnoe
2014-03-25 16:37:25 +01:00
chm@openerp.com 105c26e623 [MERGE] from trunk
bzr revid: chm@openerp.com-20140324082422-38x5kcnh830200wl
bzr revid: chm@openerp.com-20140325084953-s3sl2f1un7z08wxy
2014-03-25 09:49:53 +01:00
Christophe Simonis a8e1aba23b [FIX] http: when generating static routes, only wrap dispatcher only if there is any new static directory found
bzr revid: chs@openerp.com-20140324161257-fi1cpgyd97825b14
2014-03-24 17:12:57 +01:00
Christophe Simonis 7c4557add2 [FIX] http: nodb_routing_map become a lazy property. load_addons() is also lazy called
bzr revid: chs@openerp.com-20140324122610-dodj6tme5xpbkc3i
2014-03-24 13:26:10 +01:00
Christophe Simonis 58bd4d4950 [FIX] http: register the wsgi handler directly
bzr revid: chs@openerp.com-20140324093116-fuunq90t9qb5p8w5
2014-03-24 10:31:16 +01:00
Antony Lesuisse 666f4d0801 [MERGE] trunk
bzr revid: al@openerp.com-20140319235117-7trt1y3927mml13u
2014-03-20 00:51:17 +01:00
Fabien Meghazi 46cfd8940f [FIX] doc typo
bzr revid: fme@openerp.com-20140319085454-1pnjm55b4vxfm1wc
2014-03-19 09:54:54 +01:00
chm@openerp.com 17956befd7 [FIX] do not rolback cursor in test mode
bzr revid: chm@openerp.com-20140318160941-w4c8r15sl0vag0sa
2014-03-18 17:09:41 +01:00
chm@openerp.com cb6af2b2f0 merge upstream
bzr revid: chm@openerp.com-20140318160653-2l1t1ntzr1lpuwo9
2014-03-18 17:06:53 +01:00
chm@openerp.com c0a97887b4 [WIP] rev me
bzr revid: chm@openerp.com-20140318153525-uhimflitcgk16rlk
2014-03-18 16:35:25 +01:00
Christophe Simonis 8f8ca3bd84 [MERGE] forward port of branch saas-3 up to revid 5093 chs@openerp.com-20140318114540-l50kmo4azb57g31x
bzr revid: chs@openerp.com-20140318124112-cj65l3wysk2rhwlw
2014-03-18 13:41:12 +01:00
Antony Lesuisse 0b7a673821 [MERGE] trunk
bzr revid: al@openerp.com-20140317223549-gyhpe8dkzaw0qe7z
2014-03-17 23:35:49 +01:00
Olivier Dony f0d4240082 [FIX] http dispatch: make sure transaction rollback happens in all cases when request handling raised (to be refactored)
Not doing so leads to cases where a transaction is committed
even after failing to validate a Python constraint.
This patch attempts to keep the rollback() logic next to the
corresponding commit(), and makes the rollback() more
explicit even if close() without commit() would also rollback
implicitly.

bzr revid: odo@openerp.com-20140317163228-zqbce8f0rgcg0pt4
2014-03-17 17:32:28 +01:00
Antony Lesuisse 627b5b671e [FIX] tests dont log traceback on aborted request while testing
bzr revid: al@openerp.com-20140317135239-08aefkdxiil7bpcs
2014-03-17 14:52:39 +01:00
Antony Lesuisse 338c0a3f5e [FIX] race condition for test cursors
If a test ends before handling all its http queries (serialised by a Rlock),
threads created for unfufilled queries may hang because the interrupted thread
might not have unlocked its cursor as it might have dissapeared from
HTTP_SESSION before request release_test_cursor. We now use the cursor itself
instead of HTTP_SESSION.

bzr revid: al@openerp.com-20140317031448-rffj7gixgk8jzeqp
2014-03-17 04:14:48 +01:00
Antony Lesuisse 3168c3c1ca [MERGE] trunk
bzr revid: al@openerp.com-20140316183515-fthpvudn1rbmru4q
2014-03-16 19:35:15 +01:00
Antony Lesuisse e9d047e611 sql loggin cleanups
- prepare for netsvc will be renamed to logging
- move back log from http.py has it's used by the cron
- move sql handler to netsvc, simplify to use sql_db
- remove unused handler
- close plaform specific #ifdef pandora's box

bzr revid: al@openerp.com-20140316182933-jkcji9yqfbsokcmg
2014-03-16 19:29:33 +01:00
Antony Lesuisse 5b21fc0225 [REM] http useless controller
bzr revid: al@openerp.com-20140316141311-m0xqh386ax952va1
2014-03-16 15:13:11 +01:00
Stephane Wirtel 4bbcfddc13 [MERGE] from trunk
bzr revid: stw@openerp.com-20140312102948-1n3b2d1vqedzojzb
2014-03-12 11:29:48 +01:00
Christophe Simonis 96f744b271 [MERGE] forward port of branch saas-3 up to revid 5088 chs@openerp.com-20140311095550-lg3nvvjyojvgp2po
bzr revid: chs@openerp.com-20140311133850-11bw9vv90e40clw1
2014-03-11 14:38:50 +01:00
Christophe Simonis e634545617 [FIX] http: ensure to clean the request cursor before calling the route function.
The route function can be call more than once in case of database error,
breaking the request cursor. By rollbacking it, we force the creation of a new transaction.

bzr revid: chs@openerp.com-20140311095550-lg3nvvjyojvgp2po
2014-03-11 10:55:50 +01:00
Kersten Jeremy a94df36bdb [FIX] Remove default tz from context, to allow website (Public user) to usecorrect timeZone. Now event (eg) will be displayed with the TimeZone of "Public User" by default
bzr revid: jke@openerp.com-20140303094159-sh4ixlr6f7uojlft
2014-03-03 10:41:59 +01:00
Stephane Wirtel 5918ad323e [MERGE] from Trunk
bzr revid: stw@openerp.com-20140228161338-8yjlkwacuube7vir
2014-02-28 17:13:38 +01:00
Stephane Wirtel 047d071a48 [IMP] Add a new Logging Handler, where we will store in the database of OpenERP.
this database can be overrided via the --log-pgsql-database

bzr revid: stw@openerp.com-20140228161147-s9nnrfq2tc94vq5p
2014-02-28 17:11:47 +01:00