Skeleton for the new module: base_module_publish

Better descriptions on __terp__.py files

bzr revid: fp@tinyerp.com-b711aae5cacf92476f0e97a0c90153084c913590
This commit is contained in:
Fabien Pinckaers
2007-04-23 19:59:02 +00:00
parent ac97b14a7f
commit 5e962936f2
10 changed files with 325 additions and 9 deletions
+29
View File
@@ -0,0 +1,29 @@
##############################################################################
#
# Copyright (c) 2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
# Fabien Pinckaers <fp@tiny.Be>
#
# 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
+24
View File
@@ -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
}
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<terp>
<data>
<wizard
id="wizard_base_module_publish"
string="Publish your module"
model="ir.module.module"
name="base_module_publish.module_publish"/>
</data>
</terp>
@@ -0,0 +1,29 @@
##############################################################################
#
# Copyright (c) 2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
# Fabien Pinckaers <fp@tiny.Be>
#
# 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
@@ -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 = '''<?xml version="1.0"?>
<form string="Module publication">
<separator string="Publication information" colspan="4"/>
<field name="text" colspan="4" nolabel="1"/>
</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 = '''<?xml version="1.0"?>
<form string="Module publication">
<separator string="Verify your module information" colspan="4"/>
<field name="name"/>
<field name="version"/>
<field name="author"/>
<field name="website" widget="url"/>
<field name="shortdesc" colspan="3"/>
<field name="description" colspan="3"/>
</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 = '''<?xml version="1.0"?>
<form string="Module publication">
<separator string="User information" colspan="4"/>
<label align="0.0" string="Please provide here your login on the Tiny ERP website." colspan="4"/>
<label align="0.0" string="If you don't have an access, you can create one online." colspan="4"/>
<field name="login"/>
<newline/>
<field name="password"/>
<separator string="Module information" colspan="4"/>
<field name="category"/>
<field name="licence"/>
<field name="url_download"/>
<label align="0.0" colspan="2" string="(Keep empty for an auto upload of the module)"/>
</form>'''
upload_info_fields = {
'login': {'string':'Login', 'type':'char', 'size':32, 'required':True},
'password': {'string':'Password', 'type':'char', 'size':32, 'required':True},
'category': {'string':'Category', 'type':'selection', 'size':64, 'required':True,
'selection': [(0, 'Selection 1'), (1,'Selcetion 2')]
},
'licence': {
'string':'Licence', 'type':'selection', 'size':64, 'required':True,
'selection': [('GPL', 'GPL'), ('Other proprietary','Other proprietary')],
'default': lambda *args: 'GPL'
},
'url_download': {'string':'Download URL', 'type':'char', 'size':128},
}
end_form = '''<?xml version="1.0"?>
<form string="Module publication">
<separator string="Publication result" colspan="4"/>
<field name="text_end" colspan="4" nolabel="1"/>
</form>'''
end_fields = {
'text_end': {'string':'Summary', 'type':'text', 'readonly':True, 'default': lambda *args: """
Thank you for contributing !
Your module has been successfully uploaded to the official website.
You must wait a few hours/days so that the Tiny ERP core team review
your module for approval on the website.
"""},
}
def module_check(self, cr, uid, data, context):
pool = pooler.get_pool(cr.dbname)
module = pool.get('ir.module.module').browse(cr, uid, data['id'], context)
return {
'name': module.name,
'shortdesc': module.shortdesc,
'author': module.author,
'website': module.website,
'url': module.url,
'description': module.description,
'version': module.latest_version
}
class base_module_publish(wizard.interface):
states = {
'init': {
'actions': [],
'result': {
'type':'form',
'arch':intro_form,
'fields':intro_fields,
'state':[
('end','Cancel'),
('step1','Continue')
]
}
},
'step1': {
'actions': [module_check],
'result': {
'type':'form',
'arch':check_form,
'fields':check_fields,
'state':[
('end','Cancel'),
('init', 'Previous'),
('step2','Continue')
]
}
},
'step2': {
'actions': [],
'result': {
'type':'form',
'arch':upload_info_form,
'fields':upload_info_fields,
'state':[
('end','Cancel'),
('step1', 'Previous'),
('publish','Publish Now !')
]
}
},
'publish': {
'actions': [], # Action to develop: upload method
'result': {
'type':'form',
'arch':end_form,
'fields':end_fields,
'state':[
('end','Close')
]
}
}
}
base_module_publish('base_module_publish.module_publish')
+13 -1
View File
@@ -4,7 +4,19 @@
"author" : "Tiny",
"website" : "http://tinyerp.com",
"category" : "Generic Modules/Base",
"description": "This module adds a wizard when the user connects for the first time in the system. If you do not want this setup wizard at first connection, just desactivate this module.",
"description": """
This module implements a configuration system that helps user
to configure the system at the installation of a new database.
It allows you to select between a list of profiles to install:
* Minimal profile
* Accounting only
* Services companies
* Manufacturing companies
It also asks screens to help easily configure your company, the header and
footer, the account chart to install and the language.
""",
"depends" : ["base"],
"init_xml" : [
"base_setup_data.xml",
+1 -1
View File
@@ -262,7 +262,7 @@ class crm_case(osv.osv):
'priority': lambda *a: AVAILABLE_PRIORITIES[1][0],
'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
}
_order = 'priority, date_deadline, id'
_order = 'priority, date_deadline desc, id desc'
def _action(self, cr, uid, cases, state_to, scrit=[], context={}):
action_ids = self.pool.get('crm.case.rule').search(cr, uid, scrit)
level = MAX_LEVEL
+7 -1
View File
@@ -5,7 +5,13 @@
"category" : "Enterprise Specific Modules/Information Technology",
"depends" : ["base"],
"init_xml" : [],
"description": "A simple module to encode your networks and materials. Interventions, waranties, software installed, logins, ...",
"description": """
A simple module to encode your networks and materials:
- networks and connections between networks
- hardwares and softwares with:
- versions, access rights, waranties
You can print interventions form for technical people.""",
"demo_xml" : ["network_demo.xml"],
"update_xml" : ["network_view.xml", "network_report.xml"],
"active" : False,
+13 -3
View File
@@ -9,10 +9,20 @@
"description": """
This is the base module to manage products and pricelists in Tiny ERP.
To detail: products
To detail: pricelists
Products support variants, different pricing methods, suppliers
information, make to stock/order, different unit of measures,
packagins and properties.
Reports: ...
Pricelists supports:
* Multiple-level of discount (by product, category, quantities)
* Compute price based on different criterions:
* Other pricelist,
* Cost price,
* List price,
* Supplier price, ...
Pricelists preferences by product and/or partners.
Print product labels with barcodes.
""",
"update_xml" : ["product_data.xml","product_report.xml", "product_wizard.xml","product_view.xml", "pricelist_view.xml"],
"active": False,
+12 -3
View File
@@ -10,9 +10,18 @@
"description": """
The base module to manage quotations and sales orders.
* Workflow
* Invoicing methods
* Delivery methods
* Workflow with validation steps:
- Quotation -> Sale order -> Invoice
* Invoicing methods:
- Invoice on order (before or after shipping)
- Invoice on delivery
- Invoice on timesheets
- Advance invoice
* Partners preferences (shipping, invoicing, incoterm, ...)
* Products stocks and prices
* Delivery methods:
- all at once, multi-parcel
- delivery costs
""",
"update_xml" : [
"sale_workflow.xml",