[MERGE] merged trunk.
bzr revid: vmt@openerp.com-20110330152301-884qvxeg62ae633g
This commit is contained in:
commit
4944140a91
|
@ -0,0 +1,39 @@
|
||||||
|
# Albanian translation for openobject-server
|
||||||
|
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
|
||||||
|
# This file is distributed under the same license as the openobject-server package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: openobject-server\n"
|
||||||
|
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"POT-Creation-Date: 2009-08-24 22:41+0300\n"
|
||||||
|
"PO-Revision-Date: 2011-03-28 14:50+0000\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language-Team: Albanian <sq@li.org>\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Launchpad-Export-Date: 2011-03-29 04:39+0000\n"
|
||||||
|
"X-Generator: Launchpad (build 12559)\n"
|
||||||
|
|
||||||
|
#. Type: string
|
||||||
|
#. Description
|
||||||
|
#: ../openerp-server.templates:1001
|
||||||
|
msgid "Dedicated system account for the Open ERP server:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Type: string
|
||||||
|
#. Description
|
||||||
|
#: ../openerp-server.templates:1001
|
||||||
|
msgid ""
|
||||||
|
"The Open ERP server must use a dedicated account for its operation so that "
|
||||||
|
"the system's security is not compromised by running it with superuser "
|
||||||
|
"privileges."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Type: string
|
||||||
|
#. Description
|
||||||
|
#: ../openerp-server.templates:1001
|
||||||
|
msgid "Please choose that account's username."
|
||||||
|
msgstr ""
|
|
@ -303,10 +303,10 @@ class ir_model_fields(osv.osv):
|
||||||
|
|
||||||
# static table of properties
|
# static table of properties
|
||||||
model_props = [ # (our-name, fields.prop, set_fn)
|
model_props = [ # (our-name, fields.prop, set_fn)
|
||||||
('field_description', 'string', lambda a: a),
|
('field_description', 'string', str),
|
||||||
('required', 'required', bool),
|
('required', 'required', bool),
|
||||||
('readonly', 'readonly', bool),
|
('readonly', 'readonly', bool),
|
||||||
('domain', '_domain', lambda a: a),
|
('domain', '_domain', eval),
|
||||||
('size', 'size', int),
|
('size', 'size', int),
|
||||||
('on_delete', 'ondelete', str),
|
('on_delete', 'ondelete', str),
|
||||||
('translate', 'translate', bool),
|
('translate', 'translate', bool),
|
||||||
|
|
|
@ -2818,7 +2818,7 @@ class orm(orm_template):
|
||||||
'string': field['field_description'],
|
'string': field['field_description'],
|
||||||
'required': bool(field['required']),
|
'required': bool(field['required']),
|
||||||
'readonly': bool(field['readonly']),
|
'readonly': bool(field['readonly']),
|
||||||
'domain': field['domain'] or None,
|
'domain': eval(field['domain']) if field['domain'] else None,
|
||||||
'size': field['size'],
|
'size': field['size'],
|
||||||
'ondelete': field['on_delete'],
|
'ondelete': field['on_delete'],
|
||||||
'translate': (field['translate']),
|
'translate': (field['translate']),
|
||||||
|
|
|
@ -50,6 +50,8 @@ from yaml_import import convert_yaml_import
|
||||||
# List of etree._Element subclasses that we choose to ignore when parsing XML.
|
# List of etree._Element subclasses that we choose to ignore when parsing XML.
|
||||||
from misc import SKIPPED_ELEMENT_TYPES
|
from misc import SKIPPED_ELEMENT_TYPES
|
||||||
|
|
||||||
|
from misc import unquote
|
||||||
|
|
||||||
# Import of XML records requires the unsafe eval as well,
|
# Import of XML records requires the unsafe eval as well,
|
||||||
# almost everywhere, which is ok because it supposedly comes
|
# almost everywhere, which is ok because it supposedly comes
|
||||||
# from trusted data, but at least we make it obvious now.
|
# from trusted data, but at least we make it obvious now.
|
||||||
|
@ -439,7 +441,21 @@ form: module.record_id""" % (xml_id,)
|
||||||
limit = rec.get('limit','').encode('utf-8')
|
limit = rec.get('limit','').encode('utf-8')
|
||||||
auto_refresh = rec.get('auto_refresh','').encode('utf-8')
|
auto_refresh = rec.get('auto_refresh','').encode('utf-8')
|
||||||
uid = self.uid
|
uid = self.uid
|
||||||
active_id = str("active_id") # for further reference in client/bin/tools/__init__.py
|
|
||||||
|
# Act_window's 'domain' and 'context' contain mostly literals
|
||||||
|
# but they can also refer to the variables provided below
|
||||||
|
# in eval_context, so we need to eval() them before storing.
|
||||||
|
# Among the context variables, 'active_id' refers to
|
||||||
|
# the currently selected items in a list view, and only
|
||||||
|
# takes meaning at runtime on the client side. For this
|
||||||
|
# reason it must remain a bare variable in domain and context,
|
||||||
|
# even after eval() at server-side. We use the special 'unquote'
|
||||||
|
# class to achieve this effect: a string which has itself, unquoted,
|
||||||
|
# as representation.
|
||||||
|
active_id = unquote("active_id")
|
||||||
|
active_ids = unquote("active_ids")
|
||||||
|
active_model = unquote("active_model")
|
||||||
|
|
||||||
def ref(str_id):
|
def ref(str_id):
|
||||||
return self.id_get(cr, str_id)
|
return self.id_get(cr, str_id)
|
||||||
|
|
||||||
|
@ -459,6 +475,8 @@ form: module.record_id""" % (xml_id,)
|
||||||
'auto_refresh': auto_refresh,
|
'auto_refresh': auto_refresh,
|
||||||
'uid' : uid,
|
'uid' : uid,
|
||||||
'active_id': active_id,
|
'active_id': active_id,
|
||||||
|
'active_ids': active_ids,
|
||||||
|
'active_model': active_model,
|
||||||
'ref' : ref,
|
'ref' : ref,
|
||||||
}
|
}
|
||||||
context = self.get_context(data_node, rec, eval_context)
|
context = self.get_context(data_node, rec, eval_context)
|
||||||
|
|
|
@ -1439,6 +1439,23 @@ def attrgetter(*items):
|
||||||
return tuple(resolve_attr(obj, attr) for attr in items)
|
return tuple(resolve_attr(obj, attr) for attr in items)
|
||||||
return g
|
return g
|
||||||
|
|
||||||
|
class unquote(str):
|
||||||
|
"""A subclass of str that implements repr() without enclosing quotation marks
|
||||||
|
or escaping, keeping the original string untouched. The name come from Lisp's unquote.
|
||||||
|
One of the uses for this is to preserve or insert bare variable names within dicts during eval()
|
||||||
|
of a dict's repr(). Use with care.
|
||||||
|
Some examples:
|
||||||
|
>>> unquote('active_id')
|
||||||
|
active_id
|
||||||
|
>>> repr(unquote('active_id'))
|
||||||
|
active_id
|
||||||
|
>>> d = {'test': unquote('active_id')}
|
||||||
|
>>> d
|
||||||
|
{'test': active_id}
|
||||||
|
>>> repr(d)
|
||||||
|
"{'test': active_id}"
|
||||||
|
"""
|
||||||
|
def __repr__(self):
|
||||||
|
return self
|
||||||
|
|
||||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue