From 83a8db6b975861d806c1de8dd8a45d715cb90320 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Fri, 23 Jan 2009 13:14:04 +0100 Subject: [PATCH 1/5] [FIX] Redhat Package Manager lp bug: https://launchpad.net/bugs/311981 fixed lp bug: https://launchpad.net/bugs/314575 fixed bzr revid: stephane@tinyerp.com-20090123121404-345vxufyn1beqjt4 --- bin/release.py | 3 ++- rpminstall_sh.txt | 5 ++--- setup.cfg | 3 ++- setup.py | 3 +++ 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/bin/release.py b/bin/release.py index 9c96c3fad75..5fb882d2663 100644 --- a/bin/release.py +++ b/bin/release.py @@ -22,7 +22,8 @@ ############################################################################## name = 'openerp-server' -version = '5.0.0_rc3' +version = '5.0.0' +release = '0_rc3' major_version = '5.0' description = 'OpenERP Server' long_desc = '''\ diff --git a/rpminstall_sh.txt b/rpminstall_sh.txt index 0d88cc1dcf1..c184585e94f 100644 --- a/rpminstall_sh.txt +++ b/rpminstall_sh.txt @@ -7,8 +7,7 @@ # Need to overwrite the install-part of the RPM to append the # compression-suffix onto the filenames for the man-pages. # -python setup.py install --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES +python setup.py install --optimize 1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES SUFFIX=gz -mv INSTALLED_FILES INSTALLED_FILES.orig -sed "s!\(/share/man/.*\)!\1.$SUFFIX!" INSTALLED_FILES.orig > INSTALLED_FILES +sed "s!\(/share/man/.*\)!\1.$SUFFIX!" -i INSTALLED_FILES diff --git a/setup.cfg b/setup.cfg index caf187e4c33..7770708d9b9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -5,7 +5,8 @@ formats=gztar formats=rpm [bdist_rpm] -release=1 +# release must exactly match 'release' as set in bin/release.py +release=0_rc3 requires=python >= 2.3 #build-requires=python-devel >= 2.3 diff --git a/setup.py b/setup.py index 7c55dd4e2e6..a7c6ecb5f0e 100755 --- a/setup.py +++ b/setup.py @@ -44,6 +44,9 @@ opj = os.path.join execfile(opj('bin', 'release.py')) +if sys.argv[1] != 'bdist_rpm': + version = version + '-' + release + # get python short version py_short_version = '%s.%s' % sys.version_info[:2] From 4e13d9b40a74b0e21a0a6afdcafb30e8cf5b5a93 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 23 Jan 2009 15:08:24 +0100 Subject: [PATCH 2/5] [FIX] ir_model: add index to model [FIX] ir_model_grid inherith from ir_model [FIX] fix error message when deleting ir_model_grid instance bzr revid: christophe@tinyerp.com-20090123140824-gltcdmqax4qik9pi --- bin/addons/base/ir/ir_model.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/bin/addons/base/ir/ir_model.py b/bin/addons/base/ir/ir_model.py index b5d4fa20875..69729317471 100644 --- a/bin/addons/base/ir/ir_model.py +++ b/bin/addons/base/ir/ir_model.py @@ -40,10 +40,10 @@ class ir_model(osv.osv): _rec_name = 'name' _columns = { 'name': fields.char('Object Name', size=64, translate=True, required=True), - 'model': fields.char('Object Name', size=64, required=True, search=1), + 'model': fields.char('Object Name', size=64, required=True, select=1), 'info': fields.text('Information'), 'field_id': fields.one2many('ir.model.fields', 'model_id', 'Fields', required=True), - 'state': fields.selection([('manual','Custom Object'),('base','Base Object')],'Manualy Created',readonly=1), + 'state': fields.selection([('manual','Custom Object'),('base','Base Object')],'Manualy Created',readonly=True), 'access_ids': fields.one2many('ir.model.access', 'model_id', 'Access'), } _defaults = { @@ -94,18 +94,19 @@ ir_model() class ir_model_grid(osv.osv): _name = 'ir.model.grid' _table = 'ir_model' + _inherit = 'ir.model' _description = "Objects Security Grid" - _rec_name = 'name' - _columns = { - 'name': fields.char('Object', size=64), - 'model': fields.char('Object Name', size=64), - } + #_rec_name = 'name' + #_columns = { + # 'name': fields.char('Object', size=64), + # 'model': fields.char('Object Name', size=64), + #} def create(self, cr, uid, vals, context=None): raise osv.except_osv('Error !', 'You cannot add an entry to this view !') def unlink(self, *args, **argv): - raise osv.except_osv('Error !', 'You cannot add an entry to this view !') + raise osv.except_osv('Error !', 'You cannot delete an entry of this view !') def read(self, cr, uid, ids, fields=None, context=None, load='_classic_read'): result = super(osv.osv, self).read(cr, uid, ids, fields, context, load) From 826cd7fed4bd2cd0beca1ea96f6380defac1e9fd Mon Sep 17 00:00:00 2001 From: Olivier Laurent Date: Fri, 23 Jan 2009 15:10:20 +0100 Subject: [PATCH 3/5] Added the possibility to create a module Technical Guide in rst (restructured text) bzr revid: olt@tinyerp.com-20090123141020-0ctjqpovr8b4m65e --- bin/addons/base/module/module_wizard.xml | 6 + bin/addons/base/module/wizard/__init__.py | 1 + .../module/wizard/wizard_tech_guide_rst.py | 241 ++++++++++++++++++ bin/wizard/__init__.py | 7 +- 4 files changed, 254 insertions(+), 1 deletion(-) create mode 100644 bin/addons/base/module/wizard/wizard_tech_guide_rst.py diff --git a/bin/addons/base/module/module_wizard.xml b/bin/addons/base/module/module_wizard.xml index 2b993f13dd4..7f86447201c 100644 --- a/bin/addons/base/module/module_wizard.xml +++ b/bin/addons/base/module/module_wizard.xml @@ -22,6 +22,12 @@ + + Create RST Technical Guide + tech.guide.rst + + + Export a Translation File wizard.module.lang.export diff --git a/bin/addons/base/module/wizard/__init__.py b/bin/addons/base/module/wizard/__init__.py index 63c49313c66..8c799d1bc61 100644 --- a/bin/addons/base/module/wizard/__init__.py +++ b/bin/addons/base/module/wizard/__init__.py @@ -28,6 +28,7 @@ import wizard_export_lang import wizard_import_lang import wizard_module_import import wizard_update_translations +import wizard_tech_guide_rst # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/bin/addons/base/module/wizard/wizard_tech_guide_rst.py b/bin/addons/base/module/wizard/wizard_tech_guide_rst.py new file mode 100644 index 00000000000..e2a12cf113a --- /dev/null +++ b/bin/addons/base/module/wizard/wizard_tech_guide_rst.py @@ -0,0 +1,241 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2009 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 . +# +############################################################################## + +import wizard +import osv +import pooler +import os +import tools + +import zipfile +from StringIO import StringIO +import base64 + +choose_file_form =''' +
+ +