Commit Graph

140 Commits

Author SHA1 Message Date
Raphael Collet ab3ec1ef6c [IMP] openerp/http.py: accept mimetype application/json-rpc for json-rpc calls 2014-09-09 10:11:33 +02:00
Olivier Dony d32d120a0a [MERGE] Forward-port of saas-5 up to 9ce08b7 2014-09-08 16:54:10 +02:00
Xavier Morel 7558e2e786 [IMP] distribute branding on @groups instead of disabling edition
Avoids 2 rendering passes, and allows editing e.g. events detail page, which
couldn't be done (due to groups=public in a mail component)

fixes #1994
2014-09-08 11:16:06 +02:00
Fabien Meghazi c981d068ab [FIX] Restore /login redirection on SessionExpired
The feature was broken due to an incompatibility
when forward porting 624f256 and a78e27f
2014-09-05 16:24:59 +02:00
Christophe Simonis 0f122cc50c [FIX] http.py: session id is `sid` attribute 2014-09-01 15:49:26 +02:00
Xavier Morel cccd3c888f [ADD] openerp.http reference doc
* fix some docstrings so they can be autodoc'd
* intersphinx mapping (and links to) werkzeug and python
2014-09-01 14:16:14 +02:00
Fabien Meghazi 34c5a5cf9c [IMP] Increase statics cache from 12 hours to 1 week 2014-08-27 16:54:25 +02:00
Christophe Simonis e5b0933743 [FIX] data-dir management
- sessions are now shared between series.
- use site data dir instead of user data dir if user has no home dir.
- in http and module handling, `data-dir` was used before being
initialized, using the default value instead of user input

(fixes #308, #904)
2014-07-07 15:49:24 +02:00
Raphael Collet cbe2dbb672 [MERGE] new v8 api by rco
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.

- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
2014-07-06 17:05:41 +02:00
Olivier Dony 668b8c2b2d [FIX] Forward-port of saas-5 up to 0d330ca 2014-06-25 18:58:19 +02:00
Olivier Dony 0d330ca25c [MERGE] Forward-port of saas-4 up to fa739ac 2014-06-25 18:44:51 +02:00
Olivier Dony 4d488408b2 [MERGE] Forward-port of saas-3 up to 141e1b2 2014-06-25 18:34:03 +02:00
Olivier Dony 141e1b2615 [FIX] http.dispatch: call handle_exception() even w/ session missing/expired
This gives JSONRequests a chance to return
a proper JSON-RPC result when an HTTPException
is raised downstream, instead of returning a
plain HTML 404 error.
2014-06-25 17:41:40 +02:00
Christophe Simonis e862ff7033 [MERGE] forward port of branch saas-5 up to 4cb5381
Conflicts:
	openerp/addons/base/module/wizard/base_module_upgrade_view.xml
2014-06-22 15:36:10 +02:00
Christophe Simonis 4cb5381dee [MERGE] forward port of branch saas-4 up to 1f20f61 2014-06-22 15:33:22 +02:00
Christophe Simonis 1f20f61ab4 [MERGE] forward port of branch saas-3 up to 75884c3 2014-06-22 15:30:57 +02:00
Fabien Meghazi fef8077df3 git commit -a -mm 2014-06-18 16:56:46 +02:00
Fabien Meghazi 624f256f61 Changed as per the recommandation of Sir Odo 2014-06-18 14:31:16 +02:00
Xavier Morel e555855f07 [ADD] ability to trigger retrying rendering with an updated rendering context 2014-06-17 11:29:11 +02:00
Augustin Cisterne-Kaas 1dfa3946b5 [IMP] Db filter %h
Db filter %h skips www subdomain.
2014-06-05 16:09:04 +02:00
Christophe Simonis 70041a5f1b [FIX] routing_map: correct subclasses detection.
Subclass detection didn't include the class itself if all it's subclasses
were invalid. As we create a new regrouping subclass, that was always the
case after a registry reloading, causing subclassed controllers to not be
taken in account.

[IMP] routing_map: clean code a little bit
2014-06-03 17:55:34 +02:00
Christophe Simonis 45d42d0134 [FIX] http: change the way the routing map is build
Instead of only taking direct subclasses of controllers, take the lowest controller in the hierarchy
Allowing subclassing controllers
2014-06-02 15:38:02 +02:00
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