Commit Graph

3 Commits

Author SHA1 Message Date
P. Christeas 49fbcdb70a ir.translation: select restriction must be an SQL constraint
select fields validate themselves in ORM, through _check_selection_field_value(),
which /retrieves/ the .selection list and checks if value to be written
is among possible ones. This, however, is very expensive for models that
have variable selection lists (eg. ones that require an SQL query).

In fact, for ir.translation, the query would be repeat for every single
write() to ir.translation. The 'lang' field is actually a reference for
res.lang.code (not the .id, sadly), so let SQL implement the constraint
for us.

bzr revid: xrg@linux.gr-20110608093254-ua66p5co6dc203zs
2011-06-08 12:32:54 +03:00
P. Christeas 28e3960004 Revert "[IMP] translation: Added two columns to ir_translation to fix the res_ids after loading is done."
This reverts commit a78cd642cd956afe3f3cee54558b214549f0a9a5.

Conflicts:

	openerp/addons/base/ir/ir_translation.py
	openerp/tools/translate.py

bzr revid: xrg@linux.gr-20110608092941-f2ycamq0k52y4nc8
2011-06-08 12:29:41 +03:00
Vo Minh Thu f8572e5c60 [IMP] openerp python module.
- Some logging code moved from netsvc.py to loglevels.py
- Changed imports to use the new openerp module
- config and netsvc initialization calls move to openerp-server.py
- Moved openerp-server.py outside the old bin directory
- Some imports in tools moved inside the methods to break mutual-dependencies

bzr revid: vmt@openerp.com-20110207125723-ooee7d7ng5elmkso
2011-02-07 13:57:23 +01:00