From b495cec9d12666240ff4d8a31dc3ec0b97dcbcaf Mon Sep 17 00:00:00 2001 From: Husen Daudi Date: Wed, 28 May 2008 03:03:38 +0000 Subject: [PATCH 001/202] Module for password encryption. bzr revid: hda@tinyerp.com-20080528030338-7izwvtmmmizg9sp5 --- addons/base_crypt/__init__.py | 31 ++++++ addons/base_crypt/__terp__.py | 16 +++ addons/base_crypt/base_update.xml | 29 +++++ addons/base_crypt/crypt.py | 173 ++++++++++++++++++++++++++++++ 4 files changed, 249 insertions(+) create mode 100644 addons/base_crypt/__init__.py create mode 100644 addons/base_crypt/__terp__.py create mode 100644 addons/base_crypt/base_update.xml create mode 100644 addons/base_crypt/crypt.py diff --git a/addons/base_crypt/__init__.py b/addons/base_crypt/__init__.py new file mode 100644 index 00000000000..88854384b0e --- /dev/null +++ b/addons/base_crypt/__init__.py @@ -0,0 +1,31 @@ +############################################################################## +# +# Copyright (c) 2004 TINY SPRL. (http://tiny.be) All Rights Reserved. +# Fabien Pinckaers +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsability of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# garantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## + +from service import security +import crypt + diff --git a/addons/base_crypt/__terp__.py b/addons/base_crypt/__terp__.py new file mode 100644 index 00000000000..b6780541289 --- /dev/null +++ b/addons/base_crypt/__terp__.py @@ -0,0 +1,16 @@ +{ + "name" : "Base", + "version" : "1.0", + "author" : "Tiny", + "website" : "http://tinyerp.com", + "category" : "Generic Modules/Base", + "description": "Module for password encryption.", + "depends" : ["base"], + "init_xml" : [], + "demo_xml" : [], + "update_xml" : [ + "base_update.xml", + ], + "active": False, + "installable": True, +} diff --git a/addons/base_crypt/base_update.xml b/addons/base_crypt/base_update.xml new file mode 100644 index 00000000000..06de41b4850 --- /dev/null +++ b/addons/base_crypt/base_update.xml @@ -0,0 +1,29 @@ + + + + + + res.users.form.modif.inherit + res.users + form + + + + + + + + + + res.users.form.inherit1 + res.users + form + + + + + + + + + diff --git a/addons/base_crypt/crypt.py b/addons/base_crypt/crypt.py new file mode 100644 index 00000000000..1d461463a27 --- /dev/null +++ b/addons/base_crypt/crypt.py @@ -0,0 +1,173 @@ +from random import seed, sample +from string import letters, digits +from osv import fields,osv +import pooler +import tools +from service import security + +magic_md5 = '$1$' + +def gen_salt( length=8, symbols=letters + digits ): + seed() + return ''.join( sample( symbols, length ) ) + +import md5 + +def encrypt_md5( raw_pw, salt, magic=magic_md5 ): + hash = md5.new( raw_pw + magic + salt ) + stretch = md5.new( raw_pw + salt + raw_pw).digest() + + for i in range( 0, len( raw_pw ) ): + hash.update( stretch[i % 16] ) + + i = len( raw_pw ) + + while i: + if i & 1: + hash.update('\x00') + else: + hash.update( raw_pw[0] ) + i >>= 1 + + saltedmd5 = hash.digest() + + for i in range( 1000 ): + hash = md5.new() + + if i & 1: + hash.update( raw_pw ) + else: + hash.update( saltedmd5 ) + + if i % 3: + hash.update( salt ) + if i % 7: + hash.update( raw_pw ) + if i & 1: + hash.update( saltedmd5 ) + else: + hash.update( raw_pw ) + + saltedmd5 = hash.digest() + + itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' + + rearranged = '' + for a, b, c in ((0, 6, 12), (1, 7, 13), (2, 8, 14), (3, 9, 15), (4, 10, 5)): + v = ord( saltedmd5[a] ) << 16 | ord( saltedmd5[b] ) << 8 | ord( saltedmd5[c] ) + + for i in range(4): + rearranged += itoa64[v & 0x3f] + v >>= 6 + + v = ord( saltedmd5[11] ) + + for i in range( 2 ): + rearranged += itoa64[v & 0x3f] + v >>= 6 + + return magic + salt + '$' + rearranged + +_salt_cache = {} + +def login(db, login, password): + cr = pooler.get_db(db).cursor() + cr.execute( 'select password from res_users where login=%s', (login.encode( 'utf-8' ),) ) + stored_pw = cr.fetchone() + + if stored_pw: + stored_pw = stored_pw[0] + else: + # Return early if no one has a login name like that. + return False + + # Calculate a new password ('updated_pw') from 'stored_pw' if the + # latter isn't encrypted yet. Use that to update the database entry. + # Also update the 'stored_pw' to reflect the change. + + if stored_pw[0:3] != magic_md5: + updated_pw = encrypt_md5( stored_pw, gen_salt() ) + cr.execute( 'update res_users set password=%s where login=%s', (updated_pw.encode( 'utf-8' ), login.encode( 'utf-8' ),) ) + cr.commit() + + cr.execute( 'select password from res_users where login=%s', (login.encode( 'utf-8' ),) ) + stored_pw = cr.fetchone()[0] + + # Calculate an encrypted password from the user-provided + # password ('encrypted_pw'). + + salt = _salt_cache[password] = stored_pw[3:11] + encrypted_pw = encrypt_md5( password, salt ) + + # Retrieve a user id from the database, factoring in an encrypted + # password. + + cr.execute('select id from res_users where login=%s and password=%s and active', (login.encode('utf-8'), encrypted_pw.encode('utf-8'))) + res = cr.fetchone() + cr.close() + + if res: + return res[0] + else: + return False + +#def check_super(passwd): +# salt = _salt_cache[passwd] +# if encrypt_md5( passwd, salt ) == tools.config['admin_passwd']: +# return True +# else: +# raise Exception('AccessDenied') + +def check(db, uid, passwd): + if security._uid_cache.has_key( uid ) and (security._uid_cache[uid]==passwd): + return True + cr = pooler.get_db(db).cursor() + salt = _salt_cache[passwd] + cr.execute(' select count(*) from res_users where id=%d and password=%s', (int(uid), encrypt_md5( passwd, salt )) ) + res = cr.fetchone()[0] + cr.close() + if not bool(res): + raise Exception('AccessDenied') + if res: + security._uid_cache[uid] = passwd + return bool(res) + + +def access(db, uid, passwd, sec_level, ids): + cr = pooler.get_db(db).cursor() + salt = _salt_cache[passwd] + cr.execute('select id from res_users where id=%s and password=%s', (uid, encrypt_md5( passwd, salt )) ) + res = cr.fetchone() + cr.close() + if not res: + raise Exception('Bad username or password') + return res[0] + +# check if module is installed or not +security.login=login +#security.check_super=check_super +security.access=access +security.check=check + +class users(osv.osv): + _name="res.users" + _inherit="res.users" + # agi - 022108 + # Add handlers for 'input_pw' field. + + def set_pw( self, cr, uid, id, name, value, args, context ): + self.write( cr, uid, id, { 'password' : encrypt_md5( value, gen_salt() ) } ) + del value + + def get_pw( self, cr, uid, ids, name, args, context ): + res = {} + for id in ids: + res[id] = '' + return res + + # Continuing to original code. + + _columns = { + 'input_pw': fields.function( get_pw, fnct_inv=set_pw, type='char', method=True, size=20, string='Password', invisible=True), + } +users() \ No newline at end of file From e830358b25b74430c8bceb3e724f774d440a09d1 Mon Sep 17 00:00:00 2001 From: Husen Daudi Date: Thu, 29 May 2008 04:46:07 +0000 Subject: [PATCH 002/202] Add copyrights bzr revid: hda@tinyerp.com-20080529044607-09pqwt6ihm3j62go --- addons/base_crypt/crypt.py | 54 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/addons/base_crypt/crypt.py b/addons/base_crypt/crypt.py index 1d461463a27..7d2ab0e8cf7 100644 --- a/addons/base_crypt/crypt.py +++ b/addons/base_crypt/crypt.py @@ -1,3 +1,41 @@ +# Notice: +# ------ +# +# Implements encrypting functions. +# +# Copyright (c) 2008, F S 3 Consulting Inc. +# +# Maintainer: +# Alec Joseph Rivera (agifs3.ph) +# +# +# Warning: +# ------- +# +# This program as such is intended to be used by professional programmers +# who take the whole responsibility of assessing all potential consequences +# resulting from its eventual inadequacies and bugs. End users who are +# looking for a ready-to-use solution with commercial guarantees and +# support are strongly adviced to contract a Free Software Service Company. +# +# This program is Free Software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the: +# +# Free Software Foundation, Inc. +# 59 Temple Place - Suite 330 +# Boston, MA 02111-1307 +# USA. + from random import seed, sample from string import letters, digits from osv import fields,osv @@ -11,6 +49,22 @@ def gen_salt( length=8, symbols=letters + digits ): seed() return ''.join( sample( symbols, length ) ) +# The encrypt_md5 is based on Mark Johnson's md5crypt.py, which in turn is +# based on FreeBSD src/lib/libcrypt/crypt.c (1.2) by Poul-Henning Kamp. +# Mark's port can be found in ActiveState ASPN Python Cookbook. Kudos to +# Poul and Mark. -agi +# +# Original license: +# +# * "THE BEER-WARE LICENSE" (Revision 42): +# * +# * wrote this file. As long as you retain this +# * notice you can do whatever you want with this stuff. If we meet some +# * day, and you think this stuff is worth it, you can buy me a beer in +# * return. +# * +# * Poul-Henning Kamp + import md5 def encrypt_md5( raw_pw, salt, magic=magic_md5 ): From 601f6d412b0e7f4c654b086632f0df9d0f4ca889 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Thu, 29 May 2008 11:14:58 +0000 Subject: [PATCH 003/202] Changed author bzr revid: fp@tinyerp.com-20080529111458-x1rf2m3z134qs710 --- addons/base_crypt/__terp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/base_crypt/__terp__.py b/addons/base_crypt/__terp__.py index b6780541289..8c93f4e9e01 100644 --- a/addons/base_crypt/__terp__.py +++ b/addons/base_crypt/__terp__.py @@ -1,7 +1,7 @@ { "name" : "Base", "version" : "1.0", - "author" : "Tiny", + "author" : "FS3 , Review Tiny", "website" : "http://tinyerp.com", "category" : "Generic Modules/Base", "description": "Module for password encryption.", From f522b775740cca110ae434e7b687d83501e6465c Mon Sep 17 00:00:00 2001 From: Husen Daudi Date: Wed, 11 Jun 2008 07:03:22 +0000 Subject: [PATCH 004/202] Improve code to check cache (reference: HMO) bzr revid: hda@tinyerp.com-20080611070322-smrboaciwsho7env --- addons/base_crypt/crypt.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/addons/base_crypt/crypt.py b/addons/base_crypt/crypt.py index 7d2ab0e8cf7..c3d7a71e5ef 100644 --- a/addons/base_crypt/crypt.py +++ b/addons/base_crypt/crypt.py @@ -176,6 +176,14 @@ def check(db, uid, passwd): if security._uid_cache.has_key( uid ) and (security._uid_cache[uid]==passwd): return True cr = pooler.get_db(db).cursor() + if passwd not in _salt_cache: + cr.execute( 'select login from res_users where id=%d', (uid,) ) + stored_login = cr.fetchone() + if stored_login: + stored_login = stored_login[0] + + if not login(db,stored_login,passwd): + return False salt = _salt_cache[passwd] cr.execute(' select count(*) from res_users where id=%d and password=%s', (int(uid), encrypt_md5( passwd, salt )) ) res = cr.fetchone()[0] From eebf1d9860aefdd6933f0a3dbf19d764d5b1d9aa Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Mon, 22 Sep 2008 10:10:56 +0200 Subject: [PATCH 005/202] merge bzr revid: vmt@openerp.com-20080922081056-td14d6etaevzjbzm --- addons/base_crypt/base_update.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/base_crypt/base_update.xml b/addons/base_crypt/base_update.xml index 06de41b4850..8a0a5443eb8 100644 --- a/addons/base_crypt/base_update.xml +++ b/addons/base_crypt/base_update.xml @@ -1,5 +1,5 @@ - + @@ -26,4 +26,4 @@ - + From 055921341c897b1e909a05ccc7e5e10c19fdf01f Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Tue, 4 Nov 2008 17:22:16 +0100 Subject: [PATCH 006/202] merge bzr revid: vmt@openerp.com-20081104162216-vrbjrkewfuejwj3r --- addons/base_crypt/__init__.py | 33 +++++++++++++-------------------- addons/base_crypt/__terp__.py | 21 +++++++++++++++++++++ 2 files changed, 34 insertions(+), 20 deletions(-) diff --git a/addons/base_crypt/__init__.py b/addons/base_crypt/__init__.py index 88854384b0e..db124dc453f 100644 --- a/addons/base_crypt/__init__.py +++ b/addons/base_crypt/__init__.py @@ -1,28 +1,21 @@ ############################################################################## # -# Copyright (c) 2004 TINY SPRL. (http://tiny.be) All Rights Reserved. -# Fabien Pinckaers +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2008 Tiny SPRL (). All Rights Reserved +# $Id$ # -# WARNING: This program as such is intended to be used by professional -# programmers who take the whole responsability of assessing all potential -# consequences resulting from its eventual inadequacies and bugs -# End users who are looking for a ready-to-use solution with commercial -# garantees and support are strongly adviced to contract a Free Software -# Service Company +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. # -# This program is Free Software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . # ############################################################################## diff --git a/addons/base_crypt/__terp__.py b/addons/base_crypt/__terp__.py index 8c93f4e9e01..8779f7381ee 100644 --- a/addons/base_crypt/__terp__.py +++ b/addons/base_crypt/__terp__.py @@ -1,3 +1,24 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2008 Tiny SPRL (). All Rights Reserved +# $Id$ +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +############################################################################## { "name" : "Base", "version" : "1.0", From 062c792152b62c4f7190bea58f221df500d49615 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Thu, 19 Feb 2009 19:51:09 +0100 Subject: [PATCH 007/202] merge bzr revid: vmt@openerp.com-20090219185109-qlyshbp6av7njujp --- addons/base_crypt/__terp__.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/addons/base_crypt/__terp__.py b/addons/base_crypt/__terp__.py index 8779f7381ee..6a3164f9aec 100644 --- a/addons/base_crypt/__terp__.py +++ b/addons/base_crypt/__terp__.py @@ -20,18 +20,18 @@ # ############################################################################## { - "name" : "Base", - "version" : "1.0", - "author" : "FS3 , Review Tiny", - "website" : "http://tinyerp.com", - "category" : "Generic Modules/Base", - "description": "Module for password encryption.", - "depends" : ["base"], - "init_xml" : [], - "demo_xml" : [], - "update_xml" : [ - "base_update.xml", - ], - "active": False, - "installable": True, + "name" : "Base", + "version" : "1.0", + "author" : "FS3 , Review Tiny", + "website" : "http://www.openerp.com", + "category" : "Generic Modules/Base", + "description": "Module for password encryption.", + "depends" : ["base"], + "init_xml" : [], + "demo_xml" : [], + "update_xml" : [ + "base_update.xml", + ], + "active": False, + "installable": True, } From ccfe97090b321a39f82a2d6b76f9ad10152d68f4 Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Thu, 15 Oct 2009 19:27:18 +0530 Subject: [PATCH 008/202] [MERGE]:merging from the same branch bzr revid: vmt@openerp.com-20091015135718-cr715tqqm9ub6amz --- addons/base_crypt/__init__.py | 19 +++++++++---------- addons/base_crypt/__terp__.py | 19 +++++++++---------- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/addons/base_crypt/__init__.py b/addons/base_crypt/__init__.py index db124dc453f..a8b9a6b0740 100644 --- a/addons/base_crypt/__init__.py +++ b/addons/base_crypt/__init__.py @@ -1,21 +1,20 @@ ############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2008 Tiny SPRL (). All Rights Reserved -# $Id$ +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2009 Tiny SPRL (). # # This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# GNU Affero General Public License for more details. # -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . # ############################################################################## diff --git a/addons/base_crypt/__terp__.py b/addons/base_crypt/__terp__.py index 6a3164f9aec..c8454fff0cc 100644 --- a/addons/base_crypt/__terp__.py +++ b/addons/base_crypt/__terp__.py @@ -1,22 +1,21 @@ # -*- encoding: utf-8 -*- ############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2008 Tiny SPRL (). All Rights Reserved -# $Id$ +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2009 Tiny SPRL (). # # This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# GNU Affero General Public License for more details. # -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . # ############################################################################## { From 7e098c3fa9b88b8a22e945dc5b810a2758322fc4 Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Wed, 25 Nov 2009 15:20:36 +0530 Subject: [PATCH 009/202] [MERGE]: merging from the same branch bzr revid: vmt@openerp.com-20091125095036-klz8sos8eey5urnp --- addons/base_crypt/__terp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/base_crypt/__terp__.py b/addons/base_crypt/__terp__.py index c8454fff0cc..400a277ca81 100644 --- a/addons/base_crypt/__terp__.py +++ b/addons/base_crypt/__terp__.py @@ -19,7 +19,7 @@ # ############################################################################## { - "name" : "Base", + "name" : "Base - Password Encryption", "version" : "1.0", "author" : "FS3 , Review Tiny", "website" : "http://www.openerp.com", From 0232413678ff45f8b3beee4e026204898920fae2 Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Wed, 25 Nov 2009 19:44:35 +0530 Subject: [PATCH 010/202] [MERGE]: merging from same branch bzr revid: vmt@openerp.com-20091125141435-vsxil5iy8pa69jgj --- addons/base_crypt/crypt.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/base_crypt/crypt.py b/addons/base_crypt/crypt.py index c3d7a71e5ef..2d29704aeb0 100644 --- a/addons/base_crypt/crypt.py +++ b/addons/base_crypt/crypt.py @@ -41,6 +41,7 @@ from string import letters, digits from osv import fields,osv import pooler import tools +from tools.translate import _ from service import security magic_md5 = '$1$' @@ -218,6 +219,8 @@ class users(osv.osv): # Add handlers for 'input_pw' field. def set_pw( self, cr, uid, id, name, value, args, context ): + if not value: + raise osv.except_osv(_('Error'), _("Please specify the password !")) self.write( cr, uid, id, { 'password' : encrypt_md5( value, gen_salt() ) } ) del value From 0a3c2bf26d4f899aa1f18519e9f426f3f91d173c Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Tue, 1 Dec 2009 15:49:51 +0530 Subject: [PATCH 011/202] [MERGE]: merging from same branch bzr revid: vmt@openerp.com-20091201101951-0gqnmboirjoelwly --- addons/base_crypt/i18n/fr_BE.po | 37 +++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 addons/base_crypt/i18n/fr_BE.po diff --git a/addons/base_crypt/i18n/fr_BE.po b/addons/base_crypt/i18n/fr_BE.po new file mode 100644 index 00000000000..d62691cb699 --- /dev/null +++ b/addons/base_crypt/i18n/fr_BE.po @@ -0,0 +1,37 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * base_crypt +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 5.0.6\n" +"Report-Msgid-Bugs-To: support@openerp.com\n" +"POT-Creation-Date: 2009-11-26 09:12:09+0000\n" +"PO-Revision-Date: 2009-11-26 09:12:09+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: base_crypt +#: model:ir.module.module,description:base_crypt.module_meta_information +msgid "Module for password encryption." +msgstr "" + +#. module: base_crypt +#: constraint:ir.ui.view:0 +msgid "Invalid XML for View Architecture!" +msgstr "" + +#. module: base_crypt +#: model:ir.module.module,shortdesc:base_crypt.module_meta_information +msgid "Base" +msgstr "" + +#. module: base_crypt +#: field:res.users,input_pw:0 +msgid "Password" +msgstr "" + From da1395bb41bdeeedee3cb26f06693d3beeb5fbc0 Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Sun, 3 Jan 2010 00:41:50 +0530 Subject: [PATCH 012/202] [MERGE]: merging from same branch bzr revid: vmt@openerp.com-20100102191150-mnajl1zi8lxt776h --- addons/base_crypt/i18n/base_crypt.pot | 37 +++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 addons/base_crypt/i18n/base_crypt.pot diff --git a/addons/base_crypt/i18n/base_crypt.pot b/addons/base_crypt/i18n/base_crypt.pot new file mode 100644 index 00000000000..d62691cb699 --- /dev/null +++ b/addons/base_crypt/i18n/base_crypt.pot @@ -0,0 +1,37 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * base_crypt +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 5.0.6\n" +"Report-Msgid-Bugs-To: support@openerp.com\n" +"POT-Creation-Date: 2009-11-26 09:12:09+0000\n" +"PO-Revision-Date: 2009-11-26 09:12:09+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: base_crypt +#: model:ir.module.module,description:base_crypt.module_meta_information +msgid "Module for password encryption." +msgstr "" + +#. module: base_crypt +#: constraint:ir.ui.view:0 +msgid "Invalid XML for View Architecture!" +msgstr "" + +#. module: base_crypt +#: model:ir.module.module,shortdesc:base_crypt.module_meta_information +msgid "Base" +msgstr "" + +#. module: base_crypt +#: field:res.users,input_pw:0 +msgid "Password" +msgstr "" + From 6f5ead9b97fc2f82a43f6bf0ad3e75d4865c24ad Mon Sep 17 00:00:00 2001 From: "sma (Tiny)" Date: Wed, 3 Mar 2010 17:52:02 +0530 Subject: [PATCH 013/202] [FIX] base_crypt: make password field hidden by setting password=True. lp bug: https://launchpad.net/bugs/530743 fixed bzr revid: sma@tinyerp.com-20100303122202-v512lrl8mep2uf0b --- addons/base_crypt/base_update.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/base_crypt/base_update.xml b/addons/base_crypt/base_update.xml index 8a0a5443eb8..66e4eaeb8c7 100644 --- a/addons/base_crypt/base_update.xml +++ b/addons/base_crypt/base_update.xml @@ -10,7 +10,7 @@ - + @@ -21,7 +21,7 @@ - + From d66295f7b3d6b734040e0550db16224762df6fdc Mon Sep 17 00:00:00 2001 From: Christophe Chauvet Date: Wed, 24 Mar 2010 02:17:46 +0100 Subject: [PATCH 014/202] [IMP] Don't hide main company field with a group on customize form bzr revid: christophe.chauvet@syleam.fr-20100324011746-gdjx7hm6jf293fwc --- bin/addons/base/res/res_company_view.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/addons/base/res/res_company_view.xml b/bin/addons/base/res/res_company_view.xml index 34e58b75b6c..40855eae86b 100644 --- a/bin/addons/base/res/res_company_view.xml +++ b/bin/addons/base/res/res_company_view.xml @@ -9,7 +9,7 @@ - + @@ -29,7 +29,7 @@ - + From 744bfb8cc170cad94895a93409916c4624f36eec Mon Sep 17 00:00:00 2001 From: Numerigraphe - Lionel Sausin Date: Wed, 24 Mar 2010 17:37:24 +0100 Subject: [PATCH 015/202] [IMP] wording: "children" intead of "childs" lp bug: https://launchpad.net/bugs/327259 fixed bzr revid: ls@numerigraphe.fr-20100324163724-q1xe1ozomk23k17j --- addons/account/account.py | 6 +++--- addons/account/account_assert_test.xml | 4 ++-- addons/account/report/general_ledger.py | 4 ++-- addons/account/report/general_ledger_landscape.py | 4 ++-- addons/account/wizard/wizard_move_line_select.py | 2 +- addons/account_report/report/accounting_report.py | 2 +- addons/account_report/report/accounting_report.rml | 2 +- addons/analytic/project.py | 4 ++-- .../wizard/tiny_sxw2rml/tiny_sxw2rml.py | 4 ++-- addons/caldav/DAV/davcmd.py | 2 +- addons/caldav/DAV/iface.py | 2 +- addons/caldav/DAV/propfind.py | 4 ++-- addons/caldav/DAV/utils.py | 12 ++++++------ addons/document/document_directory.py | 2 +- addons/document_ftp/ftpserver/abstracted_fs.py | 4 ++-- addons/document_webdav/DAV/davcmd.py | 2 +- addons/document_webdav/DAV/iface.py | 2 +- addons/document_webdav/DAV/propfind.py | 4 ++-- addons/document_webdav/DAV/utils.py | 12 ++++++------ addons/document_webdav/dav_fs.py | 6 +++--- addons/hr/hr_department.py | 12 ++++++------ addons/product/i18n/ar.po | 2 +- addons/product/i18n/bg.po | 2 +- addons/product/i18n/bs.po | 2 +- addons/product/i18n/ca.po | 2 +- addons/product/i18n/cs.po | 2 +- addons/product/i18n/de.po | 2 +- addons/product/i18n/el.po | 2 +- addons/product/i18n/es.po | 2 +- addons/product/i18n/es_AR.po | 2 +- addons/product/i18n/et.po | 2 +- addons/product/i18n/fi.po | 2 +- addons/product/i18n/fr.po | 2 +- addons/product/i18n/hr.po | 2 +- addons/product/i18n/hu.po | 2 +- addons/product/i18n/id.po | 2 +- addons/product/i18n/it.po | 2 +- addons/product/i18n/ko.po | 2 +- addons/product/i18n/lt.po | 2 +- addons/product/i18n/lv.po | 2 +- addons/product/i18n/nb.po | 2 +- addons/product/i18n/nb_NB.po | 2 +- addons/product/i18n/nl.po | 2 +- addons/product/i18n/nl_BE.po | 2 +- addons/product/i18n/pl.po | 2 +- addons/product/i18n/product.pot | 2 +- addons/product/i18n/pt.po | 2 +- addons/product/i18n/pt_BR.po | 2 +- addons/product/i18n/ro.po | 2 +- addons/product/i18n/ru.po | 2 +- addons/product/i18n/sk.po | 2 +- addons/product/i18n/sl.po | 2 +- addons/product/i18n/sq.po | 4 ++-- addons/product/i18n/sr.po | 2 +- addons/product/i18n/sv.po | 2 +- addons/product/i18n/tlh.po | 2 +- addons/product/i18n/tr.po | 2 +- addons/product/i18n/uk.po | 2 +- addons/product/i18n/vi.po | 2 +- addons/product/i18n/zh_CN.po | 2 +- addons/product/i18n/zh_TW.po | 2 +- addons/product/pricelist.py | 2 +- addons/stock/i18n/ar.po | 2 +- addons/stock/i18n/bg.po | 2 +- addons/stock/i18n/bs.po | 2 +- addons/stock/i18n/ca.po | 2 +- addons/stock/i18n/cs.po | 2 +- addons/stock/i18n/de.po | 2 +- addons/stock/i18n/el.po | 2 +- addons/stock/i18n/es.po | 2 +- addons/stock/i18n/es_AR.po | 2 +- addons/stock/i18n/et.po | 2 +- addons/stock/i18n/fi.po | 2 +- addons/stock/i18n/fr.po | 2 +- addons/stock/i18n/hr.po | 2 +- addons/stock/i18n/hu.po | 2 +- addons/stock/i18n/id.po | 2 +- addons/stock/i18n/it.po | 2 +- addons/stock/i18n/ko.po | 2 +- addons/stock/i18n/lt.po | 2 +- addons/stock/i18n/nl.po | 2 +- addons/stock/i18n/nl_BE.po | 2 +- addons/stock/i18n/pl.po | 2 +- addons/stock/i18n/pt.po | 2 +- addons/stock/i18n/pt_BR.po | 2 +- addons/stock/i18n/ro.po | 2 +- addons/stock/i18n/ru.po | 2 +- addons/stock/i18n/sl.po | 2 +- addons/stock/i18n/sq.po | 4 ++-- addons/stock/i18n/sr.po | 2 +- addons/stock/i18n/stock.pot | 2 +- addons/stock/i18n/sv.po | 2 +- addons/stock/i18n/th.po | 2 +- addons/stock/i18n/th_TH.po | 2 +- addons/stock/i18n/tlh.po | 2 +- addons/stock/i18n/tr.po | 2 +- addons/stock/i18n/uk.po | 2 +- addons/stock/i18n/vi.po | 4 ++-- addons/stock/i18n/zh_CN.po | 2 +- addons/stock/i18n/zh_TW.po | 2 +- addons/stock/wizard/wizard_inventory.py | 2 +- addons/wiki/wiki_view.xml | 4 ++-- addons/wiki/wizard/open_page.py | 2 +- 103 files changed, 134 insertions(+), 134 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index 12868487c49..2bb7165eb4d 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -176,7 +176,7 @@ class account_account(osv.osv): args[pos] = ('id', 'in', ids1) pos += 1 - if context and context.has_key('consolidate_childs'): #add consolidated childs of accounts + if context and context.has_key('consolidate_children'): #add consolidated children of accounts ids = super(account_account, self).search(cr, uid, args, offset, limit, order, context=context, count=count) for consolidate_child in self.browse(cr, uid, context['account_id']).child_consol_ids: @@ -1456,7 +1456,7 @@ class account_tax(osv.osv): RETURN: [ tax ] tax = {'name':'', 'amount':0.0, 'account_collected_id':1, 'account_paid_id':2} - one tax for each tax id in IDS and their childs + one tax for each tax id in IDS and their children """ res = self._unit_compute(cr, uid, taxes, price_unit, address_id, product, partner, quantity) total = 0.0 @@ -1553,7 +1553,7 @@ class account_tax(osv.osv): RETURN: [ tax ] tax = {'name':'', 'amount':0.0, 'account_collected_id':1, 'account_paid_id':2} - one tax for each tax id in IDS and their childs + one tax for each tax id in IDS and their children """ res = self._unit_compute_inv(cr, uid, taxes, price_unit, address_id, product, partner=None) total = 0.0 diff --git a/addons/account/account_assert_test.xml b/addons/account/account_assert_test.xml index 585c6bda124..bb497328082 100644 --- a/addons/account/account_assert_test.xml +++ b/addons/account/account_assert_test.xml @@ -6,8 +6,8 @@ - - - wiki.wiki.tree.childs + + wiki.wiki.tree.children wiki.wiki tree child_ids diff --git a/addons/wiki/wizard/open_page.py b/addons/wiki/wizard/open_page.py index df015f5c5a0..626deaa3780 100644 --- a/addons/wiki/wizard/open_page.py +++ b/addons/wiki/wizard/open_page.py @@ -49,7 +49,7 @@ class wiz_open_page(wizard.interface): value['view_type'] = 'form' value['view_mode'] = 'tree,form' elif group.method == 'tree': - view_id = pool.get('ir.ui.view').search(cr, uid, [('name','=','wiki.wiki.tree.childs')]) + view_id = pool.get('ir.ui.view').search(cr, uid, [('name','=','wiki.wiki.tree.children')]) value['view_id'] = view_id value['domain'] = [('group_id','=',group.id),('parent_id','=',False)] value['view_type'] = 'tree' From 756ab060bb31d471da52ece6bbc6d21fd108d2ed Mon Sep 17 00:00:00 2001 From: "ksa (Open ERP)" Date: Tue, 6 Jul 2010 10:40:58 +0530 Subject: [PATCH 016/202] [IMP]:Remove print statement bzr revid: vmt@openerp.com-20100706051058-q29kpyy7s80i0e9h --- addons/base_crypt/__init__.py | 0 addons/base_crypt/__terp__.py | 0 addons/base_crypt/base_update.xml | 0 addons/base_crypt/crypt.py | 0 addons/base_crypt/i18n/base_crypt.pot | 0 addons/base_crypt/i18n/fr_BE.po | 0 6 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 addons/base_crypt/__init__.py mode change 100644 => 100755 addons/base_crypt/__terp__.py mode change 100644 => 100755 addons/base_crypt/base_update.xml mode change 100644 => 100755 addons/base_crypt/crypt.py mode change 100644 => 100755 addons/base_crypt/i18n/base_crypt.pot mode change 100644 => 100755 addons/base_crypt/i18n/fr_BE.po diff --git a/addons/base_crypt/__init__.py b/addons/base_crypt/__init__.py old mode 100644 new mode 100755 diff --git a/addons/base_crypt/__terp__.py b/addons/base_crypt/__terp__.py old mode 100644 new mode 100755 diff --git a/addons/base_crypt/base_update.xml b/addons/base_crypt/base_update.xml old mode 100644 new mode 100755 diff --git a/addons/base_crypt/crypt.py b/addons/base_crypt/crypt.py old mode 100644 new mode 100755 diff --git a/addons/base_crypt/i18n/base_crypt.pot b/addons/base_crypt/i18n/base_crypt.pot old mode 100644 new mode 100755 diff --git a/addons/base_crypt/i18n/fr_BE.po b/addons/base_crypt/i18n/fr_BE.po old mode 100644 new mode 100755 From 4a587039027d163aed2aa93a404a5ceb86c95861 Mon Sep 17 00:00:00 2001 From: "g.shipilov" Date: Thu, 5 Aug 2010 08:32:28 +0600 Subject: [PATCH 017/202] Page rotation bzr revid: g.shipilov@it1-20100805023228-pbd2b3tkudu7uj1j --- bin/report/render/rml2pdf/trml2pdf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/report/render/rml2pdf/trml2pdf.py b/bin/report/render/rml2pdf/trml2pdf.py index 771a59fa28f..1e628370a44 100644 --- a/bin/report/render/rml2pdf/trml2pdf.py +++ b/bin/report/render/rml2pdf/trml2pdf.py @@ -773,7 +773,7 @@ class _rml_template(object): ps = map(lambda x:x.strip(), node.get('pageSize').replace(')', '').replace('(', '').split(',')) pageSize = ( utils.unit_get(ps[0]),utils.unit_get(ps[1]) ) - self.doc_tmpl = TinyDocTemplate(out, pagesize=pageSize, **utils.attr_get(node, ['leftMargin','rightMargin','topMargin','bottomMargin'], {'allowSplitting':'int','showBoundary':'bool','title':'str','author':'str'})) + self.doc_tmpl = TinyDocTemplate(out, pagesize=pageSize, **utils.attr_get(node, ['leftMargin','rightMargin','topMargin','bottomMargin'], {'allowSplitting':'int','showBoundary':'bool','rotation':'int','title':'str','author':'str'})) self.page_templates = [] self.styles = doc.styles self.doc = doc From 1e1830cd00a62908128a9d09005d86c0cffd54ec Mon Sep 17 00:00:00 2001 From: Julien Thewys Date: Fri, 8 Oct 2010 16:15:53 +0200 Subject: [PATCH 018/202] [FIX] generate_order_by now supports 'id' order_field. Sorting on 'id desc' is used in email_template/email_template.py . bzr revid: jth@openerp.com-20101008141553-tzf94l6lq2qeer96 --- bin/osv/orm.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index c4195dc00fa..817ca1469b6 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -4001,7 +4001,9 @@ class orm(orm_template): order_split = order_part.strip().split(' ') order_field = order_split[0].strip() order_direction = order_split[1].strip() if len(order_split) == 2 else '' - if order_field in self._columns: + if order_field == 'id': + order_by_clause = '"%s"."%s"' % (self._table, order_field) + elif order_field in self._columns: order_column = self._columns[order_field] if order_column._classic_read: order_by_clause = '"%s"."%s"' % (self._table, order_field) From 2272c189d9279eb368a030def29e0e7a42a91ce0 Mon Sep 17 00:00:00 2001 From: Julien Thewys Date: Wed, 20 Oct 2010 16:42:48 +0200 Subject: [PATCH 019/202] [IMP] Added cli args to load one or more languages translation terms automatically. Mainly used to automate languages installation at DB initialization. bzr revid: jth@openerp.com-20101020144248-q20vnt72ovx3md96 --- bin/addons/base/module/module.py | 16 +++++++++------- bin/openerp-server.py | 10 +++++++++- bin/tools/config.py | 4 ++++ bin/tools/translate.py | 13 +++++++++++++ 4 files changed, 35 insertions(+), 8 deletions(-) diff --git a/bin/addons/base/module/module.py b/bin/addons/base/module/module.py index b2c2da96d13..3aa42af3954 100644 --- a/bin/addons/base/module/module.py +++ b/bin/addons/base/module/module.py @@ -436,7 +436,7 @@ class module(osv.osv): self.write(cr, uid, [id], {'category_id': p_id}) def update_translations(self, cr, uid, ids, filter_lang=None, context={}): - logger = netsvc.Logger() + logger = logging.getLogger('i18n') if not filter_lang: pool = pooler.get_pool(cr.dbname) lang_obj = pool.get('res.lang') @@ -456,13 +456,15 @@ class module(osv.osv): if len(lang) > 5: raise osv.except_osv(_('Error'), _('You Can Not Load Translation For language Due To Invalid Language/Country Code')) iso_lang = tools.get_iso_codes(lang) - f = os.path.join(modpath, 'i18n', iso_lang + '.po') - if not os.path.exists(f) and iso_lang.find('_') != -1: - f = os.path.join(modpath, 'i18n', iso_lang.split('_')[0] + '.po') + fn = os.path.join(modpath, 'i18n', iso_lang + '.po') + if not os.path.exists(fn) and iso_lang.find('_') != -1: iso_lang = iso_lang.split('_')[0] - if os.path.exists(f): - logger.notifyChannel("i18n", netsvc.LOG_INFO, 'module %s: loading translation file for language %s' % (mod.name, iso_lang)) - tools.trans_load(cr.dbname, f, lang, verbose=False, context=context) + fn = os.path.join(modpath, 'i18n', iso_lang + '.po') + if os.path.exists(fn): + logger.info('module %s: loading translation file for language %s' % (mod.name, iso_lang)) + tools.trans_load(cr.dbname, fn, lang, verbose=False, context=context) + else: + logger.warn('module %s: translation file not found %s' % (mod.name, fn)) def check(self, cr, uid, ids, context=None): logger = logging.getLogger('init') diff --git a/bin/openerp-server.py b/bin/openerp-server.py index 8d210fc2906..18a2238daea 100755 --- a/bin/openerp-server.py +++ b/bin/openerp-server.py @@ -119,13 +119,21 @@ if not ( tools.config["stop_after_init"] or \ if tools.config['db_name']: for dbname in tools.config['db_name'].split(','): db,pool = pooler.get_db_and_pool(dbname, update_module=tools.config['init'] or tools.config['update'], pooljobs=False) + cr = db.cursor() + if tools.config["test_file"]: logger.info('loading test file %s', tools.config["test_file"]) - cr = db.cursor() tools.convert_yaml_import(cr, 'base', file(tools.config["test_file"]), {}, 'test', True) cr.rollback() + + if tools.config['load_language']: + for lang in tools.config['load_language'].split(','): + tools.load_language(cr, lang) + pool.get('ir.cron')._poolJobs(db.dbname) + cr.close() + #---------------------------------------------------------- # translation stuff #---------------------------------------------------------- diff --git a/bin/tools/config.py b/bin/tools/config.py index 2964870d427..c0600d0a881 100644 --- a/bin/tools/config.py +++ b/bin/tools/config.py @@ -58,6 +58,7 @@ class configmanager(object): 'xmlrpcs': True, 'translate_in': None, 'translate_out': None, + 'load_language': None, 'language': None, 'pg_path': None, 'admin_passwd': 'admin', @@ -206,6 +207,8 @@ class configmanager(object): "Option '-l' is mandatory in case of importation" ) + group.add_option('--load-language', dest="load_language", + help="specifies the languages for the translations you want to be loaded") group.add_option('-l', "--language", dest="language", help="specify the language of the translation file. Use it with --i18n-export or --i18n-import") group.add_option("--i18n-export", dest="translate_out", @@ -283,6 +286,7 @@ class configmanager(object): keys = [ 'language', 'translate_out', 'translate_in', 'debug_mode', 'smtp_ssl', + 'load_language', 'stop_after_init', 'logrotate', 'without_demo', 'netrpc', 'xmlrpc', 'syslog', 'list_db', 'xmlrpcs', 'test_file', 'test_disable', 'test_commit', 'test_report_directory' diff --git a/bin/tools/translate.py b/bin/tools/translate.py index f978ecbfd4b..ad4d6ba3b14 100644 --- a/bin/tools/translate.py +++ b/bin/tools/translate.py @@ -898,5 +898,18 @@ def resetlocale(): except locale.Error: continue +def load_language(cr, lang): + """Loads a translation terms for a language. + Used mainly to automate language loading at db initialization. + + :param lang: language ISO code with optional _underscore_ and l10n flavor (ex: 'fr', 'fr_BE', but not 'fr-BE') + :type lang: str + """ + pool = pooler.get_pool(cr.dbname) + language_installer = pool.get('base.language.install') + uid = 1 + oid = language_installer.create(cr, uid, {'lang': lang}) + language_installer.lang_install(cr, uid, [oid], context=None) + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From c1cb4b70d0b9c8df7dffa8706070ae682b5004f4 Mon Sep 17 00:00:00 2001 From: Numerigraphe - Lionel Sausin Date: Mon, 25 Oct 2010 10:48:51 +0200 Subject: [PATCH 020/202] [IMP] wording: children intead of childs (again) bzr revid: ls@numerigraphe.fr-20101025084851-3ri17e8ct5x7lue0 --- addons/auction/auction.py | 2 +- addons/auction/i18n/auction.pot | 2 +- addons/document_webdav/dav_fs.py | 4 ++-- addons/hr_evaluation/hr_evaluation.py | 10 +++++----- addons/product/i18n/el.po | 2 +- addons/product/i18n/es_EC.po | 2 +- addons/product/i18n/eu.po | 2 +- addons/product/i18n/fi.po | 2 +- addons/product/i18n/ko.po | 2 +- addons/product/i18n/mn.po | 2 +- addons/product/i18n/nb.po | 2 +- addons/product/i18n/vi.po | 2 +- addons/project_planning/project_planning.py | 12 ++++++------ addons/stock/i18n/es_EC.po | 2 +- addons/stock/i18n/mn.po | 2 +- addons/stock/test/stock_report.yml | 2 +- addons/wiki/wiki.py | 2 +- addons/wiki/wizard/wiki_create_menu.py | 2 +- 18 files changed, 28 insertions(+), 28 deletions(-) diff --git a/addons/auction/auction.py b/addons/auction/auction.py index 870194fa125..20090def512 100644 --- a/addons/auction/auction.py +++ b/addons/auction/auction.py @@ -190,7 +190,7 @@ class aie_category(osv.osv): 'name': fields.char('Name', size=64, required=True), 'code':fields.char('Code', size=64), 'parent_id': fields.many2one('aie.category', 'Parent aie Category', ondelete='cascade'), - 'child_ids': fields.one2many('aie.category', 'parent_id', help="Childs aie category") + 'child_ids': fields.one2many('aie.category', 'parent_id', help="children aie category") } def name_get(self, cr, uid, ids, context=None): diff --git a/addons/auction/i18n/auction.pot b/addons/auction/i18n/auction.pot index 8c8e0dc2a96..ba25f39b356 100644 --- a/addons/auction/i18n/auction.pot +++ b/addons/auction/i18n/auction.pot @@ -1461,7 +1461,7 @@ msgstr "" #. module: auction #: help:aie.category,child_ids:0 -msgid "Childs aie category" +msgid "children aie category" msgstr "" #. module: auction diff --git a/addons/document_webdav/dav_fs.py b/addons/document_webdav/dav_fs.py index 5d7fa2b5ec6..6b2a204b12f 100644 --- a/addons/document_webdav/dav_fs.py +++ b/addons/document_webdav/dav_fs.py @@ -307,7 +307,7 @@ class openerp_dav_handler(dav_interface): fp = node.full_path() if fp and len(fp): fp = '/'.join(fp) - self.parent.log_message('childs for: %s' % fp) + self.parent.log_message('children for: %s' % fp) else: fp = None domain = None @@ -345,7 +345,7 @@ class openerp_dav_handler(dav_interface): except DAV_Error: raise except Exception, e: - self.parent.log_error("cannot get_childs: "+ str(e)) + self.parent.log_error("cannot get_children: "+ str(e)) raise finally: if cr: cr.close() diff --git a/addons/hr_evaluation/hr_evaluation.py b/addons/hr_evaluation/hr_evaluation.py index a8b2a3e2c69..e8066a7299f 100644 --- a/addons/hr_evaluation/hr_evaluation.py +++ b/addons/hr_evaluation/hr_evaluation.py @@ -211,15 +211,15 @@ class hr_evaluation(osv.osv): for evaluation in self.browse(cr, uid, ids, context=context): wait = False for phase in evaluation.plan_id.phase_ids: - childs = [] + children = [] if phase.action == "bottom-up": - childs = evaluation.employee_id.child_ids + children = evaluation.employee_id.child_ids elif phase.action in ("top-down", "final"): if evaluation.employee_id.parent_id: - childs = [evaluation.employee_id.parent_id] + children = [evaluation.employee_id.parent_id] elif phase.action == "self": - childs = [evaluation.employee_id] - for child in childs: + children = [evaluation.employee_id] + for child in children: # if not child.user_id: # continue diff --git a/addons/product/i18n/el.po b/addons/product/i18n/el.po index 726b4b10daf..e6deaabe800 100644 --- a/addons/product/i18n/el.po +++ b/addons/product/i18n/el.po @@ -1927,7 +1927,7 @@ msgstr "Έκπτωση Τιμής" #~ "αποθηκευόμενα προϊόντα με απεριόριστο στόκ ή χωρίς διαχείριση αποθήκευσης " #~ "στο σύστημα." -#~ msgid "Childs Categories" +#~ msgid "children Categories" #~ msgstr "Υποκατηγορίες" #~ msgid "" diff --git a/addons/product/i18n/es_EC.po b/addons/product/i18n/es_EC.po index 4a86e904af0..d15982674be 100644 --- a/addons/product/i18n/es_EC.po +++ b/addons/product/i18n/es_EC.po @@ -1749,7 +1749,7 @@ msgstr "Cantidad mín." #: help:product.pricelist.item,categ_id:0 msgid "" "Set a category of product if this rule only apply to products of a category " -"and his childs. Keep empty for all products" +"and his children. Keep empty for all products" msgstr "" "Indicar una categoría de producto si esta regla sólo se aplica a productos " "de una categoría y a sus descendientes. Dejarlo vacío para todos los " diff --git a/addons/product/i18n/eu.po b/addons/product/i18n/eu.po index f01bcd3abda..5ea59fb6dd2 100644 --- a/addons/product/i18n/eu.po +++ b/addons/product/i18n/eu.po @@ -1675,7 +1675,7 @@ msgstr "Kopuru Minimoa" #: help:product.pricelist.item,categ_id:0 msgid "" "Set a category of product if this rule only apply to products of a category " -"and his childs. Keep empty for all products" +"and his children. Keep empty for all products" msgstr "" #. module: product diff --git a/addons/product/i18n/fi.po b/addons/product/i18n/fi.po index b46d2160e96..4cdc4ed2849 100644 --- a/addons/product/i18n/fi.po +++ b/addons/product/i18n/fi.po @@ -1808,7 +1808,7 @@ msgstr "Hinnanalennus" #~ "tuotteita joilla on loppumaton varasto, tai ne ovat järjestelmässä ilman " #~ "varastonhallintaa." -#~ msgid "Childs Categories" +#~ msgid "children Categories" #~ msgstr "Alakategoriat" #~ msgid "You can not have 2 pricelist version that overlaps!" diff --git a/addons/product/i18n/ko.po b/addons/product/i18n/ko.po index 82ba1557ac2..09f2388f102 100644 --- a/addons/product/i18n/ko.po +++ b/addons/product/i18n/ko.po @@ -1744,7 +1744,7 @@ msgstr "가격 할인" #~ msgid "Rentable product" #~ msgstr "대여 가능한 상품" -#~ msgid "Childs Categories" +#~ msgid "children Categories" #~ msgstr "차일드 카테고리" #~ msgid "Price Max. Margin" diff --git a/addons/product/i18n/mn.po b/addons/product/i18n/mn.po index da9bb9f8b4a..4247b7290c0 100644 --- a/addons/product/i18n/mn.po +++ b/addons/product/i18n/mn.po @@ -1735,7 +1735,7 @@ msgstr "Хамгийн бага тоо" #: help:product.pricelist.item,categ_id:0 msgid "" "Set a category of product if this rule only apply to products of a category " -"and his childs. Keep empty for all products" +"and his children. Keep empty for all products" msgstr "" "Энэ дүрэм үйлчлэх барааны ангиллыг сонгоно. Хэрэв бүх бараанд хамаатай бол " "хоосон орхино." diff --git a/addons/product/i18n/nb.po b/addons/product/i18n/nb.po index 8f242661526..57faa736d86 100644 --- a/addons/product/i18n/nb.po +++ b/addons/product/i18n/nb.po @@ -1712,7 +1712,7 @@ msgstr "" #~ "ferdigstillingen av det ferdige produktet. Dette er tiden du lover deg til " #~ "ovenfor kunden." -#~ msgid "Childs Categories" +#~ msgid "children Categories" #~ msgstr "Barnekategori" #~ msgid "Price Min. Margin" diff --git a/addons/product/i18n/vi.po b/addons/product/i18n/vi.po index d895f25efde..29d295e4965 100644 --- a/addons/product/i18n/vi.po +++ b/addons/product/i18n/vi.po @@ -1727,7 +1727,7 @@ msgstr "Giảm giá" #~ msgid "Rentable product" #~ msgstr "Sản phẩm có thể cho thuê" -#~ msgid "Childs Categories" +#~ msgid "children Categories" #~ msgstr "Danh mục con" #~ msgid "Price Max. Margin" diff --git a/addons/project_planning/project_planning.py b/addons/project_planning/project_planning.py index 759057fbaef..c36bd9eb594 100644 --- a/addons/project_planning/project_planning.py +++ b/addons/project_planning/project_planning.py @@ -68,12 +68,12 @@ class report_account_analytic_planning(osv.osv): ids_dept = obj_dept.search(cr, uid, [('id', 'child_of', mgnt_dept_ids)], context=context) if ids_dept: data_dept = obj_dept.read(cr, uid, ids_dept, ['member_ids'], context=context) - childs = map(lambda x: x['member_ids'], data_dept) - childs = tools.flatten(childs) - childs = obj_user.search(cr, uid, [('id', 'in', childs),('active', '=', True)], context=context) - if user_id in childs: - childs.remove(user_id) - child_ids.extend(tools.flatten(childs)) + children = map(lambda x: x['member_ids'], data_dept) + children = tools.flatten(children) + children = obj_user.search(cr, uid, [('id', 'in', children),('active', '=', True)], context=context) + if user_id in children: + children.remove(user_id) + child_ids.extend(tools.flatten(children)) set = {} map(set.__setitem__, child_ids, []) child_ids = set.keys() diff --git a/addons/stock/i18n/es_EC.po b/addons/stock/i18n/es_EC.po index ac5aab45c8e..f6b7ad99c70 100644 --- a/addons/stock/i18n/es_EC.po +++ b/addons/stock/i18n/es_EC.po @@ -359,7 +359,7 @@ msgstr "Líneas movimiento" #. module: stock #: wizard_field:stock.fill_inventory,init,recursive:0 -msgid "Include all childs for the location" +msgid "Include all children for the location" msgstr "Incluir todos los descendientes de la ubicación" #. module: stock diff --git a/addons/stock/i18n/mn.po b/addons/stock/i18n/mn.po index 33e60ea3573..70d9d21bb1b 100644 --- a/addons/stock/i18n/mn.po +++ b/addons/stock/i18n/mn.po @@ -359,7 +359,7 @@ msgstr "Шилжих шугамууд" #. module: stock #: wizard_field:stock.fill_inventory,init,recursive:0 -msgid "Include all childs for the location" +msgid "Include all children for the location" msgstr "" #. module: stock diff --git a/addons/stock/test/stock_report.yml b/addons/stock/test/stock_report.yml index f6bcd60ad5e..41acade696a 100644 --- a/addons/stock/test/stock_report.yml +++ b/addons/stock/test/stock_report.yml @@ -1,5 +1,5 @@ - - In order to test the PDF reports defined on a stock, we will print a Stock Overviewall(childs) report + In order to test the PDF reports defined on a stock, we will print a Stock Overviewall(children) report - !python {model: stock.location}: | import netsvc, tools, os diff --git a/addons/wiki/wiki.py b/addons/wiki/wiki.py index 2d814485a7c..d05121a3a70 100644 --- a/addons/wiki/wiki.py +++ b/addons/wiki/wiki.py @@ -88,7 +88,7 @@ class wiki_group(osv.osv): value['view_type'] = 'form' value['view_mode'] = 'tree,form' elif group.method == 'tree': - view_id = self.pool.get('ir.ui.view').search(cr, uid, [('name', '=', 'wiki.wiki.tree.childs')]) + view_id = self.pool.get('ir.ui.view').search(cr, uid, [('name', '=', 'wiki.wiki.tree.children')]) value['view_id'] = view_id value['domain'] = [('group_id', '=', group.id), ('parent_id', '=', False)] value['view_type'] = 'tree' diff --git a/addons/wiki/wizard/wiki_create_menu.py b/addons/wiki/wizard/wiki_create_menu.py index 7cee4f88e96..cc0cea87ec5 100644 --- a/addons/wiki/wizard/wiki_create_menu.py +++ b/addons/wiki/wizard/wiki_create_menu.py @@ -70,7 +70,7 @@ class wiki_create_menu(osv.osv_memory): value['view_type'] = 'form' value['view_mode'] = 'tree,form' elif group.method == 'tree': - view_id = obj_view.search(cr, uid, [('name', '=', 'wiki.wiki.tree.childs')]) + view_id = obj_view.search(cr, uid, [('name', '=', 'wiki.wiki.tree.children')]) value['view_id'] = view_id value['domain'] = [('group_id', '=', group.id), ('parent_id', '=', False)] value['view_type'] = 'tree' From 925180946e2afc8744a71afb813c9a9ea851eccf Mon Sep 17 00:00:00 2001 From: "AMP (OpenERP)" Date: Mon, 25 Oct 2010 18:16:01 +0530 Subject: [PATCH 021/202] [MOD/IMP]: Improvement in Usebility Icon bzr revid: amp@tinyerp.com-20101025124601-mspsq4g5h4gwtj5l --- bin/addons/base/res/partner/wizard/partner_sms_send_view.xml | 2 +- bin/addons/base/res/partner/wizard/partner_wizard_spam_view.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/addons/base/res/partner/wizard/partner_sms_send_view.xml b/bin/addons/base/res/partner/wizard/partner_sms_send_view.xml index 97c418d9f81..7d84d6d405a 100644 --- a/bin/addons/base/res/partner/wizard/partner_sms_send_view.xml +++ b/bin/addons/base/res/partner/wizard/partner_sms_send_view.xml @@ -20,7 +20,7 @@