From 50dca46b0fe695a518600f652c2dbdf06cddf055 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Tue, 5 Jan 2010 16:23:12 +0100 Subject: [PATCH 1/9] [FIX] Made timezone detect more robust and added a config option to override it. Stay backwards-compatible by using time.tzname[0] as we did before if no config option is provided, but only if it is a valid timezone (in the pytz sense). If no config option is set and time.tzname does't work, fallback, in this order, to: - environment variable 'TZ' - /etc/timezone on Unix platforms - Windows registry on win32 systems - if nothing works, default to UTC (because we MUST provide a valid timezone to clients) lp bug: https://launchpad.net/bugs/389544 fixed bzr revid: odo@openerp.com-20100105152312-fgayeaks12ed3no8 --- bin/service/web_services.py | 5 ++- bin/tools/config.py | 17 +++++++- bin/tools/misc.py | 83 +++++++++++++++++++++++++++++++++++++ 3 files changed, 102 insertions(+), 3 deletions(-) diff --git a/bin/service/web_services.py b/bin/service/web_services.py index ec554ac0325..acfe1bfd41e 100644 --- a/bin/service/web_services.py +++ b/bin/service/web_services.py @@ -443,7 +443,10 @@ GNU Public Licence. return info def exp_timezone_get(self, db, login, password): - return time.tzname[0] + #timezone detection is safe in multithread, so lazy init is ok here + if (not tools.config['timezone']): + tools.config['timezone'] = tools.misc.detect_server_timezone() + return tools.config['timezone'] def exp_get_available_updates(self, contract_id, contract_password): diff --git a/bin/tools/config.py b/bin/tools/config.py index 4cdee8736c2..e0ef74dbb56 100644 --- a/bin/tools/config.py +++ b/bin/tools/config.py @@ -77,10 +77,11 @@ class configmanager(object): 'secure' : False, 'syslog' : False, 'log_level': logging.INFO, - 'assert_exit_level': logging.WARNING, # level above which a failed assert will be raise + 'assert_exit_level': logging.WARNING, # level above which a failed assert will be raised 'cache_timeout': 100000, 'login_message': False, 'list_db' : True, + 'timezone' : False, # to override the default TZ } self.misc = {} @@ -111,6 +112,7 @@ class configmanager(object): help="update a module (use \"all\" for all modules)") parser.add_option("--cache-timeout", dest="cache_timeout", help="set the timeout for the cache system", default=100000, type="int") + parser.add_option("-t", "--timezone", dest="timezone", help="specify reference timezone for the server (e.g. Europe/Brussels") # stops the server from launching after initialization parser.add_option("--stop-after-init", action="store_true", dest="stop_after_init", default=False, @@ -227,7 +229,7 @@ class configmanager(object): 'db_port', 'list_db', 'logfile', 'pidfile', 'smtp_port', 'cache_timeout', 'email_from', 'smtp_server', 'smtp_user', 'smtp_password', 'price_accuracy', 'netinterface', 'netport', 'db_maxconn', 'import_partial', 'addons_path', - 'netrpc', 'xmlrpc', 'syslog', 'without_demo'] + 'netrpc', 'xmlrpc', 'syslog', 'without_demo', 'timezone',] if hasSSL: keys.extend(['smtp_ssl', 'secure_cert_file', 'secure_pkey_file']) @@ -266,6 +268,17 @@ class configmanager(object): self.options['translate_modules'] = opt.translate_modules and map(lambda m: m.strip(), opt.translate_modules.split(',')) or ['all'] self.options['translate_modules'].sort() + if self.options['timezone']: + # If an explicit TZ was provided in the config, make sure it is known + try: + import pytz + tz = pytz.timezone(self.options['timezone']) + except pytz.UnknownTimeZoneError: + die(True, "The specified timezone (%s) is invalid" % self.options['timezone']) + except: + # If pytz is missing, don't check the provided TZ, it will be ignored anyway. + pass + if opt.pg_path: self.options['pg_path'] = opt.pg_path diff --git a/bin/tools/misc.py b/bin/tools/misc.py index 001f62e0968..331649b53c7 100644 --- a/bin/tools/misc.py +++ b/bin/tools/misc.py @@ -1174,6 +1174,89 @@ def detect_ip_addr(): ip_addr = 'localhost' return ip_addr +# RATIONALE BEHIND TIMESTAMP CALCULATIONS AND TIMEZONE MANAGEMENT: +# The server side never does any timestamp calculation, always +# sends them in a naive (timezone agnostic) format supposed to be +# expressed within the server timezone, and expects the clients to +# provide timestamps in the server timezone as well. +# It stores all timestamps in the database in naive format as well, +# which also expresses the time in the server timezone. +# For this reason the server makes its timezone name available via the +# common/timezone_get() rpc method, which clients need to read +# to know the appropriate time offset to use when reading/writing +# times. +def get_win32_timezone(): + """Attempt to return the "standard name" of the current timezone on a win32 system. + @return: the standard name of the current win32 timezone, or False if it cannot be found. + """ + res = False + if (sys.platform == "win32"): + try: + import _winreg + hklm = _winreg.ConnectRegistry(None,_winreg.HKEY_LOCAL_MACHINE) + current_tz_key = _winreg.OpenKey(hklm, r"SYSTEM\CurrentControlSet\Control\TimeZoneInformation", 0,_winreg.KEY_ALL_ACCESS) + res = str(_winreg.QueryValueEx(current_tz_key,"StandardName")[0]) # [0] is value, [1] is type code + _winreg.CloseKey(current_tz_key) + _winreg.CloseKey(hklm) + except: + pass + return res + +def detect_server_timezone(): + """Attempt to detect the timezone to use on the server side. + Defaults to UTC if no working timezone can be found. + @return: the timezone identifier as expected by pytz.timezone. + """ + import time + import netsvc + try: + import pytz + except: + netsvc.Logger().notifyChannel("detect_server_timezone", netsvc.LOG_WARNING, + "Python pytz module is not available. Timezone will be set to UTC by default.") + return 'UTC' + + # Option 1: the configuration option (did not exist before, so no backwards compatibility issue) + # Option 2: to be backwards compatible with 5.0 or earlier, the value from time.tzname[0], but only if it is known to pytz + # Option 3: the environment variable TZ + sources = [ (config['timezone'], 'OpenERP configuration'), + (time.tzname[0], 'time.tzname'), + (os.environ.get('TZ',False),'TZ environment variable'), ] + # Option 4: OS-specific: /etc/timezone on Unix + if (os.path.exists("/etc/timezone")): + tz_value = False + try: + f = open("/etc/timezone") + tz_value = f.read(128).strip() + except: + pass + finally: + f.close() + sources.append((tz_value,"/etc/timezone file")) + # Option 5: timezone info from registry on Win32 + if (sys.platform == "win32"): + # Timezone info is stored in windows registry. + # However this is not likely to work very well as the standard name + # of timezones in windows is rarely something that is known to pytz. + # But that's ok, it is always possible to use a config option to set + # it explicitly. + sources.append((get_win32_tz(),"Windows Registry")) + + for (value,source) in sources: + if value: + try: + tz = pytz.timezone(value) + netsvc.Logger().notifyChannel("detect_server_timezone", netsvc.LOG_INFO, + "Using timezone %s obtained from %s." % (tz.zone,source)) + return value + except pytz.UnknownTimeZoneError: + netsvc.Logger().notifyChannel("detect_server_timezone", netsvc.LOG_WARNING, + "The timezone specified in %s (%s) is invalid, ignoring it." % (source,value)) + + netsvc.Logger().notifyChannel("detect_server_timezone", netsvc.LOG_WARNING, + "No valid timezone could be detected, using default UTC timezone. You can specify it explicitly with option 'timezone' in the server configuration.") + return 'UTC' + if __name__ == '__main__': import doctest From b276421b84c76dd784d87ea400a4fab62efd61ab Mon Sep 17 00:00:00 2001 From: Launchpad Code Hosting Date: Wed, 6 Jan 2010 04:36:11 +0000 Subject: [PATCH 2/9] Launchpad automatic translations update. bzr revid: codehost@crowberry-20100106043611-bko7o6pu1aevatzg --- bin/addons/base/i18n/uk.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/addons/base/i18n/uk.po b/bin/addons/base/i18n/uk.po index c7644bb473f..d61a025d1d3 100644 --- a/bin/addons/base/i18n/uk.po +++ b/bin/addons/base/i18n/uk.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 5.0.0\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2009-12-18 08:39+0000\n" -"PO-Revision-Date: 2010-01-04 06:01+0000\n" +"PO-Revision-Date: 2010-01-05 06:38+0000\n" "Last-Translator: Fabien (Open ERP) \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-01-05 04:40+0000\n" +"X-Launchpad-Export-Date: 2010-01-06 04:36+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base From ccf51984ba651df3af5aca0aed1d2c859888afcc Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Thu, 7 Jan 2010 00:28:31 +0100 Subject: [PATCH 3/9] [FIX] Fixed typo in rev 1975. lp bug: https://launchpad.net/bugs/389544 fixed bzr revid: odo@openerp.com-20100106232831-92najrab4hhsvz7z --- bin/tools/misc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/tools/misc.py b/bin/tools/misc.py index 331649b53c7..a237ee1b603 100644 --- a/bin/tools/misc.py +++ b/bin/tools/misc.py @@ -1240,7 +1240,7 @@ def detect_server_timezone(): # of timezones in windows is rarely something that is known to pytz. # But that's ok, it is always possible to use a config option to set # it explicitly. - sources.append((get_win32_tz(),"Windows Registry")) + sources.append((get_win32_timezone(),"Windows Registry")) for (value,source) in sources: if value: From 886d40b4be0a85106e678ea00744d2b331c91ea8 Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" Date: Thu, 7 Jan 2010 21:12:32 +0530 Subject: [PATCH 4/9] [FIX] res.users has company_id as a required field(in view) bzr revid: jvo@tinyerp.com-20100107154232-k6w8vd1vagm4w2it --- bin/addons/base/base.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/addons/base/base.sql b/bin/addons/base/base.sql index 58b30a89cf2..4f8d89e8ff5 100644 --- a/bin/addons/base/base.sql +++ b/bin/addons/base/base.sql @@ -340,7 +340,7 @@ CREATE TABLE ir_model_data ( -- Users --------------------------------- -insert into res_users (id,login,password,name,action_id,active) values (1,'admin',NULL,'Administrator',NULL,True); +insert into res_users (id,login,password,name,action_id,active,company_id) values (1,'admin',NULL,'Administrator',NULL,True,1); insert into ir_model_data (name,module,model,noupdate,res_id) values ('user_root','base','res.users',True,1); -- Compatibility purpose, to remove V6.0 From 1d7be15d4a7c1805c334334c1f2d88c8b8a4156e Mon Sep 17 00:00:00 2001 From: Launchpad Code Hosting Date: Fri, 8 Jan 2010 04:37:54 +0000 Subject: [PATCH 5/9] Launchpad automatic translations update. bzr revid: codehost@crowberry-20100108043754-mb4es27t3av4a73g --- bin/addons/base/i18n/zh_CN.po | 88 ++++++++++++++++++----------------- 1 file changed, 45 insertions(+), 43 deletions(-) diff --git a/bin/addons/base/i18n/zh_CN.po b/bin/addons/base/i18n/zh_CN.po index 86f271f40a3..1f1f144ea3b 100644 --- a/bin/addons/base/i18n/zh_CN.po +++ b/bin/addons/base/i18n/zh_CN.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: 2009-12-18 08:39+0000\n" -"PO-Revision-Date: 2009-12-27 06:10+0000\n" +"PO-Revision-Date: 2010-01-07 13:00+0000\n" "Last-Translator: Wei \"oldrev\" Li \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: 2009-12-29 04:35+0000\n" +"X-Launchpad-Export-Date: 2010-01-08 04:37+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base @@ -172,7 +172,7 @@ msgstr "ir.report.custom.fields" #. module: base #: view:res.partner:0 msgid "Search Partner" -msgstr "" +msgstr "搜索业务伙伴" #. module: base #: code:addons/base/module/wizard/wizard_export_lang.py:0 @@ -310,7 +310,7 @@ msgstr "已卸载的模块" #. module: base #: selection:ir.actions.report.xml,report_type:0 msgid "txt" -msgstr "" +msgstr "txt" #. module: base #: wizard_view:server.action.create,init:0 @@ -582,7 +582,7 @@ msgstr "," #. module: base #: view:res.partner:0 msgid "My Partners" -msgstr "" +msgstr "我的业务伙伴列表" #. module: base #: model:res.country,name:base.es @@ -733,7 +733,7 @@ msgstr "伊朗" #: model:ir.actions.act_window,name:base.res_request-act #: model:ir.ui.menu,name:base.menu_res_request_act msgid "My Requests" -msgstr "" +msgstr "我的请求列表" #. module: base #: field:ir.sequence,name:0 @@ -843,7 +843,7 @@ msgstr "RML" #. module: base #: selection:ir.ui.view,type:0 msgid "Search" -msgstr "" +msgstr "搜索" #. module: base #: code:addons/base/ir/ir_report_custom.py:0 @@ -991,7 +991,7 @@ msgstr "STOCK_COPY" #: code:addons/base/ir/ir_model.py:0 #, python-format msgid "Model %s Does not Exist !" -msgstr "" +msgstr "模型 %s 不存在!" #. module: base #: code:addons/base/module/module.py:0 @@ -1000,6 +1000,8 @@ msgid "" "You try to install the module '%s' that depends on the module:'%s'.\n" "But this module is not available in your system." msgstr "" +"您试图安装模块'%s'.这模块依赖模块: %s。\n" +"但您的系统中该模块不可用。" #. module: base #: model:ir.model,name:base.model_res_request_link @@ -1119,7 +1121,7 @@ msgstr "自定义报表" #: code:addons/base/res/res_user.py:0 #, python-format msgid " (copy)" -msgstr "" +msgstr " (副本)" #. module: base #: view:ir.sequence:0 @@ -1134,7 +1136,7 @@ msgstr "7. %H:%M:%S ==> 18:25:20" #. module: base #: help:res.users,company_id:0 msgid "The company this user is currently working on." -msgstr "" +msgstr "该用户当前工作的公司。" #. module: base #: help:ir.actions.server,message:0 @@ -1280,7 +1282,7 @@ msgstr "STOCK_PROPERTIES" #. module: base #: view:res.partner.address:0 msgid "Search Contact" -msgstr "" +msgstr "搜索联系人" #. module: base #: view:ir.module.module:0 @@ -1344,7 +1346,7 @@ msgstr "组" #. module: base #: constraint:res.users:0 msgid "This user can not connect using this company !" -msgstr "" +msgstr "该用户不能使用该公司连接。" #. module: base #: model:res.country,name:base.bz @@ -1455,7 +1457,7 @@ msgstr "当前汇率" #. module: base #: selection:module.lang.install,init,lang:0 msgid "Greek / Ελληνικά" -msgstr "" +msgstr "希腊语 / Ελληνικά" #. module: base #: view:ir.values:0 @@ -1533,7 +1535,7 @@ msgstr "电子邮件地址" #. module: base #: selection:module.lang.install,init,lang:0 msgid "French (BE) / Français (BE)" -msgstr "" +msgstr "法语(比利时)/ Français (BE)" #. module: base #: code:addons/base/ir/ir_model.py:0 @@ -1571,7 +1573,7 @@ msgstr "字段映射" #: model:ir.actions.act_window,name:base.res_request-closed #: model:ir.ui.menu,name:base.next_id_12_close msgid "My Closed Requests" -msgstr "" +msgstr "我的已关闭请求列表" #. module: base #: model:ir.ui.menu,name:base.menu_custom @@ -1952,7 +1954,7 @@ msgstr "模块" #: model:ir.actions.act_window,name:base.action_res_bank_form #: model:ir.ui.menu,name:base.menu_action_res_bank_form msgid "Bank List" -msgstr "" +msgstr "银行列表" #. module: base #: field:ir.attachment,description:0 @@ -2360,7 +2362,7 @@ msgstr "把文件存为 .CSV 格式用您喜好的电子表格程序打开。该 #: model:ir.actions.act_window,name:base.action_partner_customer_form #: view:res.partner:0 msgid "Customers" -msgstr "" +msgstr "客户列表" #. module: base #: model:res.country,name:base.au @@ -2553,7 +2555,7 @@ msgstr "STOCK_SAVE_AS" #. module: base #: selection:ir.translation,type:0 msgid "SQL Constraint" -msgstr "" +msgstr "SQL 约束" #. module: base #: field:ir.actions.server,srcmodel_id:0 @@ -2964,7 +2966,7 @@ msgstr "如果设为真,该动作将不会显示表单右侧的工具栏中。 #. module: base #: model:ir.ui.menu,name:base.menu_custom_multicompany msgid "Multi company" -msgstr "" +msgstr "多公司" #. module: base #: view:ir.attachment:0 @@ -3066,7 +3068,7 @@ msgstr "负责与该业务伙伴沟通的内部用户" #. module: base #: field:res.partner,parent_id:0 msgid "Parent Partner" -msgstr "" +msgstr "上级业务伙伴" #. module: base #: view:ir.module.module:0 @@ -3134,7 +3136,7 @@ msgstr "示范数据" #. module: base #: selection:module.lang.install,init,lang:0 msgid "English (UK)" -msgstr "" +msgstr "英语(英国)" #. module: base #: model:res.country,name:base.aq @@ -3159,7 +3161,7 @@ msgstr "网页" #. module: base #: selection:module.lang.install,init,lang:0 msgid "English (CA)" -msgstr "" +msgstr "英语(加拿大)" #. module: base #: field:res.partner.event,planned_revenue:0 @@ -3569,7 +3571,7 @@ msgstr "创建动作" #. module: base #: selection:ir.actions.report.xml,report_type:0 msgid "HTML from HTML" -msgstr "" +msgstr "HTML 来自 HTML" #. module: base #: selection:ir.actions.report.xml,report_type:0 @@ -3874,7 +3876,7 @@ msgstr "莫桑比克" #: model:ir.actions.act_window,name:base.grant_menu_access #: model:ir.ui.menu,name:base.menu_grant_menu_access msgid "Manage Menus" -msgstr "" +msgstr "管理菜单" #. module: base #: field:ir.actions.server,message:0 @@ -3988,7 +3990,7 @@ msgstr "业务伙伴满意度" #. module: base #: selection:ir.ui.view,type:0 msgid "mdx" -msgstr "" +msgstr "mdx" #. module: base #: model:res.country,name:base.bi @@ -4028,7 +4030,7 @@ msgstr "文件格式" #. module: base #: field:res.lang,iso_code:0 msgid "ISO code" -msgstr "" +msgstr "ISO 国家代码" #. module: base #: model:ir.model,name:base.model_res_config_view @@ -4090,7 +4092,7 @@ msgstr "a4" #. module: base #: field:ir.actions.act_window,search_view_id:0 msgid "Search View Ref." -msgstr "" +msgstr "搜索视图引用" #. module: base #: view:ir.rule.group:0 @@ -4282,7 +4284,7 @@ msgstr "对象字段" #. module: base #: selection:module.lang.install,init,lang:0 msgid "French (CH) / Français (CH)" -msgstr "" +msgstr "法语(瑞士)/ Français (CH)" #. module: base #: selection:ir.ui.menu,icon:0 @@ -4356,7 +4358,7 @@ msgstr "取消卸载" #: view:res.partner:0 #: view:res.partner.address:0 msgid "Communication" -msgstr "" +msgstr "交流" #. module: base #: model:ir.model,name:base.model_ir_server_object_lines @@ -4575,7 +4577,7 @@ msgstr "继续" #. module: base #: selection:module.lang.install,init,lang:0 msgid "Thai / ภาษาไทย" -msgstr "" +msgstr "泰国语 / ภาษาไทย" #. module: base #: model:ir.actions.act_window,name:base.ir_property_form @@ -4672,7 +4674,7 @@ msgstr "对象" #. module: base #: field:ir.model.fields,selectable:0 msgid "Selectable" -msgstr "" +msgstr "可选择" #. module: base #: view:res.request.link:0 @@ -4861,12 +4863,12 @@ msgstr "STOCK_GO_BACK" #. module: base #: view:ir.actions.act_window:0 msgid "General Settings" -msgstr "" +msgstr "常规设置" #. module: base #: model:ir.ui.menu,name:base.custom_shortcuts msgid "Custom Shortcuts" -msgstr "" +msgstr "自定义快捷方式" #. module: base #: model:res.country,name:base.dz @@ -5331,12 +5333,12 @@ msgstr "进行中的业务伙伴事件" #: model:ir.ui.menu,name:base.menu_partner_function_form #: view:res.partner.function:0 msgid "Contact Functions" -msgstr "" +msgstr "联系人职能" #. module: base #: view:multi_company.default:0 msgid "Multi Company" -msgstr "" +msgstr "多公司" #. module: base #: view:ir.sequence:0 @@ -6820,7 +6822,7 @@ msgstr "子项" #: view:res.users:0 #: field:res.users,company_ids:0 msgid "Accepted Companies" -msgstr "" +msgstr "已接受公司列表" #. module: base #: field:ir.report.custom.fields,operation:0 @@ -7021,7 +7023,7 @@ msgstr "=" #: code:addons/base/ir/ir_report_custom.py:0 #, python-format msgid "Second field should be figures" -msgstr "" +msgstr "第二字段应该是数字" #. module: base #: model:ir.actions.act_window,name:base.action_model_grid_security @@ -7105,7 +7107,7 @@ msgstr "坦桑尼亚" #. module: base #: selection:module.lang.install,init,lang:0 msgid "Danish / Dansk" -msgstr "" +msgstr "丹麦语 / Dansk" #. module: base #: model:res.country,name:base.cx @@ -7409,7 +7411,7 @@ msgstr "自动加载视图" #: model:ir.actions.act_window,name:base.action_partner_supplier_form #: view:res.partner:0 msgid "Suppliers" -msgstr "" +msgstr "供应商列表" #. module: base #: selection:ir.ui.menu,icon:0 @@ -7446,7 +7448,7 @@ msgstr "省/州" #. module: base #: view:multi_company.default:0 msgid "Matching" -msgstr "" +msgstr "匹配" #. module: base #: field:ir.actions.configuration.wizard,name:0 @@ -7510,7 +7512,7 @@ msgstr "添加技术维护合同" #. module: base #: selection:module.lang.install,init,lang:0 msgid "Vietnam / Cộng hòa xã hội chủ nghĩa Việt Nam" -msgstr "" +msgstr "越南 / Cộng hòa xã hội chủ nghĩa Việt Nam" #. module: base #: field:ir.actions.act_window,limit:0 @@ -7611,7 +7613,7 @@ msgstr "不能更新" #. module: base #: selection:module.lang.install,init,lang:0 msgid "Klingon" -msgstr "" +msgstr "克林贡文" #. module: base #: model:res.country,name:base.sg @@ -7668,7 +7670,7 @@ msgstr "分类名称" #. module: base #: view:ir.actions.act_window:0 msgid "Select Groups" -msgstr "" +msgstr "选择组" #. module: base #: field:ir.sequence,weight:0 From 75365df1adcb07687e91c52aaccbc910d422ec75 Mon Sep 17 00:00:00 2001 From: "Harry (Open ERP)" Date: Fri, 8 Jan 2010 12:01:34 +0530 Subject: [PATCH 6/9] [FIX] base: set default company into admin user bzr revid: hmo@tinyerp.com-20100108063134-8a2ie2oacf8sdpkh --- bin/addons/base/base.sql | 2 +- bin/addons/base/base_data.xml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/addons/base/base.sql b/bin/addons/base/base.sql index 4f8d89e8ff5..58b30a89cf2 100644 --- a/bin/addons/base/base.sql +++ b/bin/addons/base/base.sql @@ -340,7 +340,7 @@ CREATE TABLE ir_model_data ( -- Users --------------------------------- -insert into res_users (id,login,password,name,action_id,active,company_id) values (1,'admin',NULL,'Administrator',NULL,True,1); +insert into res_users (id,login,password,name,action_id,active) values (1,'admin',NULL,'Administrator',NULL,True); insert into ir_model_data (name,module,model,noupdate,res_id) values ('user_root','base','res.users',True,1); -- Compatibility purpose, to remove V6.0 diff --git a/bin/addons/base/base_data.xml b/bin/addons/base/base_data.xml index 710bddeb73d..c8d3e39dd22 100644 --- a/bin/addons/base/base_data.xml +++ b/bin/addons/base/base_data.xml @@ -1245,6 +1245,9 @@ Tiny sprl + + + From eef29eefb2f48eda988c6d93b2a91be7931548a2 Mon Sep 17 00:00:00 2001 From: "Harry (Open ERP)" Date: Fri, 8 Jan 2010 15:38:00 +0530 Subject: [PATCH 7/9] [FIX] orm: In fields_view_get, if view not find , raise except_orm exception bzr revid: hmo@tinyerp.com-20100108100800-zqhg92ioacmi2b4j --- bin/osv/orm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index f1c36026c32..648e8c87989 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -1401,7 +1401,7 @@ class orm_template(object): else: xml = '' # what happens here, graph case? - # raise except_orm(_('Invalid Architecture!'),_("There is no view of type '%s' defined for the structure!") % view_type) + raise except_orm(_('Invalid Architecture!'),_("There is no view of type '%s' defined for the structure!") % view_type) result['arch'] = etree.fromstring(encode(xml)) result['name'] = 'default' result['field_parent'] = False From dc86eb0c35fadb1c82452861f010a1650b9b96fc Mon Sep 17 00:00:00 2001 From: "mra (Open ERP)" Date: Fri, 8 Jan 2010 16:22:52 +0530 Subject: [PATCH 8/9] [IMP] user preference: view change (new tag added current activity) bzr revid: mra@tinyerp.com-20100108105252-y9ht4x4xe6k693wz --- bin/addons/base/base_update.xml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/bin/addons/base/base_update.xml b/bin/addons/base/base_update.xml index ceceaac42ec..ad17852306e 100644 --- a/bin/addons/base/base_update.xml +++ b/bin/addons/base/base_update.xml @@ -76,13 +76,21 @@
- -