From 48b24666768e0f933be806cd3d1b9b51e49c4d71 Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Fri, 13 May 2011 11:31:21 +0200 Subject: [PATCH 01/11] [FIX] res_lang: the string to format cannot be empty. - not yet fixed, but a new implementation of the grouping code is provided without that problem. - some testing need to be done. - removed unnecessary arguments - eval() used only once bzr revid: vmt@openerp.com-20110513093121-qo7walg7dff0kufl --- openerp/addons/base/res/res_lang.py | 190 ++++++++++++++++++++++------ 1 file changed, 148 insertions(+), 42 deletions(-) diff --git a/openerp/addons/base/res/res_lang.py b/openerp/addons/base/res/res_lang.py index f59127318ec..c01df71792e 100644 --- a/openerp/addons/base/res/res_lang.py +++ b/openerp/addons/base/res/res_lang.py @@ -181,46 +181,6 @@ class lang(osv.osv): trans_obj.unlink(cr, uid, trans_ids, context=context) return super(lang, self).unlink(cr, uid, ids, context=context) - def _group(self, cr, uid, ids, s, monetary=False, grouping=False, thousands_sep=''): - grouping = eval(grouping) - - if not grouping: - return (s, 0) - - result = "" - seps = 0 - spaces = "" - - if s[-1] == ' ': - sp = s.find(' ') - spaces = s[sp:] - s = s[:sp] - - while s and grouping: - # if grouping is -1, we are done - if grouping[0] == -1: - break - # 0: re-use last group ad infinitum - elif grouping[0] != 0: - #process last group - group = grouping[0] - grouping = grouping[1:] - if result: - result = s[-group:] + thousands_sep + result - seps += 1 - else: - result = s[-group:] - s = s[:-group] - if s and s[-1] not in "0123456789": - # the leading string is only spaces and signs - return s + result + spaces, seps - if not result: - return s + spaces, seps - if s: - result = s + thousands_sep + result - seps += 1 - return result + spaces, seps - def format(self, cr, uid, ids, percent, value, grouping=False, monetary=False): """ Format() will return the language-specific output for float values""" @@ -228,6 +188,7 @@ class lang(osv.osv): raise ValueError("format() must be given exactly one %char format specifier") lang_grouping, thousands_sep, decimal_point = self._lang_data_get(cr, uid, ids[0], monetary) + eval_lang_grouping = eval(lang_grouping) formatted = percent % value # floats and decimal ints need special action! @@ -236,7 +197,7 @@ class lang(osv.osv): parts = formatted.split('.') if grouping: - parts[0], seps = self._group(cr,uid,ids,parts[0], monetary=monetary, grouping=lang_grouping, thousands_sep=thousands_sep) + parts[0], seps = original_group(parts[0], eval_lang_grouping, thousands_sep) formatted = decimal_point.join(parts) while seps: @@ -246,7 +207,7 @@ class lang(osv.osv): seps -= 1 elif percent[-1] in 'diu': if grouping: - formatted = self._group(cr,uid,ids,formatted, monetary=monetary, grouping=lang_grouping, thousands_sep=thousands_sep)[0] + formatted = original_group(formatted, eval_lang_grouping, thousands_sep)[0] return formatted @@ -256,5 +217,150 @@ class lang(osv.osv): lang() +# TODO intersperse is more general than original_group, maybe +# this is a problem and the loop should really stops on non-digits. + +def original_group(s, grouping, thousands_sep=''): + + if not grouping: + return (s, 0) + + result = "" + seps = 0 + spaces = "" + + if s[-1] == ' ': + sp = s.find(' ') + spaces = s[sp:] + s = s[:sp] + + while s and grouping: + # if grouping is -1, we are done + if grouping[0] == -1: + break + # 0: re-use last group ad infinitum + elif grouping[0] != 0: + #process last group + group = grouping[0] + grouping = grouping[1:] + if result: + result = s[-group:] + thousands_sep + result + seps += 1 + else: + result = s[-group:] + s = s[:-group] + if s and s[-1] not in "0123456789": + # the leading string is only spaces and signs + return s + result + spaces, seps + if not result: + return s + spaces, seps + if s: + result = s + thousands_sep + result + seps += 1 + return result + spaces, seps + +import itertools + +def take_left_padding(string): + """ + >>> take_left_padding(" hello world ") + (' ', 'hello world ') + + """ + padding = ''.join(itertools.takewhile(lambda c: c.isspace(), string)) + rest = string[len(padding):] + return padding, rest + +def take_right_padding(string): + """ + + >>> take_right_padding(" hello world ") + (' ', ' hello world') + + """ + def reverse(s): return s[::-1] + padding, rest = take_left_padding(reverse(string)) + return reverse(padding), reverse(rest) + +def split(l, counts): + """ + + >>> split("hello world", []) + ['hello world'] + >>> split("hello world", [1]) + ['h', 'ello world'] + >>> split("hello world", [2]) + ['he', 'llo world'] + >>> split("hello world", [2,3]) + ['he', 'llo', ' world'] + >>> split("hello world", [2,3,0]) + ['he', 'llo', ' wo', 'rld'] + >>> split("hello world", [2,-1,3]) + ['he', 'llo world'] + + """ + res = [] + saved_count = len(l) # count to use when encoutering a zero + for count in counts: + if count == -1: + break + if count == 0: + while l: + res.append(l[:saved_count]) + l = l[saved_count:] + break + res.append(l[:count]) + l = l[count:] + saved_count = count + if l: + res.append(l) + return res + +def intersperse(string, counts, separator=''): + """ + + See the assert below for examples. + + """ + left_padding, rest = take_left_padding(string) + right_padding, rest = take_right_padding(rest) + def reverse(s): return s[::-1] + splits = split(reverse(rest), counts) + res = separator.join(map(reverse, reverse(splits))) + return left_padding + res + right_padding, len(splits) > 0 and len(splits) -1 or 0 + +def _group_examples_(): + for g in [original_group, intersperse]: + # print "asserts on", g.func_name + assert g("", []) == ("", 0) + assert g("0", []) == ("0", 0) + assert g("012", []) == ("012", 0) + assert g("1", []) == ("1", 0) + assert g("12", []) == ("12", 0) + assert g("123", []) == ("123", 0) + assert g("1234", []) == ("1234", 0) + assert g("123456789", []) == ("123456789", 0) + assert g("&ab%#@1", []) == ("&ab%#@1", 0) + + assert g("0", []) == ("0", 0) + assert g("0", [1]) == ("0", 0) + assert g("0", [2]) == ("0", 0) + assert g("0", [200]) == ("0", 0) + + # breaks _group: + if g.func_name == 'my_group': + assert g("12345678", [0], '.') + assert g("", [1], '.') == ('', 0) + assert g("12345678", [1], '.') == ('1234567.8', 1) + assert g("12345678", [1], '.') == ('1234567.8', 1) + assert g("12345678", [2], '.') == ('123456.78', 1) + assert g("12345678", [2,1], '.') == ('12345.6.78', 2) + assert g("12345678", [2,0], '.') == ('12.34.56.78', 3) + assert g("12345678", [-1,2], '.') == ('12345678', 0) + assert g("12345678", [2,-1], '.') == ('123456.78', 1) + assert g("12345678", [2,0,1], '.') == ('12.34.56.78', 3) + assert g("12345678", [2,0,0], '.') == ('12.34.56.78', 3) + assert g("12345678", [2,0,-1], '.') == ('12.34.56.78', 3) + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From 12144cfc2b8f44d43489a0964e847df4465e552e Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Mon, 16 May 2011 11:03:12 +0200 Subject: [PATCH 02/11] [FIX]: dont use the leading non-digits when splitting in the format. bzr revid: vmt@openerp.com-20110516090312-8r5b63e7ln045h0p --- openerp/addons/base/res/res_lang.py | 31 ++++++++++++++++++------ openerp/addons/base/res/test/res_lang.py | 12 +++++++++ 2 files changed, 35 insertions(+), 8 deletions(-) create mode 100644 openerp/addons/base/res/test/res_lang.py diff --git a/openerp/addons/base/res/res_lang.py b/openerp/addons/base/res/res_lang.py index c01df71792e..c2b4364a240 100644 --- a/openerp/addons/base/res/res_lang.py +++ b/openerp/addons/base/res/res_lang.py @@ -21,6 +21,7 @@ import locale import logging +import itertools from osv import fields, osv from locale import localeconv @@ -259,8 +260,6 @@ def original_group(s, grouping, thousands_sep=''): seps += 1 return result + spaces, seps -import itertools - def take_left_padding(string): """ >>> take_left_padding(" hello world ") @@ -319,17 +318,20 @@ def split(l, counts): def intersperse(string, counts, separator=''): """ - See the assert below for examples. + See the asserts below for examples. """ left_padding, rest = take_left_padding(string) + padding = ''.join(itertools.takewhile(lambda c: not c.isdigit(), rest)) + rest = rest[len(padding):] right_padding, rest = take_right_padding(rest) def reverse(s): return s[::-1] splits = split(reverse(rest), counts) res = separator.join(map(reverse, reverse(splits))) - return left_padding + res + right_padding, len(splits) > 0 and len(splits) -1 or 0 + return left_padding + padding + res + right_padding, len(splits) > 0 and len(splits) -1 or 0 -def _group_examples_(): +# TODO rewrite this with a unit test library +def _group_examples(): for g in [original_group, intersperse]: # print "asserts on", g.func_name assert g("", []) == ("", 0) @@ -347,9 +349,9 @@ def _group_examples_(): assert g("0", [2]) == ("0", 0) assert g("0", [200]) == ("0", 0) - # breaks _group: - if g.func_name == 'my_group': - assert g("12345678", [0], '.') + # breaks original_group: + if g.func_name == 'intersperse': + assert g("12345678", [0], '.') == ('12345678', 0) assert g("", [1], '.') == ('', 0) assert g("12345678", [1], '.') == ('1234567.8', 1) assert g("12345678", [1], '.') == ('1234567.8', 1) @@ -363,4 +365,17 @@ def _group_examples_(): assert g("12345678", [2,0,-1], '.') == ('12.34.56.78', 3) + assert original_group("abc1234567xy", [2], '.') == ('abc1234567.xy', 1) + assert original_group("abc1234567xy8", [2], '.') == ('abc1234567xy8', 0) # difference here... + assert original_group("abc12", [3], '.') == ('abc12', 0) + assert original_group("abc12", [2], '.') == ('abc12', 0) + assert original_group("abc12", [1], '.') == ('abc1.2', 1) + + assert intersperse("abc1234567xy", [2], '.') == ('abc1234567.xy', 1) + assert intersperse("abc1234567xy8", [2], '.') == ('abc1234567x.y8', 1) # ... w.r.t. here. + assert intersperse("abc12", [3], '.') == ('abc12', 0) + assert intersperse("abc12", [2], '.') == ('abc12', 0) + assert intersperse("abc12", [1], '.') == ('abc1.2', 1) + + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/addons/base/res/test/res_lang.py b/openerp/addons/base/res/test/res_lang.py new file mode 100644 index 00000000000..9272f1142ea --- /dev/null +++ b/openerp/addons/base/res/test/res_lang.py @@ -0,0 +1,12 @@ +import sys +import openerp + +# TODO this loop will be exposed as open_openerp_namespace() +# once trunk-cleaning-vmt is merged. +for k, v in list(sys.modules.items()): + if k.startswith('openerp.') and sys.modules.get(k[8:]) is None: + sys.modules[k[8:]] = v + +import openerp.addons.base.res.res_lang as res_lang +res_lang._group_examples() + From 584fc24bb32d4e6a506ac21996bbe2385d99a5dc Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Mon, 16 May 2011 11:09:08 +0200 Subject: [PATCH 03/11] [FIX] forgot to actually replace the function call by the new one. bzr revid: vmt@openerp.com-20110516090908-umx4o2ar2w2igiid --- openerp/addons/base/res/res_lang.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/openerp/addons/base/res/res_lang.py b/openerp/addons/base/res/res_lang.py index c2b4364a240..cb1a6883d31 100644 --- a/openerp/addons/base/res/res_lang.py +++ b/openerp/addons/base/res/res_lang.py @@ -198,7 +198,7 @@ class lang(osv.osv): parts = formatted.split('.') if grouping: - parts[0], seps = original_group(parts[0], eval_lang_grouping, thousands_sep) + parts[0], seps = intersperse(parts[0], eval_lang_grouping, thousands_sep) formatted = decimal_point.join(parts) while seps: @@ -208,7 +208,7 @@ class lang(osv.osv): seps -= 1 elif percent[-1] in 'diu': if grouping: - formatted = original_group(formatted, eval_lang_grouping, thousands_sep)[0] + formatted = intersperse(formatted, eval_lang_grouping, thousands_sep)[0] return formatted @@ -218,9 +218,6 @@ class lang(osv.osv): lang() -# TODO intersperse is more general than original_group, maybe -# this is a problem and the loop should really stops on non-digits. - def original_group(s, grouping, thousands_sep=''): if not grouping: From e248d008c0295a7bae6a0f48fdc39d79032f988e Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Mon, 16 May 2011 12:07:12 +0200 Subject: [PATCH 04/11] [IMP] res_lang: using a regex instead of custom function, based on rco comment. bzr revid: vmt@openerp.com-20110516100712-ezg0ul9bo81uto1h --- openerp/addons/base/res/res_lang.py | 31 +++++------------------------ 1 file changed, 5 insertions(+), 26 deletions(-) diff --git a/openerp/addons/base/res/res_lang.py b/openerp/addons/base/res/res_lang.py index cb1a6883d31..108e65a1575 100644 --- a/openerp/addons/base/res/res_lang.py +++ b/openerp/addons/base/res/res_lang.py @@ -22,6 +22,7 @@ import locale import logging import itertools +import re from osv import fields, osv from locale import localeconv @@ -257,27 +258,6 @@ def original_group(s, grouping, thousands_sep=''): seps += 1 return result + spaces, seps -def take_left_padding(string): - """ - >>> take_left_padding(" hello world ") - (' ', 'hello world ') - - """ - padding = ''.join(itertools.takewhile(lambda c: c.isspace(), string)) - rest = string[len(padding):] - return padding, rest - -def take_right_padding(string): - """ - - >>> take_right_padding(" hello world ") - (' ', ' hello world') - - """ - def reverse(s): return s[::-1] - padding, rest = take_left_padding(reverse(string)) - return reverse(padding), reverse(rest) - def split(l, counts): """ @@ -312,20 +292,19 @@ def split(l, counts): res.append(l) return res +intersperse_pat = re.compile('([^0-9]*)([^ ]*)(.*)') + def intersperse(string, counts, separator=''): """ See the asserts below for examples. """ - left_padding, rest = take_left_padding(string) - padding = ''.join(itertools.takewhile(lambda c: not c.isdigit(), rest)) - rest = rest[len(padding):] - right_padding, rest = take_right_padding(rest) + left, rest, right = intersperse_pat.match(string).groups() def reverse(s): return s[::-1] splits = split(reverse(rest), counts) res = separator.join(map(reverse, reverse(splits))) - return left_padding + padding + res + right_padding, len(splits) > 0 and len(splits) -1 or 0 + return left + res + right, len(splits) > 0 and len(splits) -1 or 0 # TODO rewrite this with a unit test library def _group_examples(): From 059083488ed6411144d2ed075f59621cd8f8f1cc Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Mon, 16 May 2011 12:10:09 +0200 Subject: [PATCH 05/11] [IMP] res_lang: removed unneeded itertools import. bzr revid: vmt@openerp.com-20110516101009-x1ih1y17ci4ihkne --- openerp/addons/base/res/res_lang.py | 1 - 1 file changed, 1 deletion(-) diff --git a/openerp/addons/base/res/res_lang.py b/openerp/addons/base/res/res_lang.py index 108e65a1575..8e2bc68617c 100644 --- a/openerp/addons/base/res/res_lang.py +++ b/openerp/addons/base/res/res_lang.py @@ -21,7 +21,6 @@ import locale import logging -import itertools import re from osv import fields, osv From a931e398bf31805610518ba8b01de383528f298e Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Mon, 16 May 2011 17:05:34 +0200 Subject: [PATCH 06/11] [REF] consistent, grepable ir.values object naming. bzr revid: vmt@openerp.com-20110516150534-2524fn6587jir72m --- openerp/addons/base/ir/ir_ui_menu.py | 14 +++++++------- openerp/addons/base/res/res_lang.py | 6 +++--- openerp/ir/ir.py | 12 ++++++------ openerp/osv/orm.py | 6 +++--- openerp/tools/convert.py | 5 +++-- 5 files changed, 22 insertions(+), 21 deletions(-) diff --git a/openerp/addons/base/ir/ir_ui_menu.py b/openerp/addons/base/ir/ir_ui_menu.py index af174997620..99a13b46cff 100644 --- a/openerp/addons/base/ir/ir_ui_menu.py +++ b/openerp/addons/base/ir/ir_ui_menu.py @@ -177,13 +177,13 @@ class ir_ui_menu(osv.osv): def _action(self, cursor, user, ids, name, arg, context=None): res = {} - values_obj = self.pool.get('ir.values') - value_ids = values_obj.search(cursor, user, [ + ir_values_obj = self.pool.get('ir.values') + value_ids = ir_values_obj.search(cursor, user, [ ('model', '=', self._name), ('key', '=', 'action'), ('key2', '=', 'tree_but_open'), ('res_id', 'in', ids)], context=context) values_action = {} - for value in values_obj.browse(cursor, user, value_ids, context=context): + for value in ir_values_obj.browse(cursor, user, value_ids, context=context): values_action[value.res_id] = value.value for menu_id in ids: res[menu_id] = values_action.get(menu_id, False) @@ -195,16 +195,16 @@ class ir_ui_menu(osv.osv): ctx = context.copy() if self.CONCURRENCY_CHECK_FIELD in ctx: del ctx[self.CONCURRENCY_CHECK_FIELD] - values_obj = self.pool.get('ir.values') - values_ids = values_obj.search(cursor, user, [ + ir_values_obj = self.pool.get('ir.values') + values_ids = ir_values_obj.search(cursor, user, [ ('model', '=', self._name), ('key', '=', 'action'), ('key2', '=', 'tree_but_open'), ('res_id', '=', menu_id)], context=context) if values_ids: - values_obj.write(cursor, user, values_ids, {'value': value}, + ir_values_obj.write(cursor, user, values_ids, {'value': value}, context=ctx) else: - values_obj.create(cursor, user, { + ir_values_obj.create(cursor, user, { 'name': 'Menuitem', 'model': self._name, 'value': value, diff --git a/openerp/addons/base/res/res_lang.py b/openerp/addons/base/res/res_lang.py index 8e2bc68617c..508da3c9064 100644 --- a/openerp/addons/base/res/res_lang.py +++ b/openerp/addons/base/res/res_lang.py @@ -41,12 +41,12 @@ class lang(osv.osv): if not lang: return False lang_ids = self.search(cr, uid, [('code','=', lang)]) - values_obj = self.pool.get('ir.values') + ir_values_obj = self.pool.get('ir.values') if not lang_ids: lang_id = self.load_lang(cr, uid, lang) - default_value = values_obj.get(cr, uid, 'default', False, 'res.partner') + default_value = ir_values_obj.get(cr, uid, 'default', False, 'res.partner') if not default_value: - values_obj.set(cr, uid, 'default', False, 'lang', ['res.partner'], lang) + ir_values_obj.set(cr, uid, 'default', False, 'lang', ['res.partner'], lang) return True def load_lang(self, cr, uid, lang, lang_name=None): diff --git a/openerp/ir/ir.py b/openerp/ir/ir.py index 40a74eb9126..074f60788cb 100644 --- a/openerp/ir/ir.py +++ b/openerp/ir/ir.py @@ -24,16 +24,16 @@ import openerp.osv as osv import openerp.pooler as pooler def ir_set(cr, uid, key, key2, name, models, value, replace=True, isobject=False, meta=None): - obj = pooler.get_pool(cr.dbname).get('ir.values') - return obj.set(cr, uid, key, key2, name, models, value, replace, isobject, meta) + ir_values_obj = pooler.get_pool(cr.dbname).get('ir.values') + return ir_values_obj.set(cr, uid, key, key2, name, models, value, replace, isobject, meta) def ir_del(cr, uid, id): - obj = pooler.get_pool(cr.dbname).get('ir.values') - return obj.unlink(cr, uid, [id]) + ir_values_obj = pooler.get_pool(cr.dbname).get('ir.values') + return ir_values_obj.unlink(cr, uid, [id]) def ir_get(cr, uid, key, key2, models, meta=False, context=None, res_id_req=False): - obj = pooler.get_pool(cr.dbname).get('ir.values') - res = obj.get(cr, uid, key, key2, models, meta=meta, context=context, res_id_req=res_id_req) + ir_values_obj = pooler.get_pool(cr.dbname).get('ir.values') + res = ir_values_obj.get(cr, uid, key, key2, models, meta=meta, context=context, res_id_req=res_id_req) return res # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index b28390dbc85..a1f32631571 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -3229,7 +3229,7 @@ class orm(orm_template): self.check_access_rule(cr, uid, ids, 'unlink', context=context) pool_model_data = self.pool.get('ir.model.data') - pool_ir_values = self.pool.get('ir.values') + ir_values_obj = self.pool.get('ir.values') for sub_ids in cr.split_for_in_conditions(ids): cr.execute('delete from ' + self._table + ' ' \ 'where id IN %s', (sub_ids,)) @@ -3242,11 +3242,11 @@ class orm(orm_template): pool_model_data.unlink(cr, uid, referenced_ids, context=context) # For the same reason, removing the record relevant to ir_values - ir_value_ids = pool_ir_values.search(cr, uid, + ir_value_ids = ir_values_obj.search(cr, uid, ['|',('value','in',['%s,%s' % (self._name, sid) for sid in sub_ids]),'&',('res_id','in',list(sub_ids)),('model','=',self._name)], context=context) if ir_value_ids: - pool_ir_values.unlink(cr, uid, ir_value_ids, context=context) + ir_values_obj.unlink(cr, uid, ir_value_ids, context=context) for order, object, store_ids, fields in result_store: if object != self._name: diff --git a/openerp/tools/convert.py b/openerp/tools/convert.py index 5536f311eb8..9a24ac78e6d 100644 --- a/openerp/tools/convert.py +++ b/openerp/tools/convert.py @@ -304,9 +304,10 @@ form: module.record_id""" % (xml_id,) self.pool.get('ir.model.data')._unlink(cr, self.uid, d_model, ids) def _remove_ir_values(self, cr, name, value, model): - ir_value_ids = self.pool.get('ir.values').search(cr, self.uid, [('name','=',name),('value','=',value),('model','=',model)]) + ir_values_obj = self.pool.get('ir.values') + ir_value_ids = ir_values_obj.search(cr, self.uid, [('name','=',name),('value','=',value),('model','=',model)]) if ir_value_ids: - self.pool.get('ir.values').unlink(cr, self.uid, ir_value_ids) + ir_values_obj.unlink(cr, self.uid, ir_value_ids) self.pool.get('ir.model.data')._unlink(cr, self.uid, 'ir.values', ir_value_ids) return True From a37a4404fbef91712330e4ef48374c6f800610d1 Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Mon, 16 May 2011 17:33:31 +0200 Subject: [PATCH 07/11] [REF] consistent, grepable ir.values object naming. bzr revid: vmt@openerp.com-20110516153331-vusrrgr3hvlcyei0 --- addons/account/account.py | 6 +++--- addons/account/invoice.py | 3 ++- addons/account_sequence/account_sequence_installer.py | 3 ++- addons/audittrail/audittrail.py | 4 ++-- addons/email_template/email_template.py | 6 ++++-- addons/report_webkit/wizard/report_webkit_actions.py | 3 ++- 6 files changed, 15 insertions(+), 10 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index 0260c3fee5c..6b265f2d52a 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -2686,7 +2686,7 @@ class wizard_multi_charts_accounts(osv.osv_memory): analytic_journal_obj = self.pool.get('account.analytic.journal') obj_tax_code = self.pool.get('account.tax.code') obj_tax_code_template = self.pool.get('account.tax.code.template') - ir_values = self.pool.get('ir.values') + ir_values_obj = self.pool.get('ir.values') # Creating Account obj_acc_root = obj_multi.chart_template_id.account_root_id tax_code_root_id = obj_multi.chart_template_id.tax_code_root_id.id @@ -3022,10 +3022,10 @@ class wizard_multi_charts_accounts(osv.osv_memory): obj_ac_fp.create(cr, uid, vals_acc) if obj_multi.sale_tax: - ir_values.set(cr, uid, key='default', key2=False, name="taxes_id", company=obj_multi.company_id.id, + ir_values_obj.set(cr, uid, key='default', key2=False, name="taxes_id", company=obj_multi.company_id.id, models =[('product.product',False)], value=[tax_template_to_tax[obj_multi.sale_tax.id]]) if obj_multi.purchase_tax: - ir_values.set(cr, uid, key='default', key2=False, name="supplier_taxes_id", company=obj_multi.company_id.id, + ir_values_obj.set(cr, uid, key='default', key2=False, name="supplier_taxes_id", company=obj_multi.company_id.id, models =[('product.product',False)], value=[tax_template_to_tax[obj_multi.purchase_tax.id]]) wizard_multi_charts_accounts() diff --git a/addons/account/invoice.py b/addons/account/invoice.py index ce33266d9bf..77cf968355b 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -549,7 +549,8 @@ class account_invoice(osv.osv): journal_ids = obj_journal.search(cr, uid, [('company_id','=',company_id), ('type', '=', journal_type)]) if journal_ids: val['journal_id'] = journal_ids[0] - res_journal_default = self.pool.get('ir.values').get(cr, uid, 'default', 'type=%s' % (type), ['account.invoice']) + ir_values_obj = self.pool.get('ir.values') + res_journal_default = ir_values_obj.get(cr, uid, 'default', 'type=%s' % (type), ['account.invoice']) for r in res_journal_default: if r[1] == 'journal_id' and r[2] in journal_ids: val['journal_id'] = r[2] diff --git a/addons/account_sequence/account_sequence_installer.py b/addons/account_sequence/account_sequence_installer.py index 7b0a6e7446d..91eec5d58ad 100644 --- a/addons/account_sequence/account_sequence_installer.py +++ b/addons/account_sequence/account_sequence_installer.py @@ -75,7 +75,8 @@ class account_sequence_installer(osv.osv_memory): j_ids.append(journal.id) if j_ids: jou_obj.write(cr, uid, j_ids, {'internal_sequence_id': ir_seq}) - self.pool.get('ir.values').set(cr, uid, key='default', key2=False, name='internal_sequence_id', models =[('account.journal', False)], value=ir_seq) + ir_values_obj = self.pool.get('ir.values') + ir_values_obj.set(cr, uid, key='default', key2=False, name='internal_sequence_id', models =[('account.journal', False)], value=ir_seq) return res account_sequence_installer() diff --git a/addons/audittrail/audittrail.py b/addons/audittrail/audittrail.py index 12e2fe7dd26..cbe31f46d9c 100644 --- a/addons/audittrail/audittrail.py +++ b/addons/audittrail/audittrail.py @@ -105,7 +105,7 @@ class audittrail_rule(osv.osv): @return: True """ obj_action = self.pool.get('ir.actions.act_window') - val_obj = self.pool.get('ir.values') + ir_values_obj = self.pool.get('ir.values') value='' #start Loop for thisrule in self.browse(cr, uid, ids): @@ -116,7 +116,7 @@ class audittrail_rule(osv.osv): if w_id: obj_action.unlink(cr, uid, w_id) value = "ir.actions.act_window" + ',' + str(w_id[0]) - val_id = val_obj.search(cr, uid, [('model', '=', thisrule.object_id.model), ('value', '=', value)]) + val_id = ir_values_obj.search(cr, uid, [('model', '=', thisrule.object_id.model), ('value', '=', value)]) if val_id: res = ir.ir_del(cr, uid, val_id[0]) self.write(cr, uid, [thisrule.id], {"state": "draft"}) diff --git a/addons/email_template/email_template.py b/addons/email_template/email_template.py index bb0a1f94708..aabc211df11 100644 --- a/addons/email_template/email_template.py +++ b/addons/email_template/email_template.py @@ -280,7 +280,8 @@ This is useful for CRM leads for example"), 'target': 'new', 'auto_refresh':1 }, context) - vals['ref_ir_value'] = self.pool.get('ir.values').create(cr, uid, { + ir_values_obj = self.pool.get('ir.values') + vals['ref_ir_value'] = ir_values_obj.create(cr, uid, { 'name': _('Send Mail (%s)') % template_obj.name, 'model': src_obj, 'key2': 'client_action_multi', @@ -299,7 +300,8 @@ This is useful for CRM leads for example"), if template.ref_ir_act_window: self.pool.get('ir.actions.act_window').unlink(cr, uid, template.ref_ir_act_window.id, context) if template.ref_ir_value: - self.pool.get('ir.values').unlink(cr, uid, template.ref_ir_value.id, context) + ir_values_obj = self.pool.get('ir.values') + ir_values_obj.unlink(cr, uid, template.ref_ir_value.id, context) except: raise osv.except_osv(_("Warning"), _("Deletion of Record failed")) diff --git a/addons/report_webkit/wizard/report_webkit_actions.py b/addons/report_webkit/wizard/report_webkit_actions.py index 8a2b259351c..a0572abd463 100644 --- a/addons/report_webkit/wizard/report_webkit_actions.py +++ b/addons/report_webkit/wizard/report_webkit_actions.py @@ -66,7 +66,8 @@ class report_webkit_actions(osv.osv_memory): context.get('active_id'), context=context ) - ids = self.pool.get('ir.values').search( + ir_values_obj = self.pool.get('ir.values') + ids = ir_values_obj.search( cr, uid, [('value','=',report.type+','+str(context.get('active_id')))] From 8bed1f4c7b943ce48d8bc2373d5e97b56dd20010 Mon Sep 17 00:00:00 2001 From: Launchpad Translations on behalf of openerp <> Date: Tue, 17 May 2011 04:40:35 +0000 Subject: [PATCH 08/11] Launchpad automatic translations update. bzr revid: launchpad_translations_on_behalf_of_openerp-20110517044035-gujm452234pbeq87 --- addons/account/i18n/tr.po | 6 +- addons/account_analytic_analysis/i18n/tr.po | 15 ++++- addons/account_chart/i18n/tr.po | 6 +- addons/account_payment/i18n/tr.po | 44 +++++++++------ addons/crm_profiling/i18n/tr.po | 62 ++++++++++++++------- addons/mrp/i18n/tr.po | 6 +- addons/sale_crm/i18n/tr.po | 34 +++++------ 7 files changed, 108 insertions(+), 65 deletions(-) diff --git a/addons/account/i18n/tr.po b/addons/account/i18n/tr.po index 04241f7bed6..5e3b284cf52 100644 --- a/addons/account/i18n/tr.po +++ b/addons/account/i18n/tr.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2011-01-11 11:14+0000\n" -"PO-Revision-Date: 2011-05-15 19:58+0000\n" +"PO-Revision-Date: 2011-05-16 18:09+0000\n" "Last-Translator: Ayhan KIZILTAN \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: 2011-05-16 04:39+0000\n" +"X-Launchpad-Export-Date: 2011-05-17 04:40+0000\n" "X-Generator: Launchpad (build 12959)\n" #. module: account @@ -677,7 +677,7 @@ msgstr "SAJ" #. module: account #: help:account.bank.statement,balance_end_real:0 msgid "closing balance entered by the cashbox verifier" -msgstr "" +msgstr "Kasa doğrulayıcı tarafından girilen kapanış bilançosu" #. module: account #: view:account.period:0 diff --git a/addons/account_analytic_analysis/i18n/tr.po b/addons/account_analytic_analysis/i18n/tr.po index e9d2352971e..c4c5bd9c296 100644 --- a/addons/account_analytic_analysis/i18n/tr.po +++ b/addons/account_analytic_analysis/i18n/tr.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2011-01-11 11:14+0000\n" -"PO-Revision-Date: 2011-05-12 17:35+0000\n" +"PO-Revision-Date: 2011-05-16 19:22+0000\n" "Last-Translator: Ayhan KIZILTAN \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: 2011-05-13 04:35+0000\n" +"X-Launchpad-Export-Date: 2011-05-17 04:40+0000\n" "X-Generator: Launchpad (build 12959)\n" #. module: account_analytic_analysis @@ -57,6 +57,13 @@ msgid "" "You can also view the report of account analytic summary\n" "user-wise as well as month wise.\n" msgstr "" +"\n" +"Bu modül, servis şirketleri proje müdürlerinin önemli bilgileri\n" +"görebilmeleri için analiz hesabı görünümünde değişiklikler yapmak\n" +"için kullanılır. Her yöneticinin ilgili bilgiyi görmesi için menü eklenir..\n" +"\n" +"Hem kullanıcıya göre hem de aylara göre analiz hesabı özetini\n" +"görebilirsiniz.\n" #. module: account_analytic_analysis #: field:account.analytic.account,last_invoice_date:0 @@ -84,6 +91,8 @@ msgid "" "If invoice from the costs, this is the date of the latest work or cost that " "have been invoiced." msgstr "" +"Eğer fatura maliyetlerden çıkarılmışsa, bu en son işin yada faturalandırılan " +"maliyetin tarihidir." #. module: account_analytic_analysis #: model:ir.ui.menu,name:account_analytic_analysis.menu_invoicing @@ -106,6 +115,8 @@ msgid "" "Number of hours you spent on the analytic account (from timesheet). It " "computes on all journal of type 'general'." msgstr "" +"Analiz hesabı üzerinde çalışarak harcadığınız süredir (zaman " +"çizelgelerinden). 'Genel' tipteki bütün yevmiyeleri hesaplar." #. module: account_analytic_analysis #: field:account.analytic.account,remaining_hours:0 diff --git a/addons/account_chart/i18n/tr.po b/addons/account_chart/i18n/tr.po index 981f907a056..2e0655fa2c7 100644 --- a/addons/account_chart/i18n/tr.po +++ b/addons/account_chart/i18n/tr.po @@ -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: 2011-01-11 11:14+0000\n" -"PO-Revision-Date: 2011-05-15 10:15+0000\n" +"PO-Revision-Date: 2011-05-16 21:17+0000\n" "Last-Translator: Ayhan KIZILTAN \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: 2011-05-16 04:39+0000\n" +"X-Launchpad-Export-Date: 2011-05-17 04:40+0000\n" "X-Generator: Launchpad (build 12959)\n" #. module: account_chart @@ -24,4 +24,4 @@ msgstr "Minimal hesap grafiğini kaldır" #. module: account_chart #: model:ir.module.module,shortdesc:account_chart.module_meta_information msgid "Charts of Accounts" -msgstr "Muhasebe Hesap Planı" +msgstr "Hesap Planı" diff --git a/addons/account_payment/i18n/tr.po b/addons/account_payment/i18n/tr.po index c94a6602102..4983e5deb73 100644 --- a/addons/account_payment/i18n/tr.po +++ b/addons/account_payment/i18n/tr.po @@ -7,24 +7,24 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2011-01-11 11:14+0000\n" -"PO-Revision-Date: 2010-09-09 07:16+0000\n" -"Last-Translator: Fabien (Open ERP) \n" +"PO-Revision-Date: 2011-05-16 21:36+0000\n" +"Last-Translator: Ayhan KIZILTAN \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: 2011-04-29 05:21+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-05-17 04:40+0000\n" +"X-Generator: Launchpad (build 12959)\n" #. module: account_payment #: field:payment.order,date_scheduled:0 msgid "Scheduled date if fixed" -msgstr "" +msgstr "Sabitlenmişse Planlanan tarih" #. module: account_payment #: field:payment.line,currency:0 msgid "Partner Currency" -msgstr "" +msgstr "Paydaş Para Birimi" #. module: account_payment #: view:payment.order:0 @@ -34,13 +34,13 @@ msgstr "Taslak olarak Ayarla" #. module: account_payment #: help:payment.order,mode:0 msgid "Select the Payment Mode to be applied." -msgstr "" +msgstr "Uygulanacak Ödeme Şeklini Seç" #. module: account_payment #: view:payment.mode:0 #: view:payment.order:0 msgid "Group By..." -msgstr "" +msgstr "Gruplandır..." #. module: account_payment #: model:ir.module.module,description:account_payment.module_meta_information @@ -51,18 +51,23 @@ msgid "" "* a basic mechanism to easily plug various automated payment.\n" " " msgstr "" +"\n" +"Bu modül şunları sağlar :\n" +"* a fatura ödemelerini daha verimli yönetmek.\n" +"* a çeşitli otomatik ödemeleri kolaylıkla uygulayan bir temel mekanizma.\n" +" " #. module: account_payment #: field:payment.order,line_ids:0 msgid "Payment lines" -msgstr "" +msgstr "Ödeme kalemleri" #. module: account_payment #: view:payment.line:0 #: field:payment.line,info_owner:0 #: view:payment.order:0 msgid "Owner Account" -msgstr "" +msgstr "Hesap Sahibi" #. module: account_payment #: help:payment.order,state:0 @@ -71,6 +76,9 @@ msgid "" " Once the bank is confirmed the state is set to 'Confirmed'.\n" " Then the order is paid the state is 'Done'." msgstr "" +"Bir emir durumu 'Taslak' olarak belirlenmişse.\n" +" Banka durumun 'Onaylı' olarak ayarlanmasını onaylamışsa.\n" +" Sonra emir ödendi ve durum 'Bitti' olur." #. module: account_payment #: help:account.invoice,amount_to_pay:0 @@ -82,27 +90,27 @@ msgstr "" #. module: account_payment #: field:payment.mode,company_id:0 msgid "Company" -msgstr "" +msgstr "Firma" #. module: account_payment #: field:payment.order,date_prefered:0 msgid "Preferred date" -msgstr "" +msgstr "İstenen Tarih" #. module: account_payment #: selection:payment.line,state:0 msgid "Free" -msgstr "" +msgstr "Boş" #. module: account_payment #: field:payment.order.create,entries:0 msgid "Entries" -msgstr "Kayıtlar" +msgstr "Girişler" #. module: account_payment #: report:payment.order:0 msgid "Used Account" -msgstr "" +msgstr "Kullanılmış Hesap" #. module: account_payment #: field:payment.line,ml_maturity_date:0 @@ -113,17 +121,17 @@ msgstr "Vade Tarihi" #. module: account_payment #: constraint:account.move.line:0 msgid "You can not create move line on closed account." -msgstr "" +msgstr "Kapalı hesaplarda hareket satırı oluşturamazsınız." #. module: account_payment #: view:account.move.line:0 msgid "Account Entry Line" -msgstr "" +msgstr "Hesap Giriş Satırı" #. module: account_payment #: view:payment.order.create:0 msgid "_Add to payment order" -msgstr "" +msgstr "_Ödeme emrine ekle" #. module: account_payment #: model:ir.actions.act_window,name:account_payment.action_account_payment_populate_statement diff --git a/addons/crm_profiling/i18n/tr.po b/addons/crm_profiling/i18n/tr.po index f652cedc6b8..55d513ee713 100644 --- a/addons/crm_profiling/i18n/tr.po +++ b/addons/crm_profiling/i18n/tr.po @@ -7,14 +7,14 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2011-01-11 11:15+0000\n" -"PO-Revision-Date: 2010-09-09 07:09+0000\n" -"Last-Translator: Fabien (Open ERP) \n" +"PO-Revision-Date: 2011-05-16 20:15+0000\n" +"Last-Translator: Ayhan KIZILTAN \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: 2011-04-29 05:32+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-05-17 04:40+0000\n" +"X-Generator: Launchpad (build 12959)\n" #. module: crm_profiling #: view:crm_profiling.questionnaire:0 @@ -41,6 +41,21 @@ msgid "" "since it's the same which has been renamed.\n" " " msgstr "" +"\n" +" Bu modül, kullanıcıların paydaşları kendi içinde bölümlere ayırmasını " +"sağlar.\n" +" Daha önceki bölümlenmiş modüllerdeki profil kriterlerini kullanır ve " +"geliştirir. Bu da yeni anket konsepti sayesinde olur. Şimdi soruları yeniden " +"gruplandırıp anketlere koyabilir ve direkt olarak bir paydaş üzerinde " +"uygulayabilirsiniz\n" +" Çakıştıkları için daha önceki CRM & SRM\\Yapılandırma\\Bölümleme aracı " +"ile birleştirilmiştir.\n" +"\n" +" İlgili menü maddeleri \"CRM & SRM\\Yapılandırma\\Bölümleme\" içindedir.\n" +"\n" +" *Not: yeniden adlandırılanla aynı olmasına rağmen bu modül bölümleme " +"modülü ile uyumlu değildir.\n" +" " #. module: crm_profiling #: model:ir.actions.act_window,help:crm_profiling.open_questionnaires @@ -50,6 +65,10 @@ msgid "" "segmentation tool allows you to automatically assign a partner to a category " "according to his answers to the different questionnaires." msgstr "" +"Satış Takımınızın satış süreçlerinde doğru soruları sormaları için özel " +"konulu anketler düzenleyerek onlara yardımcı olabilirsiniz. Bölümleme aracı " +"ile, değişik anketlere verdikleri yanıtlara göre paydaşlarınızı otomatik " +"olarak sınıflandırabilirsiniz." #. module: crm_profiling #: field:crm_profiling.answer,question_id:0 @@ -66,23 +85,23 @@ msgstr "Soru Aç" #. module: crm_profiling #: constraint:res.partner:0 msgid "Error ! You can not create recursive associated members." -msgstr "" +msgstr "Hata ! Yinelenen ilişkili taraf ekleyemezsiniz." #. module: crm_profiling #: view:crm.segmentation:0 msgid "Partner Segmentations" -msgstr "" +msgstr "Paydaş Bölümlendirmeleri" #. module: crm_profiling #: field:crm_profiling.answer,name:0 #: model:ir.model,name:crm_profiling.model_crm_profiling_answer msgid "Answer" -msgstr "Cevap" +msgstr "Yanıt" #. module: crm_profiling #: model:ir.model,name:crm_profiling.model_crm_segmentation msgid "Partner Segmentation" -msgstr "" +msgstr "Paydaş Bölümlendirmesi" #. module: crm_profiling #: view:res.partner:0 @@ -93,6 +112,7 @@ msgstr "Profil" #: model:ir.module.module,shortdesc:crm_profiling.module_meta_information msgid "Crm Profiling management - To Perform Segmentation within Partners" msgstr "" +"Miy Profil Yönetimi - Paydaşlar arasında Bölümler oluşturmak içindir." #. module: crm_profiling #: view:crm_profiling.questionnaire:0 @@ -103,14 +123,14 @@ msgstr "Açıklama" #. module: crm_profiling #: field:crm.segmentation,answer_no:0 msgid "Excluded Answers" -msgstr "Hariç Tutulan Cevaplar" +msgstr "Hariç Olan Yanıtlar" #. module: crm_profiling #: view:crm_profiling.answer:0 #: view:crm_profiling.question:0 #: field:res.partner,answers_ids:0 msgid "Answers" -msgstr "Cevaplar" +msgstr "Yanıtlar" #. module: crm_profiling #: wizard_field:open_questionnaire,init,questionnaire_name:0 @@ -136,32 +156,34 @@ msgid "" "part of the segmentation rule. If not checked, " "the criteria beneath will be ignored" msgstr "" +"Bu sekmeyi bölümleme kuralının bir parçası olarak kullanmak istiyorsanız bu " +"kutuyu işaretleyin. İşaretlemezseniz buradaki kriter gözardı edilecektir." #. module: crm_profiling #: constraint:crm.segmentation:0 msgid "Error ! You can not create recursive profiles." -msgstr "" +msgstr "Hata ! Yinelen profiller oluşturamazsınız." #. module: crm_profiling #: field:crm.segmentation,profiling_active:0 msgid "Use The Profiling Rules" -msgstr "" +msgstr "Profil Kurallarını Kullan" #. module: crm_profiling #: view:crm_profiling.question:0 #: field:crm_profiling.question,answers_ids:0 msgid "Avalaible answers" -msgstr "Mevcut Cevaplar" +msgstr "Uygun Yanıtlar" #. module: crm_profiling #: field:crm.segmentation,answer_yes:0 msgid "Included Answers" -msgstr "Dahil Edilen Cevaplar" +msgstr "Dahil Olan Yanıtlar" #. module: crm_profiling #: field:crm.segmentation,child_ids:0 msgid "Child Profiles" -msgstr "" +msgstr "Alt Profiller" #. module: crm_profiling #: view:crm_profiling.question:0 @@ -174,18 +196,18 @@ msgstr "Sorular" #. module: crm_profiling #: field:crm.segmentation,parent_id:0 msgid "Parent Profile" -msgstr "" +msgstr "Ana Profil" #. module: crm_profiling #: wizard_button:open_questionnaire,init,end:0 #: wizard_button:open_questionnaire,open,end:0 msgid "Cancel" -msgstr "İptal" +msgstr "Vazgeç" #. module: crm_profiling #: model:ir.model,name:crm_profiling.model_res_partner msgid "Partner" -msgstr "" +msgstr "Paydaş" #. module: crm_profiling #: code:addons/crm_profiling/crm_profiling.py:178 @@ -199,12 +221,12 @@ msgstr "Anket" #. module: crm_profiling #: model:ir.actions.wizard,name:crm_profiling.wizard_open_questionnaire msgid "Using a questionnaire" -msgstr "Anket Kullanımı" +msgstr "Bir anket kullanımı" #. module: crm_profiling #: wizard_button:open_questionnaire,open,compute:0 msgid "Save Data" -msgstr "" +msgstr "Veriyi Kaydet" #~ msgid "Invalid XML for View Architecture!" #~ msgstr "Görüntüleme mimarisi için Geçersiz XML" diff --git a/addons/mrp/i18n/tr.po b/addons/mrp/i18n/tr.po index 1783b03ed2f..05c4042c6f9 100644 --- a/addons/mrp/i18n/tr.po +++ b/addons/mrp/i18n/tr.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2011-01-11 11:15+0000\n" -"PO-Revision-Date: 2011-05-10 17:39+0000\n" +"PO-Revision-Date: 2011-05-16 20:21+0000\n" "Last-Translator: Ayhan KIZILTAN \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: 2011-05-11 04:36+0000\n" +"X-Launchpad-Export-Date: 2011-05-17 04:39+0000\n" "X-Generator: Launchpad (build 12959)\n" #. module: mrp @@ -1018,6 +1018,8 @@ msgid "" "Number of operations this Work Center can do in parallel. If this Work " "Center represents a team of 5 workers, the capacity per cycle is 5." msgstr "" +"Bu İş Merkezinin paralel olarak yapacağı işlem sayısı. Bu İş Merkezi 5 " +"kişilk bir takımı yansıtıyorsa her dönemin kapasitesi 5 tir." #. module: mrp #: model:process.transition,note:mrp.process_transition_servicerfq0 diff --git a/addons/sale_crm/i18n/tr.po b/addons/sale_crm/i18n/tr.po index 163264792c6..5dc35cd00f3 100644 --- a/addons/sale_crm/i18n/tr.po +++ b/addons/sale_crm/i18n/tr.po @@ -7,14 +7,14 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2011-01-11 11:16+0000\n" -"PO-Revision-Date: 2010-08-03 06:49+0000\n" -"Last-Translator: Mantavya Gajjar (Open ERP) \n" +"PO-Revision-Date: 2011-05-16 21:14+0000\n" +"Last-Translator: Ayhan KIZILTAN \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: 2011-04-29 05:01+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-05-17 04:39+0000\n" +"X-Generator: Launchpad (build 12959)\n" #. module: sale_crm #: field:crm.make.sale,partner_id:0 @@ -24,19 +24,19 @@ msgstr "Müşteri" #. module: sale_crm #: view:crm.make.sale:0 msgid "Convert to Quotation" -msgstr "Fiyat teklifine çevir" +msgstr "Teklife Dönüştür" #. module: sale_crm #: code:addons/sale_crm/wizard/crm_make_sale.py:108 #, python-format msgid "Opportunity '%s' is converted to Quotation." -msgstr "" +msgstr "'%s' Fırsatı Teklife dönüştürüldü." #. module: sale_crm #: code:addons/sale_crm/wizard/crm_make_sale.py:89 #, python-format msgid "Data Insufficient!" -msgstr "Yetersiz bilgi!" +msgstr "Yetersiz Veri" #. module: sale_crm #: code:addons/sale_crm/wizard/crm_make_sale.py:89 @@ -74,7 +74,7 @@ msgstr "_Oluştur" #. module: sale_crm #: sql_constraint:sale.order:0 msgid "Order Reference must be unique !" -msgstr "Sipariş referans no'su tek olmalı !" +msgstr "Sipariş referansı tek olmalı !" #. module: sale_crm #: help:crm.make.sale,close:0 @@ -98,7 +98,7 @@ msgstr "Aylık Ciro" #: code:addons/sale_crm/wizard/crm_make_sale.py:110 #, python-format msgid "Converted to Sales Quotation(id: %s)." -msgstr "Satış teklifine çevrildi (id: %s)." +msgstr "Satış Teklifine Dönüştürüldü(no: %s)." #. module: sale_crm #: code:addons/sale_crm/wizard/crm_make_sale.py:92 @@ -109,43 +109,43 @@ msgstr "Fırsat: %s" #. module: sale_crm #: model:ir.module.module,shortdesc:sale_crm.module_meta_information msgid "Creates Sales order from Opportunity" -msgstr "" +msgstr "Fırsattan Satış Siparişi Oluşturur" #. module: sale_crm #: model:ir.actions.act_window,name:sale_crm.action_quotation_for_sale_crm msgid "Quotations" -msgstr "Fiyat teklifleri" +msgstr "Teklifler" #. module: sale_crm #: field:crm.make.sale,shop_id:0 msgid "Shop" -msgstr "Mağaza" +msgstr "İş Yeri" #. module: sale_crm #: view:board.board:0 msgid "Opportunities by Stage" -msgstr "" +msgstr "Aşamalara göre Fırsatlar" #. module: sale_crm #: view:board.board:0 msgid "My Quotations" -msgstr "Benim fiyat tekliflerim" +msgstr "Tekliflerim" #. module: sale_crm #: field:crm.make.sale,close:0 msgid "Close Opportunity" -msgstr "" +msgstr "Fırsatı Kapat" #. module: sale_crm #: view:sale.order:0 #: field:sale.order,section_id:0 msgid "Sales Team" -msgstr "Satis Birimi / Personeli" +msgstr "Satış Takımı" #. module: sale_crm #: model:ir.actions.act_window,name:sale_crm.action_crm_make_sale msgid "Make Quotation" -msgstr "Teklif Ver" +msgstr "Teklif Hazırla" #. module: sale_crm #: view:crm.make.sale:0 From 9d49ade263ed54e394ddf34f9415da99cb335aef Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Tue, 17 May 2011 11:26:27 +0200 Subject: [PATCH 09/11] [FIX] Fixed action flags bzr revid: fme@openerp.com-20110517092627-oz2rj1hkpfi5zp30 --- addons/base/static/src/js/views.js | 14 ++++++++++++-- addons/base_dashboard/static/src/js/dashboard.js | 11 ++++++----- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/addons/base/static/src/js/views.js b/addons/base/static/src/js/views.js index dee28dfafa9..c7363fbb9c7 100644 --- a/addons/base/static/src/js/views.js +++ b/addons/base/static/src/js/views.js @@ -24,6 +24,7 @@ openerp.base.ActionManager = openerp.base.Controller.extend({ sidebar : true, search_view : true, new_window : false, + views_switcher : true, toolbar : true, pager : true }, action.flags || {}); @@ -46,6 +47,7 @@ openerp.base.ActionManager = openerp.base.Controller.extend({ viewmanager.start(); this.dialog_stack.push(viewmanager); } else if (action.flags.new_window) { + action.flags.new_window = false; this.rpc("/base/session/save_session_action", { the_action : action}, function(key) { var url = window.location.protocol + "//" + window.location.host + window.location.pathname + "?" + jQuery.param({ s_action : "" + key }); @@ -79,6 +81,7 @@ openerp.base.ViewManager = openerp.base.Controller.extend({ this.active_view = null; this.views_src = views; this.views = {}; + this.flags = this.flags || {}; }, /** * @returns {jQuery.Deferred} initial view loading promise @@ -93,6 +96,9 @@ openerp.base.ViewManager = openerp.base.Controller.extend({ _.each(this.views_src, function(view) { self.views[view[1]] = { view_id: view[0], controller: null }; }); + if (this.flags.views_switcher === false) { + this.$element.find('.oe_vm_switch').hide(); + } // switch to the first one in sequence return this.on_mode_switch(this.views_src[0][1]); }, @@ -116,7 +122,7 @@ openerp.base.ViewManager = openerp.base.Controller.extend({ this.views[view_type].controller = controller; } - if(this.searchview) { + if (this.searchview) { if (view.controller.searchable === false) { this.searchview.hide(); } else { @@ -152,6 +158,9 @@ openerp.base.ViewManager = openerp.base.Controller.extend({ this.searchview.stop(); } this.searchview = new openerp.base.SearchView(this, this.session, this.element_id + "_search", this.dataset, view_id, search_defaults); + if (this.flags.search_view === false) { + this.searchview.hide(); + } this.searchview.on_search.add(function(domains, contexts, groupbys) { self.views[self.active_view].controller.do_search.call( self, domains.concat(self.domains()), @@ -201,7 +210,8 @@ openerp.base.ViewManagerAction = openerp.base.ViewManager.extend({ } this._super(session, element_id, dataset, action.views); this.action = action; - if (action.flags.sidebar) { + this.flags = this.action.flags || {}; + if (this.flags.sidebar) { this.sidebar = new openerp.base.Sidebar(null, this); } }, diff --git a/addons/base_dashboard/static/src/js/dashboard.js b/addons/base_dashboard/static/src/js/dashboard.js index 34d09f80e62..1d8f433bd40 100644 --- a/addons/base_dashboard/static/src/js/dashboard.js +++ b/addons/base_dashboard/static/src/js/dashboard.js @@ -55,10 +55,11 @@ openerp.base.form.Action = openerp.base.form.Widget.extend({ on_load_action: function(result) { var action = result.action; - action.search_view = false; - action.no_sidebar = true; - action.search_view_id = false; - + action.flags = { + search_view : false, + sidebar : false, + views_switcher : false + } var node_attrs = this.node.attrs; var get_column = ['first', 'second', 'third']; var board_element = this.board.element.find('[id=column-'+get_column[this.child_index]+']'); @@ -101,4 +102,4 @@ openerp.base.form.Vpaned = openerp.base.form.Widget.extend({ openerp.base.form.widgets.add('hpaned', 'openerp.base.form.Board'); openerp.base.form.widgets.add('vpaned', 'openerp.base.form.Vpaned'); openerp.base.form.widgets.add('action', 'openerp.base.form.Action'); -} \ No newline at end of file +} From fba3f1bfc7315bdd13eb105769b8ef0ecdd72518 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 17 May 2011 11:35:03 +0200 Subject: [PATCH 10/11] [IMP] better use underscore methods, don't subscript a 1-character string to get its first character (that's an identity function) bzr revid: xmo@openerp.com-20110517093503-9kb6newmr7q30z4f --- addons/base/static/src/js/form.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/base/static/src/js/form.js b/addons/base/static/src/js/form.js index dc631c1256a..deed1c526d0 100644 --- a/addons/base/static/src/js/form.js +++ b/addons/base/static/src/js/form.js @@ -321,7 +321,7 @@ openerp.base.form.compute_domain = function(expr, fields) { var ex = expr[i]; if (ex.length == 1) { var top = stack.pop(); - switch (ex[0]) { + switch (ex) { case '|': stack.push(stack.pop() || top); continue; @@ -332,7 +332,7 @@ openerp.base.form.compute_domain = function(expr, fields) { stack.push(!top); continue; default: - throw new Error('Unknown domain operator ' + ex[0]); + throw new Error('Unknown domain operator ' + ex); } } @@ -362,17 +362,17 @@ openerp.base.form.compute_domain = function(expr, fields) { stack.push(field >= val); break; case 'in': - stack.push(_.indexOf(val, field) > -1); + stack.push(_(val).contains(field)); break; case 'not in': - stack.push(_.indexOf(val, field) == -1); + stack.push(!_(val).contains(field)); break; default: this.log("Unsupported operator in attrs :", op); } } - return _.indexOf(stack, false) == -1; -} + return _.all(stack); +}; openerp.base.form.Widget = openerp.base.Controller.extend({ init: function(view, node) { From a6568345163fbcbd6f0e563952b976c47cc087a8 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 17 May 2011 11:59:23 +0200 Subject: [PATCH 11/11] [IMP] add ability to return a different object (than 'this') from Class.init, for factory-type scenarios bzr revid: xmo@openerp.com-20110517095923-8lr1pjelf94nwu44 --- addons/base/static/src/js/base.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/base/static/src/js/base.js b/addons/base/static/src/js/base.js index 19d608e0260..7ee9c947d1e 100644 --- a/addons/base/static/src/js/base.js +++ b/addons/base/static/src/js/base.js @@ -44,8 +44,11 @@ // The dummy class constructor function Class() { // All construction is actually done in the init method - if ( !initializing && this.init ) - this.init.apply(this, arguments); + if ( !initializing && this.init ) { + var ret = this.init.apply(this, arguments); + if (ret) { return ret; } + } + return this; } // Populate our constructed prototype object