Commit Graph

17 Commits

Author SHA1 Message Date
Xavier Morel 0546993327 [FIX] merge from trunk and fix handling of view inheritance
main problem, view inheritance model field would use model from the
root view (after following inherit_id links) rather than the base view
(the requested one) -> with divergent models, it was possible for the
requested view itself to never be returned.

bzr revid: xmo@openerp.com-20131212134422-uxg6h21w1jhth9ow
2013-12-12 14:44:22 +01:00
Thibault Delavallée 1a16ecf8c2 [FIX] http: correctly handle the rollback when an exception is raised. Indeed dispathc serializes the exception, leading to the error being catched before we check and rollback the transaction. This commit fixes this.
bzr revid: tde@openerp.com-20131211112304-m2591t7endfetptc
2013-12-11 12:23:04 +01:00
Fabien Meghazi cc49b88487 [ADD] status_code to LazyResponse constructor
bzr revid: fme@openerp.com-20131204145613-721x3ij2ylpykzgw
2013-12-04 15:56:13 +01:00
Antony Lesuisse 447255e021 [FIX] http response handling inside request context
bzr revid: al@openerp.com-20131203215640-ev45het902u6afls
2013-12-03 22:56:40 +01:00
Antony Lesuisse 43979cfd8f [IMP] http improvement
- context manager request object (removes some ugly hacks)
- improve http error handling
- add lazyresponses

bzr revid: al@openerp.com-20131203190639-e8r1qm9wc82t8g4k
2013-12-03 20:06:39 +01:00
Christophe Simonis 28581cc734 [MERGE] manual forward port of changes made in http dispatching in saas-2 branch since last web revid 3865 dle@openerp.com-20131023113414-mlwppd4d7vyh1tyj
bzr revid: chs@openerp.com-20131125165804-0d25q1vn5z0y9nv8
2013-11-25 17:58:04 +01:00
Xavier Morel 0ece469392 [FIX] bunch of broken stuff over http requests in new routing thing
* make ModelConverter use its regex for data extraction so
  replacements can just fixup the request and don't have to mess with
  _uid

* replace routing_map property by method, for unknown reasons the
  property does not work at least overridden (it's not found) and I
  don't care enough to wonder why

* arguments result from MapAdapter.match() is a mapping, not a
  sequence. Iterate through values()/itervalues() otherwise we'll
  never get a browse_record to do the uid substitution on, only
  strings (params names)

* inject arguments from URL map/match into the function before
  executing it, this was apparently lost during the transition

* reintroduce get_db_router for third-party code needing to generate
  URLs

bzr revid: xmo@openerp.com-20131115124819-bp4gjpfdlda2qyf5
2013-11-15 13:48:19 +01:00
Xavier Morel 321d4681e1 [IMP] new routing thing
* fix nameerror on SessionExpired exception not being imported
* remove pointless RequestUID instantiation by single placeholder object
  - may be replaceable with a LocalProxy or something along those lines?
* rename default/nodb routing map
* make better use of werkzeug API
* move lazy routing_map instantiation to property in ir_http.find_handler
  - do we have some sort of lazy_property?

bzr revid: xmo@openerp.com-20131115100901-s3skmwv9d1jgk9y0
2013-11-15 11:09:01 +01:00
Antony Lesuisse 575376ef29 [FIX] http.py use checked_call for concurrency retry and exception handling
bzr revid: al@openerp.com-20131110140757-tbe8yondadokd4ke
2013-11-10 15:07:57 +01:00
Antony Lesuisse c396149f4f [FIX] use AbstractModel, use session.db to ir_http dispatch for none controllers
bzr revid: al@openerp.com-20131110135406-r0cyxhnve3jl8r2i
2013-11-10 14:54:06 +01:00
Antony Lesuisse afbec17f77 [IMP] model converters for routes, to directly get the browse record
example @route(['/job/detail/<model("hr.job"):job>'], type='http', auth="user")

bzr revid: al@openerp.com-20131110123707-yb3hbdqlo063dj64
2013-11-10 13:37:07 +01:00
Antony Lesuisse d50577b69d [IMP] http move db dispatching on the orm level
Split low level dispatching and high level dispatching.
Low level dispatching is used when the db is unknown it's only used by a few
controller in base and web.
High level dispatching is used when the db is known, it is used by most
controllers and it handles authentication and errors. Because it's a regular
osv object all it is fully overridable by openerp modules.

bzr revid: al@openerp.com-20131110014609-io03vspj2q1wtqa0
2013-11-10 02:46:09 +01:00
Christophe Simonis 1c523aa1be [FIX] http: bind RouteMap using environ to allow correct redirections
(manual forward port of revid 3860 chs@openerp.com-20131023162646-9t8iu2okkddg56yi from web branch)

bzr revid: chs@openerp.com-20131030182400-bfuvl2209a7e1ifz
2013-10-30 19:24:00 +01:00
niv-openerp f312303734 [IMP] Added doc
bzr revid: nicolas.vanhoren@openerp.com-20131029150105-4l3hys56zt2dpmcc
2013-10-29 16:01:05 +01:00
Antony Lesuisse a569093606 [IMP] move http layer from openerp-web to openobject-server, convert controllers to the new route api
versioned history http.py can be found in lp:~openerp/openerp-web/trunk file addons/web/http.py

bzr revid: al@openerp.com-20131027171553-qe1ulbff0bphm15o
2013-10-27 18:15:53 +01:00
Vo Minh Thu 56df6d6ecc [DOC] openerp.http: use sphinx domains.
bzr revid: vmt@openerp.com-20130201151354-uyxgyt0aw101a2mq
2013-02-01 16:13:54 +01:00
Vo Minh Thu 665fc8d8f1 [REF] openerp.service.{rpc,route,handler} decorators moved to openerp.http.
bzr revid: vmt@openerp.com-20130201093727-pgcvauuo87o2a3p6
2013-02-01 10:37:27 +01:00