When sending http data, we need to minimize the number of TCP packets.
By enabling write-buffering, we can achieve that. However, we need to
make sure that buffers will properly be flushed, not linger.
Conflicts:
bin/service/http_server.py
bzr revid: p_christ@hol.gr-20110118125959-vk0gzx30bwykn18s
Original refactoring forgot to properly fix the split,
in revision 3143.1.2 revid:odo@openerp.com-20101221192344-87d7ajnfsn5unm9p
bzr revid: odo@openerp.com-20110117200837-h2ynvbqngp0pb3za
By storing this cache in the pool and only referencing it in the instance we ensure that it is not lost
when the osv instance is replaced in the pool, e.g. as soon as on osv object inherits from ir.model.data.
This is now needed, as the module data cleanup is now done globally at the end of all module installation,
while it was done on a smaller scale before (leading to other kinds of issues).
lp bug: https://launchpad.net/bugs/704051 fixed
lp bug: https://launchpad.net/bugs/701644 fixed
bzr revid: odo@openerp.com-20110117184453-kxvbuzmuge6u1mh4
It used to return utf-8 data but was brittle in the conversion, and would fail downstream
if the calling code did not pay attention to handle utf-8 data properly.
Returning unicode forces callers to auto-cast to unicode for any string operation, saving
potential trouble later.
From the addons that currently call toxml(), none use it in a manner that would fail in case
unicode data is returned, so we should be on the safe side there too.
lp bug: https://launchpad.net/bugs/695960 fixed
bzr revid: odo@openerp.com-20110117184444-mxjeneuoa0r5a85n
Indeed, when we define an expression like
class bar(osv.osv):
_inherit = 'bar.bar'
def _check_foo(self, cr, uid, ids, context):
return True
_constraints = [ (_check_foo, "Foo failed!", ['foo']) ]
... it means that _check_foo will be passed as an *object* to the model's
structure of _constraints. Therefore, it would be unequal and just append
the list of any existing constraints. So, an older (_check_foo, , ['foo'])
would always remain active using the previous code. This has to do with
the _check_foo being an unbound (ie. not inheritable) function.
Now, we check the /string name/ of the function, too. We say that if the
inherited class's constraint function has the same name "_check_foo", the
old ones shall be replaced.
Note: this MAY introduce unpredictable results, if several modules try
to override the same inherited constraint. There is no guaranteed order
of inheritance. Please avoid using this feature unless necessary.
lp bug: https://launchpad.net/bugs/700451 fixed
bzr revid: odo@openerp.com-20110117094750-4lyzx165f1z1zgl4
Triggered by [Bug 702340]
When we try to search a composite expression like:
[( 'ourfoo.subfoo', '=' , True) ]
.. where subfoo is a function field of the model ofourfoo field,
the framework will call subfoo.search([('subfoo','=',True)]).
The latter shall return a domain expression that will restrict
the search on 'ourfoo'.
When the returned expression is empty, meaning "match all", the algebra
on the parent expression would come up with an invalid [..., '&', ( 1, '=', 1) ]
sequence.
bzr revid: p_christ@hol.gr-20110117084108-vt1qe72lhw8ldxqm
Since a recent commit, non (long, int) values will propagate, so we'd
better not use inherit_id = browse_record(...) as a value in create()'s
dict.
Previously, it did work because we define __int__() so that:
int(browse_record(...)) == browse_record(...).id
bzr revid: p_christ@hol.gr-20110117084054-8qv5uc4vt4w9aygv