From 5e962936f204f6e37fb27bb52c9a1ffae3fdb9a0 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Mon, 23 Apr 2007 19:59:02 +0000 Subject: [PATCH] Skeleton for the new module: base_module_publish Better descriptions on __terp__.py files bzr revid: fp@tinyerp.com-b711aae5cacf92476f0e97a0c90153084c913590 --- addons/base_module_publish/__init__.py | 29 +++ addons/base_module_publish/__terp__.py | 24 +++ .../base_module_publish_wizard.xml | 10 + addons/base_module_publish/wizard/__init__.py | 29 +++ .../wizard/base_module_publish.py | 187 ++++++++++++++++++ addons/base_setup/__terp__.py | 14 +- addons/crm/crm.py | 2 +- addons/network/__terp__.py | 8 +- addons/product/__terp__.py | 16 +- addons/sale/__terp__.py | 15 +- 10 files changed, 325 insertions(+), 9 deletions(-) create mode 100644 addons/base_module_publish/__init__.py create mode 100644 addons/base_module_publish/__terp__.py create mode 100644 addons/base_module_publish/base_module_publish_wizard.xml create mode 100644 addons/base_module_publish/wizard/__init__.py create mode 100644 addons/base_module_publish/wizard/base_module_publish.py diff --git a/addons/base_module_publish/__init__.py b/addons/base_module_publish/__init__.py new file mode 100644 index 00000000000..cf8c8bc6020 --- /dev/null +++ b/addons/base_module_publish/__init__.py @@ -0,0 +1,29 @@ +############################################################################## +# +# Copyright (c) 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. +# +############################################################################## + +import wizard diff --git a/addons/base_module_publish/__terp__.py b/addons/base_module_publish/__terp__.py new file mode 100644 index 00000000000..adb9d554de9 --- /dev/null +++ b/addons/base_module_publish/__terp__.py @@ -0,0 +1,24 @@ +{ + "name" : "Module publisher", + "version" : "1.0", + "author" : "Tiny", + "website" : "http://tinyerp.com", + "category" : "Generic Modules/Base", + "description": """ + This module can be used by developpers to automatically publish their modules + in a few click to the following websites: + * http://TinyERP.com, section module + * http://TinyForge.org + * PyPi, The python offical repository + * http://Freshmeat.net + + It adds a button "Publish module" on each module, so that you simply have + to call this button when you want to release a new version of your module. + """, + "depends" : ["base"], + "init_xml" : [ ], + "demo_xml" : [ ], + "update_xml" : [ "base_module_publish_wizard.xml" ], + "active": True, + "installable": True +} diff --git a/addons/base_module_publish/base_module_publish_wizard.xml b/addons/base_module_publish/base_module_publish_wizard.xml new file mode 100644 index 00000000000..1985280d577 --- /dev/null +++ b/addons/base_module_publish/base_module_publish_wizard.xml @@ -0,0 +1,10 @@ + + + + + + diff --git a/addons/base_module_publish/wizard/__init__.py b/addons/base_module_publish/wizard/__init__.py new file mode 100644 index 00000000000..fb8d0d81201 --- /dev/null +++ b/addons/base_module_publish/wizard/__init__.py @@ -0,0 +1,29 @@ +############################################################################## +# +# Copyright (c) 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. +# +############################################################################## + +import base_module_publish diff --git a/addons/base_module_publish/wizard/base_module_publish.py b/addons/base_module_publish/wizard/base_module_publish.py new file mode 100644 index 00000000000..ebfca9152ca --- /dev/null +++ b/addons/base_module_publish/wizard/base_module_publish.py @@ -0,0 +1,187 @@ +############################################################################## +# +# Copyright (c) 2005-2006 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 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. +# +############################################################################## + +import time +import wizard +import osv +import pooler + +intro_form = ''' +
+ + +''' + +intro_fields = { + 'text': {'string':'Introduction', 'type':'text', 'readonly':True, 'default': lambda *args: """ +This system will automatically publish the selected module to the +Tiny ERP official website. You can use it to quickly publish a new +module or update an existing one (new version). + +Make sure you read the publication manual and modules guidelines +before continuing: + http://tinyerp.com + +Thank you for contributing ! +"""}, +} + +check_form = ''' +
+ + + + + + + +''' + +check_fields = { + 'name': {'string':'Name', 'type':'char', 'size':64, 'readonly':True}, + 'shortdesc': {'string':'Small description', 'type':'char', 'size':200, 'readonly':True}, + 'author': {'string':'Author', 'type':'char', 'size':128, 'readonly':True}, + 'website': {'string':'Website', 'type':'char', 'size':200, 'readonly':True}, + 'url': {'string':'Download URL', 'type':'char', 'size':200, 'readonly':True}, + 'description': {'string':'Description', 'type':'text', 'readonly':True}, + 'version': {'string':'Version', 'type':'char', 'readonly':True}, +} + + +upload_info_form = ''' +
+ +