commit
bf025fedb6
|
@ -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')
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
<separator string="Signature" colspan="2"/>
|
||||
<field colspan="2" name="signature" nolabel="1"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<group colspan="2" col="2" expand="1">
|
||||
<separator string="Access Rights (groups)" colspan="2"/>
|
||||
<field colspan="2" nolabel="1" name="groups_id"/>
|
||||
</group>
|
||||
|
|
|
@ -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 <goranc@gmail.com>\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"
|
||||
|
||||
|
|
|
@ -8,13 +8,13 @@ msgstr ""
|
|||
"Project-Id-Version: openobject-server\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\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) <hmo@tinyerp.com>\n"
|
||||
"Language-Team: Japanese <ja@li.org>\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
|
||||
|
|
|
@ -8,13 +8,13 @@ msgstr ""
|
|||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\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) <fp@tinyerp.com>\n"
|
||||
"PO-Revision-Date: 2010-05-18 09:58+0000\n"
|
||||
"Last-Translator: sraps (KN dati) <Unknown>\n"
|
||||
"Language-Team: Latvian <lv@li.org>\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
|
||||
|
|
|
@ -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 <anders.wallenquist@vertel.se>\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
|
||||
|
|
|
@ -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) <fp@tinyerp.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-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
|
||||
|
|
|
@ -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 <Unknown>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-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
|
||||
|
|
|
@ -357,7 +357,7 @@
|
|||
<record id="res_partner_asustek_request" model="res.request">
|
||||
<field name="name">ASUSTEK-Subject</field>
|
||||
<field name="act_to" ref="user_demo"/>
|
||||
<field name="ref_doc1">res.partner,2</field>
|
||||
<field name="ref_doc1" ref="res_partner_asus"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -347,24 +347,27 @@
|
|||
<field name="arch" type="xml">
|
||||
<search string="Search Partner">
|
||||
<group col='10' colspan='4'>
|
||||
<filter string="My Partners" icon="terp-partner" domain="[('user_id','=',uid)]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Customers" icon="terp-partner" domain="[('customer','=',1)]" help="Customer Partners"/>
|
||||
<filter string="Suppliers" icon="terp-partner" domain="[('supplier','=',1)]" help="Supplier Partners"/>
|
||||
<filter string="Employees" icon="terp-partner" domain="[('employee','=',1)]" help="Employee Partners"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="address" select="1"/>
|
||||
<field name="country" select="1"/>
|
||||
<field name="category_id" select="1"/>
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="user_id" select="1">
|
||||
<filter string="My Partners" icon="terp-partner" domain="[('user_id','=',uid)]"/>
|
||||
</field>
|
||||
</group>
|
||||
<newline />
|
||||
<group expand="0" string="Group By..." colspan="16">
|
||||
<filter string="Salesman" icon="terp-crm" domain="[]" context="{'group_by' : 'user_id'}" />
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_partner_form" model="ir.actions.act_window">
|
||||
<field name="name">Partners</field>
|
||||
<field name="name">Customers</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">res.partner</field>
|
||||
<field name="view_type">form</field>
|
||||
|
@ -639,7 +642,7 @@
|
|||
/>
|
||||
|
||||
<record id="ir_ui_view_sc_partner0" model="ir.ui.view_sc">
|
||||
<field name="name">Partner</field>
|
||||
<field name="name">Address Book</field>
|
||||
<field name="resource">ir.ui.menu</field>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="res_id" ref="menu_partner_form"/>
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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']
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
@ -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):
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
Loading…
Reference in New Issue