Context not passed to _constraints functions
Bug #891592 reported by
Stefan Rijnhart (Opener)
This bug affects 4 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Invalid
|
Wishlist
|
Unassigned |
Bug Description
Hi,
the context parameter is not passed to functions listed in the _constraints on the model.
Note that a number of constraints functions (maybe all) in the base module do take the context argument.
A common use case is where users are to be held to certain guidelines, while dirty data needs to be imported as is.
Cheers,
Stefan.
Related branches
lp:~openerp-community/openobject-server/stefan-therp_lp891592-6.1
Rejected
for merging
into
lp:openobject-server
- OpenERP Core Team: Pending requested
-
Diff: 12 lines (+1/-1)1 file modifiedopenerp/osv/orm.py (+1/-1)
To post a comment you must log in.
Constraints should only depends on the actual data. If you call the constraints multiple times on the same data it must always give the same result and therefore cannot be influenced by context.