diff --git a/bin/addons/__init__.py b/bin/addons/__init__.py index 82761d647bd..e0073d3f123 100644 --- a/bin/addons/__init__.py +++ b/bin/addons/__init__.py @@ -644,16 +644,13 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, **kwargs): try: _load_data(cr, module_name, id_map, mode, 'test') except Exception, e: - if tools.config.options['test-continue']: - logger.notifyChannel('ERROR', netsvc.LOG_TEST, e) - pass - else: - raise + logger.notifyChannel('ERROR', netsvc.LOG_TEST, e) + pass finally: - if tools.config.options['test-rollback']: - cr.rollback() - else: + if tools.config.options['test-commit']: cr.commit() + else: + cr.rollback() def _load_data(cr, module_name, id_map, mode, kind): noupdate = (kind == 'demo') diff --git a/bin/addons/base/base_update.xml b/bin/addons/base/base_update.xml index f89614c7440..864cae2f5ba 100644 --- a/bin/addons/base/base_update.xml +++ b/bin/addons/base/base_update.xml @@ -118,7 +118,7 @@ - + diff --git a/bin/addons/base/i18n/hr.po b/bin/addons/base/i18n/hr.po index ab4957ecb3e..ceb4ce677f3 100644 --- a/bin/addons/base/i18n/hr.po +++ b/bin/addons/base/i18n/hr.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: 2010-05-17 05:29+0000\n" +"PO-Revision-Date: 2010-05-18 08:05+0000\n" "Last-Translator: goranc \n" "Language-Team: openerp-translators\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-05-18 05:14+0000\n" +"X-Launchpad-Export-Date: 2010-05-19 05:11+0000\n" "X-Generator: Launchpad (build Unknown)\n" "Language: hr\n" diff --git a/bin/addons/base/i18n/ja.po b/bin/addons/base/i18n/ja.po index 663a0ea6fc2..0634b5afa02 100644 --- a/bin/addons/base/i18n/ja.po +++ b/bin/addons/base/i18n/ja.po @@ -8,13 +8,13 @@ msgstr "" "Project-Id-Version: openobject-server\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2009-12-18 08:39+0000\n" -"PO-Revision-Date: 2010-05-17 05:28+0000\n" +"PO-Revision-Date: 2010-05-18 08:03+0000\n" "Last-Translator: Harry (Open ERP) \n" "Language-Team: Japanese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-05-18 05:14+0000\n" +"X-Launchpad-Export-Date: 2010-05-19 05:10+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/lv.po b/bin/addons/base/i18n/lv.po index 54ec07dc9d1..9f8e98c67c5 100644 --- a/bin/addons/base/i18n/lv.po +++ b/bin/addons/base/i18n/lv.po @@ -8,13 +8,13 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2009-12-18 08:39+0000\n" -"PO-Revision-Date: 2010-01-04 06:03+0000\n" -"Last-Translator: Fabien (Open ERP) \n" +"PO-Revision-Date: 2010-05-18 09:58+0000\n" +"Last-Translator: sraps (KN dati) \n" "Language-Team: Latvian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-04-17 03:51+0000\n" +"X-Launchpad-Export-Date: 2010-05-19 05:11+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base @@ -176,7 +176,7 @@ msgstr "ir.report.custom.fields" #. module: base #: view:res.partner:0 msgid "Search Partner" -msgstr "" +msgstr "Meklēt Partneri" #. module: base #: code:addons/base/module/wizard/wizard_export_lang.py:0 @@ -419,7 +419,7 @@ msgstr "Kolumbija" #. module: base #: view:ir.module.module:0 msgid "Schedule Upgrade" -msgstr "" +msgstr "Ieplānot Jauninājumus" #. module: base #: field:ir.actions.report.custom,report_id:0 @@ -593,7 +593,7 @@ msgstr "," #. module: base #: view:res.partner:0 msgid "My Partners" -msgstr "" +msgstr "Mani Partneri" #. module: base #: model:res.country,name:base.es @@ -745,7 +745,7 @@ msgstr "Irāna" #: 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 "Mani Pieprasījumi" #. module: base #: field:ir.sequence,name:0 @@ -1009,7 +1009,7 @@ msgstr "STOCK_COPY" #: code:addons/base/ir/ir_model.py:0 #, python-format msgid "Model %s Does not Exist !" -msgstr "" +msgstr "Modelis %s neeksistē !" #. module: base #: code:addons/base/module/module.py:0 @@ -1137,7 +1137,7 @@ msgstr "Lietotāja Atskaite" #: code:addons/base/res/res_user.py:0 #, python-format msgid " (copy)" -msgstr "" +msgstr " (kopija)" #. module: base #: view:ir.sequence:0 @@ -1303,7 +1303,7 @@ msgstr "Copy text \t STOCK_PROPERTIES" #. module: base #: view:res.partner.address:0 msgid "Search Contact" -msgstr "" +msgstr "Meklēt Kontaktu" #. module: base #: view:ir.module.module:0 @@ -1484,7 +1484,7 @@ msgstr "Esošā Likme" #. module: base #: selection:module.lang.install,init,lang:0 msgid "Greek / Ελληνικά" -msgstr "" +msgstr "Grieķu / Ελληνικά" #. module: base #: view:ir.values:0 @@ -1565,7 +1565,7 @@ msgstr "Epasta Adrese" #. module: base #: selection:module.lang.install,init,lang:0 msgid "French (BE) / Français (BE)" -msgstr "" +msgstr "Franču (BE) / Français (BE)" #. module: base #: code:addons/base/ir/ir_model.py:0 @@ -1603,7 +1603,7 @@ msgstr "Lauka Sasaistes" #: 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 "Mani Slēgie Pieprasījumi" #. module: base #: model:ir.ui.menu,name:base.menu_custom @@ -1861,7 +1861,7 @@ msgstr "Pieejas Kontrole" #: view:ir.module.module:0 #: field:ir.module.module,dependencies_id:0 msgid "Dependencies" -msgstr "Atkarīgie objekti" +msgstr "Atkarīgs no" #. module: base #: field:ir.report.custom.fields,bgcolor:0 @@ -1988,7 +1988,7 @@ msgstr "Modulis" #: 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 "Banku Saraksts" #. module: base #: field:ir.attachment,description:0 @@ -2401,7 +2401,7 @@ msgstr "" #: model:ir.actions.act_window,name:base.action_partner_customer_form #: view:res.partner:0 msgid "Customers" -msgstr "" +msgstr "Klienti" #. module: base #: model:res.country,name:base.au @@ -2603,7 +2603,7 @@ msgstr "STOCK_SAVE_AS" #. module: base #: selection:ir.translation,type:0 msgid "SQL Constraint" -msgstr "" +msgstr "SQL Ierobežojums" #. module: base #: field:ir.actions.server,srcmodel_id:0 @@ -2669,7 +2669,7 @@ msgstr "%c - Atbilstošais datuma un laika attēlojums." #. module: base #: selection:module.lang.install,init,lang:0 msgid "Finland / Suomi" -msgstr "" +msgstr "Somu / Suomi" #. module: base #: model:res.country,name:base.bo @@ -2931,7 +2931,7 @@ msgstr "Likmes" #. module: base #: selection:module.lang.install,init,lang:0 msgid "Albanian / Shqipëri" -msgstr "" +msgstr "Albāņu / Shqipëri" #. module: base #: model:res.country,name:base.sy @@ -3192,7 +3192,7 @@ msgstr "Demo dati" #. module: base #: selection:module.lang.install,init,lang:0 msgid "English (UK)" -msgstr "" +msgstr "Angļu (UK)" #. module: base #: model:res.country,name:base.aq @@ -3217,7 +3217,7 @@ msgstr "Tīmeklis" #. module: base #: selection:module.lang.install,init,lang:0 msgid "English (CA)" -msgstr "" +msgstr "Angļu (CA)" #. module: base #: field:res.partner.event,planned_revenue:0 @@ -3460,7 +3460,7 @@ msgstr "Partnera Adreses" #. module: base #: selection:module.lang.install,init,lang:0 msgid "Indonesian / Bahasa Indonesia" -msgstr "" +msgstr "Indonēziešu / Bahasa Indonesia" #. module: base #: model:res.country,name:base.cv @@ -3625,7 +3625,7 @@ msgstr "Izveidot darbību" #. module: base #: selection:ir.actions.report.xml,report_type:0 msgid "HTML from HTML" -msgstr "" +msgstr "HTML no HTML" #. module: base #: selection:ir.actions.report.xml,report_type:0 @@ -4086,7 +4086,7 @@ msgstr "Faila Formāts" #. module: base #: field:res.lang,iso_code:0 msgid "ISO code" -msgstr "" +msgstr "ISO kods" #. module: base #: model:ir.model,name:base.model_res_config_view @@ -4222,7 +4222,7 @@ msgstr "Izmainīt manus Uzstādījumus" #. module: base #: constraint:ir.actions.act_window:0 msgid "Invalid model name in the action definition." -msgstr "" +msgstr "Procesa definīcijā nepareizs modeļa nosaukums." #. module: base #: wizard_field:res.partner.sms_send,init,text:0 @@ -4344,7 +4344,7 @@ msgstr "Objekta Lauks" #. module: base #: selection:module.lang.install,init,lang:0 msgid "French (CH) / Français (CH)" -msgstr "" +msgstr "Franču (CH) / Français (CH)" #. module: base #: selection:ir.ui.menu,icon:0 @@ -4418,7 +4418,7 @@ msgstr "Atcelt atinstalāciju" #: view:res.partner:0 #: view:res.partner.address:0 msgid "Communication" -msgstr "" +msgstr "Saziņa" #. module: base #: model:ir.model,name:base.model_ir_server_object_lines @@ -6981,7 +6981,7 @@ msgstr "(year)=" #. module: base #: rml:ir.module.reference:0 msgid "Dependencies :" -msgstr "Atkarīgie objekti:" +msgstr "Atkarīgs no:" #. module: base #: selection:ir.ui.menu,icon:0 diff --git a/bin/addons/base/i18n/sv.po b/bin/addons/base/i18n/sv.po index 5bc05de1676..41571073e30 100644 --- a/bin/addons/base/i18n/sv.po +++ b/bin/addons/base/i18n/sv.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-05-17 05:27+0000\n" +"PO-Revision-Date: 2010-05-18 08:01+0000\n" "Last-Translator: Anders Wallenquist \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-05-18 05:14+0000\n" +"X-Launchpad-Export-Date: 2010-05-19 05:11+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/uk.po b/bin/addons/base/i18n/uk.po index d850fe2e2a4..6ff2cae1d3f 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-05-17 05:31+0000\n" +"PO-Revision-Date: 2010-05-18 08:07+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-05-18 05:14+0000\n" +"X-Launchpad-Export-Date: 2010-05-19 05:11+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/zh_CN.po b/bin/addons/base/i18n/zh_CN.po index 29ac671c388..c1712a50da5 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: 2010-05-17 05:28+0000\n" +"PO-Revision-Date: 2010-05-18 08:05+0000\n" "Last-Translator: OpenERP Administrators \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-05-18 05:14+0000\n" +"X-Launchpad-Export-Date: 2010-05-19 05:11+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/res/partner/partner_demo.xml b/bin/addons/base/res/partner/partner_demo.xml index c6de312bc4c..f5d70a2490d 100644 --- a/bin/addons/base/res/partner/partner_demo.xml +++ b/bin/addons/base/res/partner/partner_demo.xml @@ -357,7 +357,7 @@ ASUSTEK-Subject - res.partner,2 + diff --git a/bin/addons/base/res/partner/partner_view.xml b/bin/addons/base/res/partner/partner_view.xml index 840ee132481..b4c9f9bc67f 100644 --- a/bin/addons/base/res/partner/partner_view.xml +++ b/bin/addons/base/res/partner/partner_view.xml @@ -347,24 +347,27 @@ - - - - + + + + + + + - Partners + Customers ir.actions.act_window res.partner form @@ -639,7 +642,7 @@ /> - Partner + Address Book ir.ui.menu diff --git a/bin/addons/base/res/res_company.py b/bin/addons/base/res/res_company.py index 011e6f87a42..7d8a9cda8f3 100644 --- a/bin/addons/base/res/res_company.py +++ b/bin/addons/base/res/res_company.py @@ -24,7 +24,6 @@ from osv import fields import os import tools from tools.translate import _ -import base64 class multi_company_default(osv.osv): """ @@ -181,8 +180,9 @@ class res_company(osv.osv): return True def _get_logo(self, cr, uid, ids): - file_data = open('../pixmaps/openerp-header.png','rb').read() - return base64.encodestring(file_data) + return open(os.path.join( + tools.config['root_path'], '..', 'pixmaps', 'openerp-header.png'), + 'rb') .read().encode('base64') def _get_header2(self,cr,uid,ids): diff --git a/bin/tools/config.py b/bin/tools/config.py index a92948b8af0..c18a7422e2c 100644 --- a/bin/tools/config.py +++ b/bin/tools/config.py @@ -83,8 +83,7 @@ class configmanager(object): 'list_db' : True, 'timezone' : False, # to override the default TZ 'test-disable' : False, - 'test-rollback' : True, - 'test-continue' : False + 'test-commit' : False, } self.misc = {} @@ -142,10 +141,8 @@ class configmanager(object): group = optparse.OptionGroup(parser, "Testing Configuration") group.add_option("--test-disable", action="store_true", dest="test_disable", default=False, help="Disable loading test files.") - group.add_option("--test-no-rollback", action="store_false", dest="test_rollback", - default=True, help="Don't rollback after running test.") - group.add_option("--test-continue", action="store_true", dest="test_continue", - default=False, help="Display exception but then test should continue.") + group.add_option("--test-commit", action="store_true", dest="test_commit", + default=False, help="Commit database changes performed by tests.") parser.add_option_group(group) # Logging Group @@ -288,8 +285,7 @@ class configmanager(object): self.options['init'] = opt.init and dict.fromkeys(opt.init.split(','), 1) or {} self.options["demo"] = not opt.without_demo and self.options['init'] or {} self.options["test-disable"] = opt.test_disable - self.options["test-rollback"] = opt.test_rollback - self.options["test-continue"] = opt.test_continue + self.options["test-commit"] = opt.test_commit self.options['update'] = opt.update and dict.fromkeys(opt.update.split(','), 1) or {} self.options['translate_modules'] = opt.translate_modules and map(lambda m: m.strip(), opt.translate_modules.split(',')) or ['all'] diff --git a/bin/tools/convert.py b/bin/tools/convert.py index 36f2740dbc9..df56bd7154a 100644 --- a/bin/tools/convert.py +++ b/bin/tools/convert.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (). # @@ -15,7 +15,7 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## @@ -369,10 +369,10 @@ form: module.record_id""" % (xml_id,) domain = rec.get('domain','').encode('utf-8') or '{}' context = rec.get('context','').encode('utf-8') or '{}' res_model = rec.get('res_model','').encode('utf-8') - src_model = rec.get('src_model','').encode('utf-8') + src_model = rec.get('src_model','').encode('utf-8') view_type = rec.get('view_type','').encode('utf-8') or 'form' view_mode = rec.get('view_mode','').encode('utf-8') or 'tree,form' - + usage = rec.get('usage','').encode('utf-8') limit = rec.get('limit','').encode('utf-8') auto_refresh = rec.get('auto_refresh','').encode('utf-8') @@ -720,7 +720,12 @@ form: module.record_id""" % (xml_id,) if f_ref=="null": f_val = False else: - f_val = self.id_get(cr, f_model, f_ref) + if f_name in model._columns \ + and model._columns[f_name]._type == 'reference': + val = self.model_id_get(cr, f_model, f_ref) + f_val = val[0] + ',' + str(val[1]) + else: + f_val = self.id_get(cr, f_model, f_ref) else: f_val = _eval_xml(self,field, self.pool, cr, self.uid, self.idref) if model._columns.has_key(f_name): @@ -738,13 +743,17 @@ form: module.record_id""" % (xml_id,) def id_get(self, cr, model, id_str): if id_str in self.idref: return self.idref[id_str] + return self.model_id_get(cr, model, id_str)[1] + + def model_id_get(self, cr, model, id_str): + model_data_obj = self.pool.get('ir.model.data') mod = self.module if '.' in id_str: mod,id_str = id_str.split('.') - result = self.pool.get('ir.model.data')._get_id(cr, self.uid, mod, id_str) - res = self.pool.get('ir.model.data').read(cr, self.uid, [result], ['res_id']) + result = model_data_obj._get_id(cr, self.uid, mod, id_str) + res = model_data_obj.read(cr, self.uid, [result], ['model', 'res_id']) if res and res[0] and res[0]['res_id']: - return int(res[0]['res_id']) + return res[0]['model'], int(res[0]['res_id']) return False def parse(self, de): diff --git a/bin/tools/misc.py b/bin/tools/misc.py index e552660e3e2..07e0fc38f8e 100644 --- a/bin/tools/misc.py +++ b/bin/tools/misc.py @@ -101,7 +101,7 @@ def init_db(cr): values (%s, %s, %s, %s, %s, %s, %s, %s, %s)', ( id, info.get('author', ''), info.get('website', ''), i, info.get('name', False), - info.get('description', ''), p_id, state, info.get('certificate'))) + info.get('description', ''), p_id, state, info.get('certificate') or None)) cr.execute('insert into ir_model_data \ (name,model,module, res_id, noupdate) values (%s,%s,%s,%s,%s)', ( 'module_meta_information', 'ir.module.module', i, id, True)) diff --git a/doc/Changelog-6.x b/doc/Changelog-6.x new file mode 100644 index 00000000000..78d65c8e809 --- /dev/null +++ b/doc/Changelog-6.x @@ -0,0 +1,9 @@ +2010-07-XX: 6.0.0 +================= + +Improvements (server) +--------------------- + + * support of 'ref' attribute for importing 'reference' field values, as for many2one fields. + +