On Launchpad, as commented on bug 933496, PO entries (and their comments) are
shared between series. This mean that e.g. the 7.0 series can have the wrong
`reference` comments (those beginning with #:) as they would be copied from say
the trunk series. Those `reference` comments are used to import translations
and look them up.
This patch adds a few lines of code to tools.translate so that targets
defined in the POT `reference` comments are used in addition to those from the
PO file.
Also adds a test module to validate the new behavior.
This patch stems from:
- the 6.1 branch by Vo Minh Thu:
https://code.launchpad.net/+branch/~openerp-dev/openobject-server/6.1-fix-po-targets-933496-vmt
- the 7.0 port by Numerigraphe:
https://code.launchpad.net/~numerigraphe-team/openobject-server/7.0-fix-po-targets-933496-vmt
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
- output "error" if any qunit tests failed
- failed js tests are logged as errors
- when running phantomjs considere empty waiting condition or initialisation code as "true"
- lint phantomtest.js file
A deadlock occurs when
- phantomjs_test1 is executedd, enter_test_mode is activated
- console.log('ok') is issued, sigterm is sent to phantomjs_test1 process
- phantomjs_test1 is finished and leave_test_mode restores the registrymanager lock
- phantomjs_test1 process, just before dying, makes a last http request phantomjs_test1_last_request
- phantomjs_test1_last_request thread will wait for the registrymanager lock, when all tests will be completed
- phantomjs_test2 is run, enter_test_mode is activated
- phantomjs_test2 is reach its end and _wait_remaining_requests is called
- phantomjs_test2 _wait_remaining_requests hangs forever waiting for phantomjs_test1_last_request
bzr revid: al@openerp.com-20140501150641-ua0b7pntesgm3n5p
- 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
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
- phantomjs more verbose
- revert to dumber console.log relay, dont try to be smart, just display it
- json is only optionally parsed for errors stack dumps
bzr revid: al@openerp.com-20140316160634-hh7br4mbg01xcrpk
This api change breaks jsfile tests (example test_ui_load.js). The api is broken
but the proper fix would be to avoid accessing phantom.args from PhantomTest
bzr revid: al@openerp.com-20140310184636-8r9x81xi1zqhcsek
This test was depending on the error string returned by postgresql.
As these strings are localized, the test was failing on systems
where posgresql locale was not set to 'en_US'.
In this new version, we now check the error code returned by postgresql
(which is, obviously, platform independent)
bzr revid: rim@openerp.com-20140306110356-72mgz3korkq3rkde
whether the content of the html field should be sanitized before storage. This parameter
is true by default.
Example of use: html of email template is considered as html content, but contains
mako strings that makes this content not valid html. Sanitizing the body content
can cause issues to the template; therefore storing it as html but not sanitized
allows to keep its content safe.
Added a test case to ensure this behavior.
bzr revid: tde@openerp.com-20140227120254-6m8gvkt4hf28nl0e
Turns out select has its own select.error which does *not* subclass
EnvironmentError (or OSError or IOError) and does *not* have a .errno
attribute. So use the correct exception, might just work better than using
a completely different one with no relation.
bzr revid: xmo@openerp.com-20140219155303-sgz7m3gnzr2bmani
altered reporting to handle and deserialize JSON if JSON-deserializable. Can't
just send multiple lines as driver currently does not handle multiple lines of
message... Yeah turns out having a JSON-based protocol between phantomjs and
the python runner allowed multiple lines in messages, who'd have thought eh?
bzr revid: xmo@openerp.com-20140219123850-0h0upb3x33j7leqk