bzr revid: vir@tinyerp.com-20101026052219-z45yyhvvf7jszoyl
This commit is contained in:
Vir (Open ERP)
2010-10-26 10:52:19 +05:30
7 changed files with 7544 additions and 3892 deletions
+3 -3
View File
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2010-10-18 17:46+0000\n"
"PO-Revision-Date: 2010-10-23 16:15+0000\n"
"Last-Translator: Carlos @ smile.fr <Unknown>\n"
"PO-Revision-Date: 2010-10-24 07:58+0000\n"
"Last-Translator: Carlos-smile <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-10-24 04:55+0000\n"
"X-Launchpad-Export-Date: 2010-10-25 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+3784 -1933
View File
File diff suppressed because it is too large Load Diff
+3727 -1912
View File
File diff suppressed because it is too large Load Diff
+9 -7
View File
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2010-10-18 17:46+0000\n"
"PO-Revision-Date: 2010-10-23 06:58+0000\n"
"PO-Revision-Date: 2010-10-25 07:03+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-10-24 04:55+0000\n"
"X-Launchpad-Export-Date: 2010-10-26 04:36+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
@@ -722,7 +722,7 @@ msgstr "Индия"
#. module: base
#: model:ir.model,name:base.model_maintenance_contract_module
msgid "maintenance contract modules"
msgstr "модули по договору поддержки"
msgstr "модули обслуживания договоров"
#. module: base
#: model:ir.actions.act_window,name:base.res_request_link-act
@@ -3147,7 +3147,7 @@ msgstr "Полный доступ"
#: view:ir.model.fields:0
#: model:ir.ui.menu,name:base.menu_security
msgid "Security"
msgstr "Безопасность"
msgstr "Права доступа"
#. module: base
#: model:res.widget,title:base.openerp_twitter_favorites
@@ -3981,7 +3981,7 @@ msgstr "terp-stock_symbol-selection"
#: model:ir.actions.act_window,name:base.action_maintenance_contract_form
#: model:ir.ui.menu,name:base.menu_maintenance_contract
msgid "Maintenance Contracts"
msgstr "Обслуживание контрактов"
msgstr "Обслуживание договоров"
#. module: base
#: model:ir.actions.wizard,name:base.wizard_server_action_create
@@ -4410,7 +4410,7 @@ msgstr "Выполнить запланированные обновления"
#. module: base
#: model:ir.ui.menu,name:base.maintenance
msgid "Maintenance"
msgstr "Сопровождение"
msgstr "Обслуживание"
#. module: base
#: view:res.widget:0
@@ -8549,7 +8549,7 @@ msgstr "Послепродажное обслуживание"
#: model:ir.ui.menu,name:base.menu_maintenance_contract_add
#: view:maintenance.contract.wizard:0
msgid "Add Maintenance Contract"
msgstr "Добавить контракт на обслуживание"
msgstr "Добавить договор на обслуживание"
#. module: base
#: view:ir.actions.todo:0
@@ -9031,6 +9031,8 @@ msgid ""
"Used to select automatically the right address according to the context in "
"sales and purchases documents."
msgstr ""
"Используется для автоматического выбора адрес в соответствии с контекстом, в "
"документах продажи или покупки."
#. module: base
#: model:res.country,name:base.lk
+2 -1
View File
@@ -253,7 +253,8 @@ class act_window(osv.osv):
'search_view' : fields.function(_search_view, type='text', method=True, string='Search View'),
'menus': fields.char('Menus', size=4096),
'help': fields.text('Action description',
help='Optional help text for the users with a description of the target view, such as its usage and purpose.'),
help='Optional help text for the users with a description of the target view, such as its usage and purpose.',
translate=True),
'display_menu_tip':fields.function(_get_help_status, type='boolean', method=True, string='Display Menu Tips',
help='It gives the status if the tip has to be displayed or not when a user executes an action'),
'multi': fields.boolean('Action on Multiple Doc.', help="If set to true, the action will not be displayed on the right toolbar of a form view"),
+17 -35
View File
@@ -1286,7 +1286,6 @@ class orm_template(object):
'fields': xfields
}
attrs = {'views': views}
view = False
fields = views.get('field', False) and views['field'].get('fields', False)
if node.get('name'):
attrs = {}
@@ -2212,7 +2211,6 @@ class orm(orm_template):
fget = self.fields_get(cr, uid, fields)
float_int_fields = filter(lambda x: fget[x]['type'] in ('float', 'integer'), fields)
sum = {}
flist = ''
group_by = groupby
if groupby:
@@ -2233,10 +2231,10 @@ class orm(orm_template):
or (f in self._columns and getattr(self._columns[f], '_classic_write'))]
for f in fields_pre:
if f not in ['id', 'sequence']:
operator = fget[f].get('group_operator', 'sum')
group_operator = fget[f].get('group_operator', 'sum')
if flist:
flist += ','
flist += operator+'('+f+') as '+f
flist += group_operator+'('+f+') as '+f
gb = groupby and (' GROUP BY '+groupby) or ''
@@ -2971,26 +2969,6 @@ class orm(orm_template):
for key, v in r.items():
if v is None:
r[key] = False
if key in self._columns:
column = self._columns[key]
elif key in self._inherit_fields:
column = self._inherit_fields[key][2]
else:
continue
# TODO: removed this, it's too slow
# if v and column._type == 'reference':
# model_name, ref_id = v.split(',', 1)
# model = self.pool.get(model_name)
# if not model:
# reset = True
# else:
# cr.execute('SELECT count(1) FROM "%s" WHERE id=%%s' % (model._table,), (ref_id,))
# reset = not cr.fetchone()[0]
# if reset:
# if column._classic_write:
# query = 'UPDATE "%s" SET "%s"=NULL WHERE id=%%s' % (self._table, key)
# cr.execute(query, (r['id'],))
# r[key] = False
if isinstance(ids, (int, long, dict)):
return result and result[0] or False
@@ -3213,17 +3191,21 @@ class orm(orm_template):
return
if not (context.get(self.CONCURRENCY_CHECK_FIELD) and self._log_access):
return
def key(oid):
return "%s,%s" % (self._name, oid)
santa = "(id = %s AND %s < COALESCE(write_date, create_date, now())::timestamp)"
for i in range(0, len(ids), cr.IN_MAX):
sub_ids = tools.flatten(((oid, context[self.CONCURRENCY_CHECK_FIELD][key(oid)])
for oid in ids[i:i+cr.IN_MAX]
if key(oid) in context[self.CONCURRENCY_CHECK_FIELD]))
if not sub_ids: continue
cr.execute("SELECT 1 FROM %s WHERE %s" % (self._table, " OR ".join([santa]*(len(sub_ids)/2))), sub_ids)
if cr.fetchone():
raise except_orm('ConcurrencyException', _('Records were modified in the meanwhile'))
check_clause = "(id = %s AND %s < COALESCE(write_date, create_date, now())::timestamp)"
for sub_ids in cr.split_for_in_conditions(ids):
ids_to_check = []
for id in sub_ids:
id_ref = "%s,%s" % (self._name, id)
update_date = context[self.CONCURRENCY_CHECK_FIELD].pop(id_ref, None)
if update_date:
ids_to_check.extend([id, update_date])
if not ids_to_check:
continue
cr.execute("SELECT id FROM %s WHERE %s" % (self._table, " OR ".join([check_clause]*(len(ids_to_check)/2))), tuple(ids_to_check))
res = cr.fetchone()
if res:
# mention the first one only to keep the error message readable
raise except_orm('ConcurrencyException', _('A document was modified since you last viewed it (%s:%d)') % (self._description, res[0]))
def check_access_rule(self, cr, uid, ids, operation, context=None):
"""Verifies that the operation given by ``operation`` is allowed for the user
+2 -1
View File
@@ -55,7 +55,8 @@ _EXPR_OPCODES = _CONST_OPCODES.union(set(opmap[x] for x in [
_SAFE_OPCODES = _EXPR_OPCODES.union(set(opmap[x] for x in [
'STORE_MAP', 'LOAD_NAME', 'CALL_FUNCTION', 'COMPARE_OP', 'LOAD_ATTR',
'STORE_NAME', 'GET_ITER', 'FOR_ITER', 'LIST_APPEND', 'JUMP_ABSOLUTE',
'DELETE_NAME', 'JUMP_IF_TRUE', 'JUMP_IF_FALSE','MAKE_FUNCTION','JUMP_FORWARD'
'DELETE_NAME', 'JUMP_IF_TRUE', 'JUMP_IF_FALSE','MAKE_FUNCTION','JUMP_FORWARD',
'SLICE+0', 'SLICE+1', 'SLICE+2', 'SLICE+3'
] if x in opmap))
_logger = logging.getLogger('safe_eval')