From 3179f235f3fdd5626ccf579a06e8119243249dc3 Mon Sep 17 00:00:00 2001 From: "Harry (OpenERP)" Date: Wed, 29 Dec 2010 14:39:24 +0530 Subject: [PATCH 01/13] [FIX] product_manufacturer: security bzr revid: hmo@tinyerp.com-20101229090924-wzavbi0r8srtdlh5 --- addons/product_manufacturer/security/ir.model.access.csv | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/product_manufacturer/security/ir.model.access.csv b/addons/product_manufacturer/security/ir.model.access.csv index c12946db678..b00c562dd43 100644 --- a/addons/product_manufacturer/security/ir.model.access.csv +++ b/addons/product_manufacturer/security/ir.model.access.csv @@ -1,6 +1,5 @@ "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" "access_product_manufacturer_attribute","product.manufacturer.attribute","model_product_manufacturer_attribute",base.group_user,1,0,0,0 "access_product_manufacturer_attribute sale_manager","product.manufacturer.attribute","model_product_manufacturer_attribute","base.group_sale_manager",1,1,1,1 -"access_product_manufacturer_attribute_purchasemanager","product.manufacturer.attribute purchasemanager","model_product_manufacturer_attribute","purchase.group_purchase_manager",1,1,1,1 "access_product_manufacturer_attribute_stockmanager","product.manufacturer.attribute stockmanager","model_product_manufacturer_attribute","stock.group_stock_manager",1,1,1,1 -"access_product_manufacturer_attribute_mrpmanager","product.manufacturer.attribute mrpmanager","model_product_manufacturer_attribute","mrp.group_mrp_manager",1,1,1,1 + From 7e112b7fd253e242a23ce1bf20eeccb0cff020a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Degrave?= Date: Wed, 29 Dec 2010 10:25:06 +0100 Subject: [PATCH 02/13] [FIX] product_manufacturer access rights bzr revid: fde@openerp.com-20101229092506-j8anb9cxtzoj4n4c --- addons/product_manufacturer/security/ir.model.access.csv | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/addons/product_manufacturer/security/ir.model.access.csv b/addons/product_manufacturer/security/ir.model.access.csv index b00c562dd43..b06d5d3ea96 100644 --- a/addons/product_manufacturer/security/ir.model.access.csv +++ b/addons/product_manufacturer/security/ir.model.access.csv @@ -1,5 +1,2 @@ "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"access_product_manufacturer_attribute","product.manufacturer.attribute","model_product_manufacturer_attribute",base.group_user,1,0,0,0 -"access_product_manufacturer_attribute sale_manager","product.manufacturer.attribute","model_product_manufacturer_attribute","base.group_sale_manager",1,1,1,1 -"access_product_manufacturer_attribute_stockmanager","product.manufacturer.attribute stockmanager","model_product_manufacturer_attribute","stock.group_stock_manager",1,1,1,1 - +"access_product_manufacturer_attribute","product.manufacturer.attribute","model_product_manufacturer_attribute",base.group_user,1,1,1,1 From cd3c1bcf121ec2a996400246bd1b8501f7ddceb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Degrave?= Date: Wed, 29 Dec 2010 10:30:25 +0100 Subject: [PATCH 03/13] [FIX] report_intrastat access rights bzr revid: fde@openerp.com-20101229093025-n4gjwyr0a9zjz74i --- addons/report_intrastat/security/ir.model.access.csv | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/report_intrastat/security/ir.model.access.csv b/addons/report_intrastat/security/ir.model.access.csv index f1a72c60072..f59d76ed536 100644 --- a/addons/report_intrastat/security/ir.model.access.csv +++ b/addons/report_intrastat/security/ir.model.access.csv @@ -4,4 +4,3 @@ "access_report_intrastat_code_sale_manager","report.intrastat.code sale manager","model_report_intrastat_code","base.group_sale_manager",1,1,1,1 "access_report_intrastat_code_purchase_manager","report.intrastat.code purchase manager","model_report_intrastat_code","purchase.group_purchase_manager",1,1,1,1 "access_report_intrastat_code_stock_manager","report.intrastat.code stock manager","model_report_intrastat_code","stock.group_stock_manager",1,1,1,1 -"access_report_intrastat_code_mrp_manager","report.intrastat.code mrp manager","model_report_intrastat_code","mrp.group_mrp_manager",1,1,1,1 From 0e00f5c5a6811d50110d99e325cfa0d1aff4c2a9 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Wed, 29 Dec 2010 10:47:54 +0100 Subject: [PATCH 04/13] [FIX] ir.ui.menu: typos introduced recently bzr revid: odo@openerp.com-20101229094754-c9od7rd0xlvk9h08 --- bin/addons/base/ir/ir_ui_menu.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/addons/base/ir/ir_ui_menu.py b/bin/addons/base/ir/ir_ui_menu.py index dff6823f6c6..8696df80311 100644 --- a/bin/addons/base/ir/ir_ui_menu.py +++ b/bin/addons/base/ir/ir_ui_menu.py @@ -286,10 +286,10 @@ class ir_ui_menu(osv.osv): string='Complete Name', type='char', size=128), 'icon': fields.selection(tools.icons, 'Icon', size=64), 'icon_pict': fields.function(_get_icon_pict, method=True, type='char', size=32), - 'web_icon': fields.char('Icon File', size=128), - 'web_icon_hover':fields.char('Icon Over File', size=128), - 'web_icon_data': fields.function(_get_image_icon, string='Web Icons', type='binary', method=True, readonly=True, store=True, multi='icon'), - 'web_icon_hover_data':fields.function(_get_image_icon, string='Web Icons Over', type='binary', method=True, readonly=True, store=True,multi='icon'), + 'web_icon': fields.char('Web Icon File', size=128), + 'web_icon_hover':fields.char('Web Icon File (hover)', size=128), + 'web_icon_data': fields.function(_get_image_icon, string='Web Icon Image', type='binary', method=True, readonly=True, store=True, multi='icon'), + 'web_icon_hover_data':fields.function(_get_image_icon, string='Web Icon Image (hover)', type='binary', method=True, readonly=True, store=True, multi='icon'), 'action': fields.function(_action, fnct_inv=_action_inv, method=True, type='reference', string='Action', selection=[ From 5a15a0a41a3c23783db7d33cd01905ed2aff6a4d Mon Sep 17 00:00:00 2001 From: "Harry (OpenERP)" Date: Wed, 29 Dec 2010 15:46:28 +0530 Subject: [PATCH 05/13] [FIX] knowledge: security bzr revid: hmo@tinyerp.com-20101229101628-1vzbn5dytou46dlw --- addons/document/security/ir.model.access.csv | 1 + addons/knowledge/security/ir.model.access.csv | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/document/security/ir.model.access.csv b/addons/document/security/ir.model.access.csv index d7aba7cbde7..0422edba24e 100644 --- a/addons/document/security/ir.model.access.csv +++ b/addons/document/security/ir.model.access.csv @@ -25,3 +25,4 @@ "access_report_document_file_group_system","report.document.file group system","model_report_document_file","base.group_system",1,0,0,0 "access_report_document_wall_group_document_manager","report.document.wall document manager","model_report_document_wall","base.group_system",1,0,0,0 "access_report_document_wall_group_system","report.document.wall group system","model_report_document_wall","base.group_system",1,0,0,0 +"access_report_document_user_knowledgeuser","report.document.user knowledgeuser","document.model_report_document_user","base.group_document_user",1,0,0,0 diff --git a/addons/knowledge/security/ir.model.access.csv b/addons/knowledge/security/ir.model.access.csv index 474cdf101ab..7a057fcfcbe 100644 --- a/addons/knowledge/security/ir.model.access.csv +++ b/addons/knowledge/security/ir.model.access.csv @@ -1,4 +1,4 @@ "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" "access_ir_attachment_sale_manager","ir_attachment manager","base.model_ir_attachment","base.group_sale_manager",1,1,1,1 "access_ir_attachment_partner_manager","ir_attachment_partner manager","base.model_ir_attachment","base.group_partner_manager",1,1,1,1 -"access_report_document_user_knowledgeuser","report.document.user knowledgeuser","document.model_report_document_user","base.group_document_user",1,0,0,0 + From bcaa136fa35accf18f07eaaa70d160e6ece5a19b Mon Sep 17 00:00:00 2001 From: "Harry (OpenERP)" Date: Wed, 29 Dec 2010 16:18:16 +0530 Subject: [PATCH 06/13] [FIX] sale, purchase: yml issue bzr revid: hmo@tinyerp.com-20101229104816-lv51d1nm4gu4mjhn --- addons/purchase/test/purchase_from_order.yml | 1 - addons/sale/test/advance_invoice.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/addons/purchase/test/purchase_from_order.yml b/addons/purchase/test/purchase_from_order.yml index 454580baaf4..ca089db7821 100644 --- a/addons/purchase/test/purchase_from_order.yml +++ b/addons/purchase/test/purchase_from_order.yml @@ -31,7 +31,6 @@ date_order: '2010-05-11' invoice_method: order location_id: stock.stock_location_stock - name: PO00003 order_line: - date_planned: '2010-05-13' name: iPod diff --git a/addons/sale/test/advance_invoice.yml b/addons/sale/test/advance_invoice.yml index b3c01599680..b4a985ec4e8 100644 --- a/addons/sale/test/advance_invoice.yml +++ b/addons/sale/test/advance_invoice.yml @@ -5,7 +5,6 @@ !record {model: sale.order, id: sale_order_so5}: date_order: '2010-07-17' invoice_quantity: order - name: SO004 order_line: - name: LG Viewty Smart price_unit: 170.0 From 761c638a54e601406fd4b01e8f37c44512f8ddcf Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Wed, 29 Dec 2010 11:50:04 +0100 Subject: [PATCH 07/13] [FIX] osv,tools: break some circular dependencies bzr revid: odo@openerp.com-20101229105004-ay1e69aujci1l32i --- bin/osv/orm.py | 8 +++----- bin/tools/convert.py | 8 +++++--- bin/tools/misc.py | 5 +++++ 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 65e90922794..72500602669 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -59,8 +59,10 @@ from query import Query import tools from tools.safe_eval import safe_eval as eval -regex_order = re.compile('^(([a-z0-9_]+|"[a-z0-9_]+")( *desc| *asc)?( *, *|))+$', re.I) +# List of etree._Element subclasses that we choose to ignore when parsing XML. +from tools import SKIPPED_ELEMENT_TYPES +regex_order = re.compile('^(([a-z0-9_]+|"[a-z0-9_]+")( *desc| *asc)?( *, *|))+$', re.I) POSTGRES_CONFDELTYPES = { 'RESTRICT': 'r', @@ -70,10 +72,6 @@ POSTGRES_CONFDELTYPES = { 'SET DEFAULT': 'd', } -# List of etree._Element subclasses that we choose to ignore when parsing view architecture. -# We include the *Base ones just in case, currently they seem to be subclasses of the _* ones. -SKIPPED_ELEMENT_TYPES = (etree._Comment, etree._ProcessingInstruction, etree.CommentBase, etree.PIBase) - def last_day_of_current_month(): today = datetime.date.today() last_day = str(calendar.monthrange(today.year, today.month)[1]) diff --git a/bin/tools/convert.py b/bin/tools/convert.py index e46d37f688a..db8d71843ba 100644 --- a/bin/tools/convert.py +++ b/bin/tools/convert.py @@ -45,10 +45,12 @@ import netsvc import osv import pooler from config import config -from osv.orm import except_orm, SKIPPED_ELEMENT_TYPES from tools.translate import _ from yaml_import import convert_yaml_import +# List of etree._Element subclasses that we choose to ignore when parsing XML. +from tools import SKIPPED_ELEMENT_TYPES + # Import of XML records requires the unsafe eval as well, # almost everywhere, which is ok because it supposedly comes # from trusted data, but at least we make it obvious now. @@ -865,7 +867,7 @@ form: module.record_id""" % (xml_id,) self.__logger.error('Parse error in %s:%d: \n%s', rec.getroottree().docinfo.URL, rec.sourceline, - etree.tostring(rec).strip()) + etree.tostring(rec).strip(), exc_info=True) self.cr.rollback() raise return True @@ -945,7 +947,7 @@ def convert_csv_import(cr, module, fname, csvcontent, idref=None, mode='init', result, rows, warning_msg, dummy = pool.get(model).import_data(cr, uid, fields, datas,mode, module, noupdate, filename=fname_partial) if result < 0: # Report failed import and abort module install - raise except_orm(_('Module loading failed'), _('Loading %s/%s failed:\n %s') % (module, fname, warning_msg)) + raise Exception(_('Module loading failed: file %s/%s could not be processed:\n %s') % (module, fname, warning_msg)) if config.get('import_partial'): data = pickle.load(file(config.get('import_partial'))) data[fname_partial] = 0 diff --git a/bin/tools/misc.py b/bin/tools/misc.py index 2515803f452..88f06749f90 100644 --- a/bin/tools/misc.py +++ b/bin/tools/misc.py @@ -44,6 +44,7 @@ from email.Header import Header from email.Utils import formatdate, COMMASPACE from email import Encoders from itertools import islice, izip +from lxml import etree from which import which if sys.version_info[:2] < (2, 4): from threadinglocal import local @@ -60,6 +61,10 @@ from lru import LRU _logger = logging.getLogger('tools') +# List of etree._Element subclasses that we choose to ignore when parsing XML. +# We include the *Base ones just in case, currently they seem to be subclasses of the _* ones. +SKIPPED_ELEMENT_TYPES = (etree._Comment, etree._ProcessingInstruction, etree.CommentBase, etree.PIBase) + # initialize a database with base/base.sql def init_db(cr): import addons From b6595ed6d5d86f06002a53e752bfacffddac7440 Mon Sep 17 00:00:00 2001 From: "Harry (OpenERP)" Date: Wed, 29 Dec 2010 16:46:31 +0530 Subject: [PATCH 08/13] [FIX] hr_payroll_account: if journal_id or bank_journal_id are not specified in pay slip, call super method which are declared in hr_payroll module. it fixed due to solve yml issue bzr revid: hmo@tinyerp.com-20101229111631-zam0fzc3iu11vsr5 --- addons/hr_payroll_account/hr_payroll_account.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/addons/hr_payroll_account/hr_payroll_account.py b/addons/hr_payroll_account/hr_payroll_account.py index adf1fada169..35f638a3326 100644 --- a/addons/hr_payroll_account/hr_payroll_account.py +++ b/addons/hr_payroll_account/hr_payroll_account.py @@ -256,6 +256,10 @@ class hr_payslip(osv.osv): period_pool = self.pool.get('account.period') for slip in self.browse(cr, uid, ids, context=context): + if not slip.bank_journal_id or not slip.journal_id: + # Call super method to process sheet if journal_id or bank_journal_id are not specified. + super(hr_payslip, self).process_sheet(cr, uid, [slip.id], context=context) + continue line_ids = [] partner = False partner_id = False @@ -411,6 +415,10 @@ class hr_payslip(osv.osv): payslip_pool = self.pool.get('hr.payslip.line') for slip in self.browse(cr, uid, ids, context=context): + if not slip.journal_id: + # Call super method to verify sheet if journal_id is not specified. + super(hr_payslip, self).verify_sheet(cr, uid, [slip.id], context=context) + continue total_deduct = 0.0 line_ids = [] From 191f66c521500d5460f83e204717f81d86b502ea Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Wed, 29 Dec 2010 12:51:44 +0100 Subject: [PATCH 09/13] [FIX] Change the name of the NT Service bzr revid: stephane@openerp.com-20101229115144-xj2mhe2d8wy1m4iv --- win32/OpenERPServerService.py | 6 +++--- win32/start.bat | 4 ++-- win32/stop.bat | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/win32/OpenERPServerService.py b/win32/OpenERPServerService.py index e44a9d274a1..bdf371aca68 100644 --- a/win32/OpenERPServerService.py +++ b/win32/OpenERPServerService.py @@ -34,10 +34,10 @@ import thread class OpenERPServerService(win32serviceutil.ServiceFramework): # required info - _svc_name_ = "openerp-service" - _svc_display_name_ = "OpenERP Server" + _svc_name_ = "openerp-server-6.0" + _svc_display_name_ = "OpenERP Server 6.0" # optionnal info - _svc_description_ = "OpenERP Server service" + _svc_description_ = "OpenERP Server 6.0 service" def __init__(self, args): win32serviceutil.ServiceFramework.__init__(self, args) diff --git a/win32/start.bat b/win32/start.bat index 67e580e9fb9..c6b78835900 100644 --- a/win32/start.bat +++ b/win32/start.bat @@ -1,7 +1,7 @@ @PATH=%WINDIR%\system32;%WINDIR%;%WINDIR%\System32\Wbem;. -@net stop openerp-service +@net stop openerp-server-6.0 -@net start openerp-service +@net start openerp-server-6.0 cls diff --git a/win32/stop.bat b/win32/stop.bat index c7dd4b79dc1..7d6d41ecf87 100644 --- a/win32/stop.bat +++ b/win32/stop.bat @@ -1,5 +1,5 @@ @PATH=%WINDIR%\system32;%WINDIR%;%WINDIR%\System32\Wbem;. -@net stop openerp-service +@net stop openerp-server-6.0 cls From 086b9fd0286fc71f16974dc2ad173948b215fbbb Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Wed, 29 Dec 2010 12:52:33 +0100 Subject: [PATCH 10/13] [REF] Add the uuid library in the dependencies and remove the commented code bzr revid: stephane@openerp.com-20101229115233-rhr4ika4611kikue --- setup.py | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/setup.py b/setup.py index 894c7f7c11e..4a686ebfe15 100755 --- a/setup.py +++ b/setup.py @@ -33,7 +33,7 @@ import glob from pprint import pprint as pp -from setuptools import setup as official_setup, find_packages +from setuptools import setup, find_packages from setuptools.command.install import install from distutils.sysconfig import get_python_lib @@ -169,21 +169,18 @@ options = { "optimize": 2, "dist_dir": 'dist', "packages": [ - "lxml", "lxml.builder", "lxml._elementpath", "lxml.etree", - "lxml.objectify", "decimal", "xml", "xml", "xml.dom", "xml.xpath", - "encodings", "dateutil", "wizard", "pychart", "PIL", "pyparsing", - "pydot", "asyncore","asynchat", "reportlab", "vobject", - "HTMLParser", "select", "mako", "poplib", - "imaplib", "smtplib", "email", "yaml", "DAV", - ], + "lxml", "lxml.builder", "lxml._elementpath", "lxml.etree", + "lxml.objectify", "decimal", "xml", "xml", "xml.dom", "xml.xpath", + "encodings", "dateutil", "wizard", "pychart", "PIL", "pyparsing", + "pydot", "asyncore","asynchat", "reportlab", "vobject", + "HTMLParser", "select", "mako", "poplib", + "imaplib", "smtplib", "email", "yaml", "DAV", + "uuid", + ], "excludes" : ["Tkconstants","Tkinter","tcl"], } } -def setup(**kwargs): - #pp(kwargs) - return official_setup(**kwargs) - setup(name = name, version = version, description = description, @@ -225,13 +222,8 @@ setup(name = name, 'reportlab', 'caldav', 'pyyaml', - #'django', 'pywebdav' - #'cx_Oracle', - #'mysqldb', 'feedparser', - #'bsddb3', - 'egenix-mx-base' ], extras_require={ 'SSL' : ['pyopenssl'], From 1bdf60d4e3a201680dfbd8b52d0f1331d3b4765c Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Wed, 29 Dec 2010 12:52:42 +0100 Subject: [PATCH 11/13] [REF] Detect if there is an installation of PostgreSQL and propose a screen for the configuration bzr revid: stephane@openerp.com-20101229115242-uwj3z0z01lz5o3vs --- setup.nsi | 657 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 391 insertions(+), 266 deletions(-) diff --git a/setup.nsi b/setup.nsi index 89d308723e9..0aa0687b3c0 100644 --- a/setup.nsi +++ b/setup.nsi @@ -1,266 +1,391 @@ -############################################################################## -# -# Copyright (c) 2004-2008 Tiny SPRL (http://tiny.be) All Rights Reserved. -# -# 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 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, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -############################################################################### -!ifndef VERSION - !error "Do not forget to specify the version of OpenERP - /DVERSION=" -!endif - -!include "MUI.nsh" - -;-------------------------------- -;General - -;Name and file -Name "OpenERP Server" -OutFile "openerp-server-setup-${VERSION}.exe" -SetCompressor lzma -SetCompress auto - -;Default installation folder -InstallDir "$PROGRAMFILES\OpenERP Server" - -;Get installation folder from registry if available -InstallDirRegKey HKLM "Software\OpenERP Server" "" - -BrandingText "OpenERP Server ${VERSION}" - -;Vista redirects $SMPROGRAMS to all users without this -RequestExecutionLevel admin - -;-------------------------------- -;Variables - -Var MUI_TEMP -Var STARTMENU_FOLDER - -;-------------------------------- -;Interface Settings - -!define MUI_ABORTWARNING - -!define REGKEY "SOFTWARE\$(^Name)" -!define MUI_LANGDLL_REGISTRY_ROOT HKLM -!define MUI_LANGDLL_REGISTRY_KEY ${REGKEY} -!define MUI_LANGDLL_REGISTRY_VALUENAME InstallerLanguage - -!insertmacro MUI_RESERVEFILE_LANGDLL -;-------------------------------- -;Pages - -!define MUI_ICON ".\pixmaps\openerp-icon.ico" -!define MUI_WELCOMEFINISHPAGE_BITMAP ".\pixmaps\openerp-intro.bmp" -!define MUI_UNWELCOMEFINISHPAGE_BITMAP ".\pixmaps\openerp-intro.bmp" -!define MUI_HEADERIMAGE -!define MUI_HEADERIMAGE_BITMAP_NOSTRETCH -!define MUI_HEADER_TRANSPARENT_TEXT "" -!define MUI_HEADERIMAGE_BITMAP ".\pixmaps\openerp-slogan.bmp" -!define MUI_LICENSEPAGE_TEXT_BOTTOM "$(LicenseText)" -!define MUI_LICENSEPAGE_BUTTON "$(LicenseNext)" - -!insertmacro MUI_PAGE_WELCOME -!insertmacro MUI_PAGE_LICENSE "doc\License.rtf" -!insertmacro MUI_PAGE_DIRECTORY - -;Start Menu Folder Page Configuration -!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM" -!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\OpenERP Server" -!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "OpenERP Server" - -!insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER - -!insertmacro MUI_PAGE_INSTFILES - -!define MUI_FINISHPAGE_NOAUTOCLOSE -!define MUI_FINISHPAGE_RUN -!define MUI_FINISHPAGE_RUN_CHECKED -!define MUI_FINISHPAGE_RUN_TEXT "$(FinishPageText)" -!define MUI_FINISHPAGE_RUN_FUNCTION "LaunchLink" -!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED -!define MUI_FINISHPAGE_SHOWREADME $INSTDIR\README.txt -!insertmacro MUI_PAGE_FINISH - - -!insertmacro MUI_UNPAGE_WELCOME -!insertmacro MUI_UNPAGE_CONFIRM -!insertmacro MUI_UNPAGE_INSTFILES - -;-------------------------------- -;Languages - -!insertmacro MUI_LANGUAGE "English" -!insertmacro MUI_LANGUAGE "French" - -!macro CreateInternetShortcut FILENAME URL - WriteINIStr "${FILENAME}.url" "InternetShortcut" "URL" "${URL}" -!macroend - -;-------------------------------- -;Installer Sections -Function .onInit -!ifndef ALLINONE - ;Language selection dialog - Push "" - Push ${LANG_ENGLISH} - Push English - Push ${LANG_FRENCH} - Push French - Push A ; A means auto count languages - ; for the auto count to work the first empty push (Push "") must remain - LangDLL::LangDialog "Installer Language" "Please select the language of the installer" - - Pop $LANGUAGE - StrCmp $LANGUAGE "cancel" 0 +2 - Abort -!endif - - ClearErrors - ReadRegStr $0 HKLM "Software\OpenERP Server" "" - IfErrors DoInstall 0 - MessageBox MB_OK "$(CannotInstallServerText)" - Quit - DoInstall: -FunctionEnd - -Section "OpenERP Server" SecOpenERPServer - nsExec::Exec "net stop openerp-service" - sleep 2 - - SetOutPath "$INSTDIR" - - ;ADD YOUR OWN FILES HERE... - File /r "dist\*" - - SetOutPath "$INSTDIR\service" - File /r "win32\dist\*" - File "win32\start.bat" - File "win32\stop.bat" - - ;Store installation folder - WriteRegStr HKLM "Software\OpenERP Server" "" $INSTDIR - -!ifndef ALLINONE - ;Create uninstaller - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenERP Server" "DisplayName" "OpenERP Server ${VERSION}" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenERP Server" "UninstallString" "$INSTDIR\Uninstall.exe" -!else - WriteRegStr HKLM "Software\OpenERP AllInOne" "UninstallServer" "$INSTDIR\Uninstall.exe" -!endif - WriteUninstaller "$INSTDIR\Uninstall.exe" - - !insertmacro MUI_STARTMENU_WRITE_BEGIN Application - ;Create shortcuts - CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER" - CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\OpenERP Server.lnk" "$INSTDIR\openerp-server.exe" - CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Start service.lnk" "$INSTDIR\service\start.bat" - CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Stop service.lnk" "$INSTDIR\service\stop.bat" - CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Edit config.lnk" "notepad.exe" "$INSTDIR\openerp-server.conf" - CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\View log.lnk" "notepad.exe" "$INSTDIR\openerp-server.log" -!ifndef ALLINONE - CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\uninstall.exe" -!endif - !insertmacro CreateInternetShortcut "$SMPROGRAMS\$STARTMENU_FOLDER\Forum" "http://www.openerp.com/forum" - !insertmacro CreateInternetShortcut "$SMPROGRAMS\$STARTMENU_FOLDER\Translation" "https://translations.launchpad.net/openobject" - !insertmacro MUI_STARTMENU_WRITE_END - - nsExec::Exec '"$INSTDIR\openerp-server.exe" --stop-after-init --logfile "$INSTDIR\openerp-server.log" -s' - nsExec::Exec '"$INSTDIR\service\OpenERPServerService.exe" -auto -install' - -SectionEnd - -;Descriptions - - -;-------------------------------- -;Uninstaller Section - -Section "Uninstall" - nsExec::Exec "net stop openerp-service" - sleep 2 - nsExec::Exec '"$INSTDIR\service\OpenERPServerService.exe" -remove' - sleep 2 - - RMDIR /r "$INSTDIR" - !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP - - Delete "$SMPROGRAMS\$MUI_TEMP\Forum.url" - Delete "$SMPROGRAMS\$MUI_TEMP\Translation.url" -!ifndef ALLINONE - Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk" -!endif - Delete "$SMPROGRAMS\$MUI_TEMP\OpenERP Server.lnk" - Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk" - Delete "$SMPROGRAMS\$MUI_TEMP\Start service.lnk" - Delete "$SMPROGRAMS\$MUI_TEMP\Stop service.lnk" - Delete "$SMPROGRAMS\$MUI_TEMP\Edit config.lnk" - Delete "$SMPROGRAMS\$MUI_TEMP\View log.lnk" - - ;Delete empty start menu parent diretories - StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP" - - startMenuDeleteLoop: - ClearErrors - RMDir $MUI_TEMP - GetFullPathName $MUI_TEMP "$MUI_TEMP\.." - - IfErrors startMenuDeleteLoopDone - - StrCmp $MUI_TEMP $SMPROGRAMS startMenuDeleteLoopDone startMenuDeleteLoop - - startMenuDeleteLoopDone: - -!ifndef ALLINONE - DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenERP Server" -!else - DeleteRegKey HKLM "Software\OpenERP AllInOne\UninstallServer" -!endif - DeleteRegKey /ifempty HKLM "Software\OpenERP Server" - -SectionEnd - -Function LaunchLink - nsExec::Exec "net start openerp-service" -FunctionEnd - -LangString LicenseText ${LANG_ENGLISH} "Usually, a proprietary license is provided with the software: limited number of users, limited in time usage, etc. This Open Source license is the opposite: it garantees you the right to use, copy, study, distribute and modify Open ERP for free." -LangString LicenseText ${LANG_FRENCH} "Normalement, une licence propriétaire est fournie avec le logiciel: limitation du nombre d'utilisateurs, limitation dans le temps, etc. Cette licence Open Source est l'opposé: Elle vous garantie le droit d'utiliser, de copier, d'étudier, de distribuer et de modifier Open ERP librement." - -LangString LicenseNext ${LANG_ENGLISH} "Next >" -LangString LicenseNext ${LANG_FRENCH} "Suivant >" - -LangString FinishPageText ${LANG_ENGLISH} "Start OpenERP Server" -LangString FinishPageText ${LANG_FRENCH} "Lancer le serveur OpenERP" - -;Language strings -LangString DESC_SecOpenERPServer ${LANG_ENGLISH} "OpenERP Server." -LangString DESC_SecOpenERPServer ${LANG_FRENCH} "Serveur OpenERP." - -LangString CannotInstallServerText ${LANG_ENGLISH} "Can not install the Open ERP Server because a previous installation already exists on this system. Please uninstall your current installation and relaunch this setup wizard." -LangString CannotInstallServerText ${LANG_FRENCH} "Ne peut pas installer le serveur Open ERP parce qu'une installation existe déjà  sur ce système. S'il vous plait, désinstallez votre installation actuelle et relancer l'installeur." - - -;Assign language strings to sections -!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN - !insertmacro MUI_DESCRIPTION_TEXT ${SecOpenERPServer} $(DESC_SecOpenERPServer) -!insertmacro MUI_FUNCTION_DESCRIPTION_END +##################################################################################### +# +# Copyright (c) 2004-TODAY OpenERP S.A. (http://www.openerp.com) All Rights Reserved. +# +# 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 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, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +##################################################################################### + +!include 'MUI2.nsh' +!include 'FileFunc.nsh' +!include 'LogicLib.nsh' +!include 'Sections.nsh' + +!define PUBLISHER 'OpenERP S.A.' +!define MAJOR_VERSION '6.0' +!define MINOR_VERSION '0.0' +!define REVISION_VERSION 'RC2-test' +!ifndef REVISION_VERSION + !define VERSION "${MAJOR_VERSION}.${MINOR_VERSION}" +!else + !define VERSION "${MAJOR_VERSION}.${MINOR_VERSION}-${REVISION_VERSION}" +!endif +!define PRODUCT_NAME "OpenERP Server" +!define DISPLAY_NAME "${PRODUCT_NAME} ${MAJOR_VERSION}" + +!define UNINSTALL_REGISTRY_ROOT HKLM +!define UNINSTALL_REGISTRY_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${DISPLAY_NAME}" + +!define REGISTRY_KEY "Software\${DISPLAY_NAME}" + +!define DEFAULT_POSTGRESQL_HOSTNAME 'localhost' +!define DEFAULT_POSTGRESQL_PORT 5432 +!define DEFAULT_POSTGRESQL_USERNAME 'openpg' +!define DEFAULT_POSTGRESQL_PASSWORD 'openpgpwd' + +Name '${DISPLAY_NAME}' +Caption "${PRODUCT_NAME} ${VERSION} Setup" +OutFile "openerp-server-setup-${VERSION}.exe" +SetCompressor /final /solid lzma +SetCompress auto +ShowInstDetails show + +XPStyle on + +InstallDir "$PROGRAMFILES\OpenERP ${MAJOR_VERSION}\Server" +InstallDirRegKey HKCU "${REGISTRY_KEY}" "" + +BrandingText '${PRODUCT_NAME} ${VERSION}' + +RequestExecutionLevel admin + +VIAddVersionKey "ProductName" "${PRODUCT_NAME}" +VIAddVersionKey "CompanyName" "${PUBLISHER}" +VIAddVersionKey "FileDescription" "Installer of ${DISPLAY_NAME}" +VIAddVersionKey "LegalCopyright" "${PUBLISHER}" +VIAddVersionKey "LegalTrademark" "OpenERP is a trademark of ${PUBLISHER}" +VIAddVersionKey "FileVersion" "${MAJOR_VERSION}" +VIProductVersion "${VERSION}" + +!insertmacro GetParameters +!insertmacro GetOptions + +Var Option_AllInOne +Var HasPostgreSQL +Var cmdLineParams + +Var TextPostgreSQLHostname +Var TextPostgreSQLPort +Var TextPostgreSQLUsername +Var TextPostgreSQLPassword + +Var HWNDPostgreSQLHostname +Var HWNDPostgreSQLPort +Var HWNDPostgreSQLUsername +Var HWNDPostgreSQLPassword + +Var MUI_TEMP +Var STARTMENU_FOLDER + +!define MUI_ABORTWARNING +!define MUI_ICON ".\pixmaps\openerp-icon.ico" + +!define MUI_WELCOMEFINISHPAGE_BITMAP ".\pixmaps\openerp-intro.bmp" +!define MUI_UNWELCOMEFINISHPAGE_BITMAP ".\pixmaps\openerp-intro.bmp" +!define MUI_HEADERIMAGE +!define MUI_HEADERIMAGE_BITMAP ".\pixmaps\openerp-slogan.bmp" +!define MUI_HEADERIMAGE_BITMAP_NOSTRETCH +!define MUI_HEADER_TRANSPARENT_TEXT "" + +!insertmacro MUI_PAGE_WELCOME +!insertmacro MUI_PAGE_LICENSE "doc\License.rtf" +!define MUI_COMPONENTSPAGE_SMALLDESC +!insertmacro MUI_PAGE_DIRECTORY +Page Custom ShowPostgreSQL LeavePostgreSQL + +!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM" +!define MUI_STARTMENUPAGE_REGISTRY_KEY "${REGISTRY_KEY}" +!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${DISPLAY_NAME}" + +!insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER +!insertmacro MUI_PAGE_INSTFILES + +!define MUI_FINISHPAGE_NOAUTOCLOSE +!define MUI_FINISHPAGE_LINK $(DESC_FinishPage_Link) +!define MUI_FINISHPAGE_LINK_LOCATION "http://www.openerp.com/contact" +!insertmacro MUI_PAGE_FINISH + +!insertmacro MUI_UNPAGE_WELCOME +!insertmacro MUI_UNPAGE_CONFIRM +!insertmacro MUI_UNPAGE_INSTFILES +!insertmacro MUI_UNPAGE_FINISH + +!insertmacro MUI_LANGUAGE "English" +!insertmacro MUI_LANGUAGE "French" +!insertmacro MUI_RESERVEFILE_LANGDLL + +!macro CreateInternetShortcut FILENAME URL + WriteINIStr "${FILENAME}.url" "InternetShortcut" "URL" "${URL}" +!macroend + +; English +LangString DESC_FinishPage_Link ${LANG_ENGLISH} "Contact OpenERP for Partnership and/or Support" +LangString WARNING_HostNameIsEmpty ${LANG_ENGLISH} "The hostname for the connection to the PostgreSQL Server is empty" +LangString WARNING_UserNameIsEmpty ${LANG_ENGLISH} "The username for the connection to the PostgreSQL Server is empty" +LangString WARNING_PasswordIsEmpty ${LANG_ENGLISH} "The password for the connection to the PostgreSQL Server is empty" +LangString WARNING_PortIsWrong ${LANG_ENGLISH} "The port for the connexion to the PostgreSQL Server is wrong (default: 5432)" +LangString DESC_PostgreSQLPage ${LANG_ENGLISH} "Configure the information for the PostgreSQL connection" +LangString DESC_PostgreSQL_Hostname ${LANG_ENGLISH} "Hostname" +LangString DESC_PostgreSQL_Port ${LANG_ENGLISH} "Port" +LangString DESC_PostgreSQL_Username ${LANG_ENGLISH} "Username" +LangString DESC_PostgreSQL_Password ${LANG_ENGLISH} "Password" + + +; French +LangString DESC_FinishPage_Link ${LANG_FRENCH} "Contactez OpenERP pour un Partenariat et/ou du Support" +LangString WARNING_HostNameIsEmpty ${LANG_FRENCH} "L'adresse pour la connection au serveur PostgreSQL est vide" +LangString WARNING_UserNameIsEmpty ${LANG_FRENCH} "Le nom d'utilisateur pour la connection au serveur PostgreSQL est vide" +LangString WARNING_PasswordIsEmpty ${LANG_FRENCH} "Le mot de passe pour la connection au serveur PostgreSQL est vide" +LangString WARNING_PortIsWrong ${LANG_FRENCH} "Le port pour la connection au serveur PostgreSQL est erroné (défaut: 5432)" +LangString DESC_PostgreSQLPage ${LANG_FRENCH} "Configurez les informations de connection pour le serveur PostgreSQL" +LangString DESC_PostgreSQL_Hostname ${LANG_FRENCH} "Hôte" +LangString DESC_PostgreSQL_Port ${LANG_FRENCH} "Port" +LangString DESC_PostgreSQL_Username ${LANG_FRENCH} "Utilisateur" +LangString DESC_PostgreSQL_Password ${LANG_FRENCH} "Mot de passe" + +Section -StopService + nsExec::Exec "net stop openerp-server-6.0" + sleep 2 +SectionEnd + +Section OpenERP_Server SectionOpenERP_Server + SetOutPath '$INSTDIR' + + File /r "dist\*" + + SetOutPath "$INSTDIR\service" + File /r "win32\dist\*" + File "win32\start.bat" + File "win32\stop.bat" + + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + ;Create shortcuts + CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER" + CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\OpenERP Server.lnk" "$INSTDIR\openerp-server.exe" + CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Start service.lnk" "$INSTDIR\service\start.bat" + CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Stop service.lnk" "$INSTDIR\service\stop.bat" + CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Edit config.lnk" "notepad.exe" "$INSTDIR\openerp-server.conf" + CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\View log.lnk" "notepad.exe" "$INSTDIR\openerp-server.log" + CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\uninstall.exe" + !insertmacro CreateInternetShortcut "$SMPROGRAMS\$STARTMENU_FOLDER\Forum" "http://www.openerp.com/forum" + !insertmacro CreateInternetShortcut "$SMPROGRAMS\$STARTMENU_FOLDER\Translation" "https://translations.launchpad.net/openobject" + !insertmacro MUI_STARTMENU_WRITE_END + + + FileOpen $9 '$INSTDIR\install.log' w + FileWrite $9 "Hostname $TextPostgreSQLHostname$\r$\n" + FileWrite $9 "Port $TextPostgreSQLPort$\r$\n" + FileWrite $9 "Username $TextPostgreSQLUsername$\r$\n" + FileWrite $9 "Password $TextPostgreSQLPassword$\r$\n" + FileClose $9 + +# If there is a previous install of the OpenERP Server, keep the login/password from the config file + WriteIniStr "$INSTDIR\openerp-server.conf" "options" "db_host" $TextPostgreSQLHostname + WriteIniStr "$INSTDIR\openerp-server.conf" "options" "db_user" $TextPostgreSQLUsername + WriteIniStr "$INSTDIR\openerp-server.conf" "options" "db_password" $TextPostgreSQLPassword + WriteIniStr "$INSTDIR\openerp-server.conf" "options" "db_port" $TextPostgreSQLPort + + nsExec::Exec '"$INSTDIR\openerp-server.exe" --stop-after-init --logfile "$INSTDIR\openerp-server.log" -s' + nsExec::Exec '"$INSTDIR\service\OpenERPServerService.exe" -auto -install' +SectionEnd + +Section -RestartServer + nsExec::Exec "net start openerp-server-6.0" + sleep 2 +SectionEnd + +Section -Post + WriteRegExpandStr HKLM "${UNINSTALL_REGISTRY_KEY}" "UninstallString" "$INSTDIR\Uninstall.exe" + WriteRegExpandStr HKLM "${UNINSTALL_REGISTRY_KEY}" "InstallLocation" "$INSTDIR" + WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "DisplayName" "${DISPLAY_NAME}" + WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "DisplayVersion" "${MAJOR_VERSION}" + WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "Publisher" "${PUBLISHER}" + WriteRegDWORD HKLM "${UNINSTALL_REGISTRY_KEY}" "Version" "${VERSION}" + WriteRegDWORD HKLM "${UNINSTALL_REGISTRY_KEY}" "VersionMajor" "${MAJOR_VERSION}" + WriteRegDWORD HKLM "${UNINSTALL_REGISTRY_KEY}" "VersionMinor" "${MINOR_VERSION}" + WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "HelpLink" "support@openerp.com" + WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "HelpTelephone" "+32.81.81.37.00" + WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "URLInfoAbout" "http://www.openerp.com" + WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "Contact" "sales@openerp.com" + WriteRegDWORD HKLM "${UNINSTALL_REGISTRY_KEY}" "NoModify" "1" + WriteRegDWORD HKLM "${UNINSTALL_REGISTRY_KEY}" "NoRepair" "1" + WriteUninstaller "$INSTDIR\Uninstall.exe" +SectionEnd + +Section "Uninstall" + ; Stop the NT Service + nsExec::Exec "net stop openerp-server-6.0" + sleep 2 + + ; Uninstall the OpenERP Service + nsExec::Exec '"$INSTDIR\service\OpenERPServerService.exe" -remove' + sleep 2 + + Rmdir /r "$INSTDIR" + + !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP + + Delete "$SMPROGRAMS\$MUI_TEMP\Forum.url" + Delete "$SMPROGRAMS\$MUI_TEMP\Translation.url" + Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk" + Delete "$SMPROGRAMS\$MUI_TEMP\OpenERP Server.lnk" + Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk" + Delete "$SMPROGRAMS\$MUI_TEMP\Start service.lnk" + Delete "$SMPROGRAMS\$MUI_TEMP\Stop service.lnk" + Delete "$SMPROGRAMS\$MUI_TEMP\Edit config.lnk" + Delete "$SMPROGRAMS\$MUI_TEMP\View log.lnk" + ; + ;Delete empty start menu parent diretories + StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP" + + startMenuDeleteLoop: + ClearErrors + RMDir $MUI_TEMP + GetFullPathName $MUI_TEMP "$MUI_TEMP\.." + + IfErrors startMenuDeleteLoopDone + + StrCmp $MUI_TEMP $SMPROGRAMS startMenuDeleteLoopDone startMenuDeleteLoop + + startMenuDeleteLoopDone: + + ; Clean the Registry + DeleteRegKey HKLM "${UNINSTALL_REGISTRY_KEY}" +SectionEnd + +Function .onInit + Push $R0 + + ${GetParameters} $cmdLineParams + ClearErrors + + Pop $R0 + + StrCpy $Option_AllInOne 0 + StrCpy $HasPostgreSQL 0 + + StrCpy $TextPostgreSQLHostname ${DEFAULT_POSTGRESQL_HOSTNAME} + StrCpy $TextPostgreSQLPort ${DEFAULT_POSTGRESQL_PORT} + StrCpy $TextPostgreSQLUsername ${DEFAULT_POSTGRESQL_USERNAME} + StrCpy $TextPostgreSQLPassword ${DEFAULT_POSTGRESQL_PASSWORD} + + Push $R0 + ${GetOptions} $cmdLineParams '/allinone' $R0 + IfErrors +2 0 + StrCpy $Option_AllInOne 1 + Pop $R0 + + StrCmp $Option_AllInOne 1 AllInOneMode + StrCmp $Option_AllInOne 0 NoAllInOneMode + + AllInOneMode: + MessageBox MB_OK|MB_ICONINFORMATION "All In One" + + NoAllInOneMode: + + !insertmacro MUI_LANGDLL_DISPLAY + + ClearErrors + EnumRegKey $0 HKLM "SOFTWARE\PostgreSQL" 0 + IfErrors DoInstallPostgreSQL 0 + StrCpy $HasPostgreSQL 1 + + DoInstallPostgreSQL: +FunctionEnd + +Function PostgreSQLOnBack +FunctionEnd + +Function ShowPostgreSQL + SectionGetFlags ${SectionOpenERP_Server} $0 + IntOp $0 $0 & ${SF_SELECTED} + IntCmp $0 ${SF_SELECTED} LaunchPostgreSQLConfiguration + Abort + LaunchPostgreSQLConfiguration: + + nsDialogs::Create /NOUNLOAD 1018 + Pop $0 + + ${If} $0 == error + Abort + ${EndIf} + + GetFunctionAddress $0 PostgreSQLOnBack + nsDialogs::OnBack $0 + + ${NSD_CreateLabel} 0 0 100% 10u $(DESC_PostgreSQLPage) + Pop $0 + + ${NSD_CreateLabel} 0 45 60u 12u $(DESC_PostgreSQL_Hostname) + Pop $0 + ${NSD_CreateText} 100 45 150u 12u $TextPostgreSQLHostname + Pop $HWNDPostgreSQLHostname + + ${NSD_CreateLabel} 0 75 60u 12u $(DESC_PostgreSQL_Port) + Pop $0 + ${NSD_CreateNumber} 100 75 150u 12u $TextPostgreSQLPort + Pop $HWNDPostgreSQLPort + ${NSD_CreateLabel} 0 105 60u 12u $(DESC_PostgreSQL_Username) + Pop $0 + ${NSD_CreateText} 100 105 150u 12u $TextPostgreSQLUsername + Pop $HWNDPostgreSQLUsername + ${NSD_CreateLabel} 0 135 60u 12u $(DESC_PostgreSQL_Password) + Pop $0 + ${NSD_CreateText} 100 135 150u 12u $TextPostgreSQLPassword + Pop $HWNDPostgreSQLPassword + + nsDialogs::Show +FunctionEnd + +Function LeavePostgreSQL + # Before to leave the PostgreSQL configuration screen, we check the values + # from the inputs, to be sure we have the right values + + ${NSD_GetText} $HWNDPostgreSQLHostname $TextPostgreSQLHostname + ${NSD_GetText} $HWNDPostgreSQLPort $TextPostgreSQLPort + ${NSD_GetText} $HWNDPostgreSQLUsername $TextPostgreSQLUsername + ${NSD_GetText} $HWNDPostgreSQLPassword $TextPostgreSQLPassword + + StrLen $1 $TextPostgreSQLHostname + ${If} $1 == 0 + MessageBox MB_ICONEXCLAMATION|MB_OK $(WARNING_HostNameIsEmpty) + Abort + ${EndIf} + + ${If} $TextPostgreSQLPort <= 0 + ${OrIf} $TextPostgreSQLPort > 65535 + MessageBox MB_ICONEXCLAMATION|MB_OK $(WARNING_PortIsWrong) + Abort + ${EndIf} + + StrLen $1 $TextPostgreSQLUsername + ${If} $1 == 0 + MessageBox MB_ICONEXCLAMATION|MB_OK $(WARNING_UserNameIsEmpty) + Abort + ${EndIf} + + StrLen $1 $TextPostgreSQLPassword + ${If} $1 == 0 + MessageBox MB_ICONEXCLAMATION|MB_OK $(WARNING_PasswordIsEmpty) + Abort + ${EndIf} +FunctionEnd + From 1034c64f794a4b26d4a57a7af8620d0a4c695089 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Wed, 29 Dec 2010 12:54:14 +0100 Subject: [PATCH 12/13] [IMP] pad: changed button style bzr revid: fme@openerp.com-20101229115414-okrqk9n4j54zeglk --- addons/pad/web/editors.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/addons/pad/web/editors.py b/addons/pad/web/editors.py index 689ec48ed1a..b954967497c 100644 --- a/addons/pad/web/editors.py +++ b/addons/pad/web/editors.py @@ -13,9 +13,8 @@ class SidebarTemplateEditor(openobject.templating.TemplateEditor): '\n', output.index(self.ADD_ATTACHMENT_BUTTON)) + 1 output = output[:form_opener_insertion] + \ - '''${_("Pad")}\n''' + \ + '''${_(" Add pad")}\n''' + \ output[form_opener_insertion:] return output From 97f03cf5c25a40cec423077c8ab0ffb189afb9c6 Mon Sep 17 00:00:00 2001 From: "Harry (OpenERP)" Date: Wed, 29 Dec 2010 17:35:59 +0530 Subject: [PATCH 13/13] [FIX] mrp,sale_mrp,stock_location: security bzr revid: hmo@tinyerp.com-20101229120559-z1wxdm5r2nakfivg --- addons/mrp/security/ir.model.access.csv | 2 -- addons/sale_mrp/security/ir.model.access.csv | 2 ++ addons/stock_location/security/ir.model.access.csv | 4 ---- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/addons/mrp/security/ir.model.access.csv b/addons/mrp/security/ir.model.access.csv index b001c722fef..21897629117 100644 --- a/addons/mrp/security/ir.model.access.csv +++ b/addons/mrp/security/ir.model.access.csv @@ -92,5 +92,3 @@ "access_account_account_mrp_manager","account.account mrp manager","account.model_account_account","mrp.group_mrp_manager",1,0,0,0 "access_account_journal_mrp_manager","account.journal mrp manager","account.model_account_journal","mrp.group_mrp_manager",1,0,0,0 "access_stock_location_mrp_manager","stock.location product mrp manager","stock.model_stock_location","mrp.group_mrp_manager",1,0,0,0 -"access_sale_order_manufacturing_user","sale.order manufacturing.user","sale.model_sale_order","mrp.group_mrp_user",1,1,0,0 -"access_sale_order_line_manufacturing_user","sale.order.line manufacturing.user","sale.model_sale_order_line","mrp.group_mrp_user",1,1,0,0 diff --git a/addons/sale_mrp/security/ir.model.access.csv b/addons/sale_mrp/security/ir.model.access.csv index 90ff5ac06e2..a504c9a9e5a 100644 --- a/addons/sale_mrp/security/ir.model.access.csv +++ b/addons/sale_mrp/security/ir.model.access.csv @@ -1,3 +1,5 @@ "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" "access_mrp_bom_user","mrp.bom","mrp.model_mrp_bom","base.group_sale_salesman",1,0,0,0 "access_mrp_bom_manager","mrp.bom","mrp.model_mrp_bom","base.group_sale_manager",1,0,0,0 +"access_sale_order_manufacturing_user","sale.order manufacturing.user","sale.model_sale_order","mrp.group_mrp_user",1,1,0,0 +"access_sale_order_line_manufacturing_user","sale.order.line manufacturing.user","sale.model_sale_order_line","mrp.group_mrp_user",1,1,0,0 diff --git a/addons/stock_location/security/ir.model.access.csv b/addons/stock_location/security/ir.model.access.csv index a50f18a493c..09773a66893 100644 --- a/addons/stock_location/security/ir.model.access.csv +++ b/addons/stock_location/security/ir.model.access.csv @@ -2,16 +2,12 @@ "access_product_pulled_flow_user","product_pulled_flow user","model_product_pulled_flow","stock.group_stock_user",1,0,0,0 "access_product_pulled_flow_manager","product_pulled_flow manager","model_product_pulled_flow","stock.group_stock_manager",1,1,1,1 "access_product_pulled_flow_salemanager","product_pulled_flow salemanager","model_product_pulled_flow","base.group_sale_manager",1,1,1,1 -"access_product_pulled_flow_purchase_manager","product_pulled_flow purchase manager","model_product_pulled_flow","purchase.group_purchase_manager",1,1,1,1 "access_product_pulled_flow_stock_manager","product_pulled_flow stock manager","model_product_pulled_flow","stock.group_stock_manager",1,1,1,1 -"access_product_pulled_flow_mrp_manager","product_pulled_flow mrp manager","model_product_pulled_flow","mrp.group_mrp_manager",1,1,1,1 "access_stock_location_path_user","stock location path user","model_stock_location_path","stock.group_stock_user",1,0,0,0 "access_stock_location_path_internal_user","stock location path internal user","model_stock_location_path","base.group_user",1,0,0,0 "access_stock_location_path_manager","stock location path manager","model_stock_location_path","stock.group_stock_manager",1,1,1,1 "access_stock_location_path_sale_manager","stock.location.path partner salemanager","model_stock_location_path","base.group_sale_manager",1,1,1,1 -"access_stock_location_path_purchase_manager","stock.location.path purchase manager","model_stock_location_path","purchase.group_purchase_manager",1,1,1,1 "access_stock_location_path_stock_manager","stock.location.path stock manager","model_stock_location_path","stock.group_stock_manager",1,1,1,1 -"access_stock_location_path_mrp_manager","stock.location.path mrp manager","model_stock_location_path","mrp.group_mrp_manager",1,1,1,1 "access_stock_location_path_stock_user","stock.location.path stock user","model_stock_location_path","stock.group_stock_user",1,1,1,1 "access_stock_location_path","stock.location.path","model_stock_location_path","base.group_sale_salesman",1,0,0,0 "access_product_pulled_flow","product.pulled.flow","model_product_pulled_flow","base.group_sale_salesman",1,0,0,0