diff --git a/README b/README index 80fb4701288..5725ce9f866 100644 --- a/README +++ b/README @@ -15,16 +15,3 @@ database, dynamic GUIs, customizable reports, NET-RPC and XML-RPC interfaces, .. For more information, please visit: http://www.openerp.com -About Tiny.be ----------------- - -Tiny.be is a company specialising in the development of high-level applications -and websites. All the company products are free software, released under the -GNU GPL license. - -Our main products include: OpenERP (ERP & CRM for SMB), Tiny eCommerce -(complete eCommerce system), OpenReport (automated generation of complex -documents), Tiny Raytracer, ... - -For more information, please visit: -http://www.tiny.be diff --git a/bin/addons/__init__.py b/bin/addons/__init__.py index 0c591f9ca4f..08cc60c19bd 100644 --- a/bin/addons/__init__.py +++ b/bin/addons/__init__.py @@ -203,14 +203,14 @@ def get_module_filetree(module, dir='.'): return tree -def get_module_as_zip_from_module_directory(module_directory, b64enc=True, src=True): - """Compress a module directory +def zip_directory(directory, b64enc=True, src=True): + """Compress a directory - @param module_directory: The module directory + @param directory: The directory to compress @param base64enc: if True the function will encode the zip file with base64 @param src: Integrate the source files - @return: a stream to store in a file-like object + @return: a string containing the zip file """ RE_exclude = re.compile('(?:^\..+\.swp$)|(?:\.py[oc]$)|(?:\.bak$)|(?:\.~.~$)', re.I) @@ -225,16 +225,16 @@ def get_module_as_zip_from_module_directory(module_directory, b64enc=True, src=T archname = StringIO() archive = PyZipFile(archname, "w", ZIP_DEFLATED) - archive.writepy(module_directory) - _zippy(archive, module_directory, src=src) + archive.writepy(directory) + _zippy(archive, directory, src=src) archive.close() - val = archname.getvalue() + archive_data = archname.getvalue() archname.close() if b64enc: - val = base64.encodestring(val) + return base64.encodestring(archive_data) - return val + return archive_data def get_module_as_zip(modulename, b64enc=True, src=True): """Generate a module as zip file with the source or not and can do a base64 encoding @@ -256,7 +256,7 @@ def get_module_as_zip(modulename, b64enc=True, src=True): if b64enc: val = base64.encodestring(val) else: - val = get_module_as_zip_from_module_directory(ap, b64enc, src) + val = zip_directory(ap, b64enc, src) return val diff --git a/bin/addons/base/__openerp__.py b/bin/addons/base/__openerp__.py index 47a36987b48..86a0229358a 100644 --- a/bin/addons/base/__openerp__.py +++ b/bin/addons/base/__openerp__.py @@ -44,7 +44,6 @@ 'ir/ir.xml', 'ir/workflow/workflow_view.xml', 'module/module_view.xml', - 'module/module_web_view.xml', 'module/module_data.xml', 'module/module_report.xml', 'module/wizard/base_module_import_view.xml', diff --git a/bin/addons/base/base.sql b/bin/addons/base/base.sql index 778a64b2420..84676a7f59b 100644 --- a/bin/addons/base/base.sql +++ b/bin/addons/base/base.sql @@ -302,6 +302,7 @@ CREATE TABLE ir_module_module ( certificate character varying(64), description text, demo boolean default False, + web boolean DEFAULT FALSE, primary key(id) ); ALTER TABLE ir_module_module add constraint name_uniq unique (name); diff --git a/bin/addons/base/base_update.xml b/bin/addons/base/base_update.xml index 66376ed2acc..361bbfa67a0 100644 --- a/bin/addons/base/base_update.xml +++ b/bin/addons/base/base_update.xml @@ -82,6 +82,7 @@ context="{'user_id': self, 'user_preference': 1}" groups="base.group_multi_company"/> - - - - - - - - diff --git a/bin/addons/base/module/module_web.py b/bin/addons/base/module/module_web.py deleted file mode 100644 index 8f65dc3960d..00000000000 --- a/bin/addons/base/module/module_web.py +++ /dev/null @@ -1,46 +0,0 @@ -from osv import fields, osv, orm - -class module_web(osv.osv): - _name = "ir.module.web" - _description = "Web Module" - - _columns = { - 'name': fields.char("Name", size=128, readonly=True, required=True), - 'module': fields.char("Module", size=128, readonly=True, required=True), - 'description': fields.text("Description", readonly=True, translate=True), - 'author': fields.char("Author", size=128, readonly=True), - 'website': fields.char("Website", size=256, readonly=True), - 'state': fields.selection([ - ('uninstallable','Uninstallable'), - ('uninstalled','Not Installed'), - ('installed','Installed') - ], string='State', readonly=True) - } - - _defaults = { - 'state': lambda *a: 'uninstalled', - } - _order = 'name' - - _sql_constraints = [ - ('name_uniq', 'unique (name)', 'The name of the module must be unique !'), - ] - - def update_module_list(self, cr, uid, modules, context={}): - - for module in modules: - mod_name = module['name'] - ids = self.search(cr, uid, [('name','=',mod_name)]) - if ids: - self.write(cr, uid, ids, module) - else: - self.create(cr, uid, module) - - def button_install(self, cr, uid, ids, context={}): - return self.write(cr, uid, ids, {'state': 'installed'}, context) - - def button_uninstall(self, cr, uid, ids, context={}): - return self.write(cr, uid, ids, {'state': 'uninstalled'}, context) - -module_web() - diff --git a/bin/addons/base/module/module_web_view.xml b/bin/addons/base/module/module_web_view.xml deleted file mode 100644 index 32e927b70e7..00000000000 --- a/bin/addons/base/module/module_web_view.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - ir.module.web.tree - ir.module.web - tree - - - - - - - -