diff --git a/bin/addons/base/ir/__init__.py b/bin/addons/base/ir/__init__.py index 46331d821fd..7a35fec0d35 100644 --- a/bin/addons/base/ir/__init__.py +++ b/bin/addons/base/ir/__init__.py @@ -39,3 +39,4 @@ import ir_values import ir_translation import ir_exports import workflow +import ir_board diff --git a/bin/addons/base/ir/ir_board.py b/bin/addons/base/ir/ir_board.py new file mode 100644 index 00000000000..ec57050add6 --- /dev/null +++ b/bin/addons/base/ir/ir_board.py @@ -0,0 +1,40 @@ +############################################################################## +# +# Copyright (c) 2004-2006 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 osv import fields,osv + +class board(osv.osv): + _name = 'ir.board' + def create(self, cr, user, vals, context={}): + return False + def copy(self, cr, uid, id, default=None, context={}): + return False + _columns = { + 'name': fields.char('Board', size=64), + } +board() diff --git a/bin/tools/convert.py b/bin/tools/convert.py index 726b586a962..d282b44f466 100644 --- a/bin/tools/convert.py +++ b/bin/tools/convert.py @@ -50,13 +50,14 @@ def _eval_xml(self,node, pool, cr, uid, idref): idref['ref'] = lambda x: self.id_get(cr, False, x) return eval(a_eval, idref) if t == 'xml': - #def _process(s): - # groups = re.search - # %(.*?)d - # for group - # replace(group(0), self.id_get(cr, False, group(0)) - #txt = '\n'+_process("".join([i.toxml().encode("utf8") for i in node.childNodes])) - txt = '\n'+"".join([i.toxml().encode("utf8") for i in node.childNodes]) % idref + def _process(s, idref): + m = re.findall('[^%]%\((.*?)\)[ds]', s) + for id in m: + if not id in idref: + idref[id]=self.id_get(cr, False, id) + return s % idref + txt = '\n'+_process("".join([i.toxml().encode("utf8") for i in node.childNodes]), idref) +# txt = '\n'+"".join([i.toxml().encode("utf8") for i in node.childNodes]) % idref return txt if t in ('char', 'int', 'float'):