From 18b90ecdcf755f75dd25bfbc8a6b3ab8ebace109 Mon Sep 17 00:00:00 2001 From: Geoff Gardiner Date: Mon, 26 Jan 2009 17:40:29 +0000 Subject: Set of label improvements to Open ERP Server. bzr revid: gsg@pinot-grigio-20090126174029-y6niysxn4adegdxu --- bin/addons/base/module/module.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bin/addons/base/module/module.py') diff --git a/bin/addons/base/module/module.py b/bin/addons/base/module/module.py index a4f822a5e16..34f3f4b02da 100644 --- a/bin/addons/base/module/module.py +++ b/bin/addons/base/module/module.py @@ -43,12 +43,12 @@ class module_repository(osv.osv): _description = "Module Repository" _columns = { 'name': fields.char('Name', size=128), - 'url': fields.char('Url', size=256, required=True), + 'url': fields.char('URL', size=256, required=True), 'sequence': fields.integer('Sequence', required=True), 'filter': fields.char('Filter', size=128, required=True, help='Regexp to search module on the repository webpage:\n' '- The first parenthesis must match the name of the module.\n' - '- The second parenthesis must match all the version number.\n' + '- The second parenthesis must match the whole version number.\n' '- The last parenthesis must match the extension of the module.'), 'active': fields.boolean('Active'), } @@ -76,8 +76,8 @@ class module_category(osv.osv): _columns = { 'name': fields.char("Name", size=128, required=True), 'parent_id': fields.many2one('ir.module.category', 'Parent Category', select=True), - 'child_ids': fields.one2many('ir.module.category', 'parent_id', 'Parent Category'), - 'module_nr': fields.function(_module_nbr, method=True, string='# of Modules', type='integer') + 'child_ids': fields.one2many('ir.module.category', 'parent_id', 'Child Categories'), + 'module_nr': fields.function(_module_nbr, method=True, string='Number of Modules', type='integer') } _order = 'name' module_category() @@ -140,7 +140,7 @@ class module(osv.osv): _columns = { 'name': fields.char("Name", size=128, readonly=True, required=True), 'category_id': fields.many2one('ir.module.category', 'Category', readonly=True), - 'shortdesc': fields.char('Short description', size=256, readonly=True, translate=True), + 'shortdesc': fields.char('Short Description', size=256, readonly=True, translate=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), -- cgit v1.2.3 From a400fad8387a45454ab77d7fc6367fad7d66192c Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Tue, 27 Jan 2009 01:10:07 +0100 Subject: bugfix bzr revid: fp@tinyerp.com-20090127001007-kmwfp7yh7x5m73mi --- bin/addons/base/module/module.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'bin/addons/base/module/module.py') diff --git a/bin/addons/base/module/module.py b/bin/addons/base/module/module.py index a4f822a5e16..984d67f01a2 100644 --- a/bin/addons/base/module/module.py +++ b/bin/addons/base/module/module.py @@ -487,6 +487,20 @@ class module(osv.osv): logger.notifyChannel('init', netsvc.LOG_CRITICAL, 'module %s: invalid quality certificate: %s' % (mod.name, mod.certificate)) raise osv.except_osv(_('Error'), _('Module %s: Invalid Quality Certificate') % (mod.name,)) + + def create(self, cr, uid, data, context={}): + id = super(module, self).create(cr, uid, data, context) + print 'Create', { + 'name': 'module_name_translation', + 'model': 'ir.module.module', + 'res_id': id, + } + self.pool.get('ir.model.data').create(cr, uid, { + 'name': 'module_name_translation', + 'model': 'ir.module.module', + 'res_id': id, + }) + return id module() class module_dependency(osv.osv): -- cgit v1.2.3 From 8822ada31f82c568583dd39def2510f42179b584 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Tue, 27 Jan 2009 11:25:15 +0100 Subject: bugfix_ptt bzr revid: fp@tinyerp.com-20090127102515-ric7p0yptywmy2qk --- bin/addons/base/module/module.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'bin/addons/base/module/module.py') diff --git a/bin/addons/base/module/module.py b/bin/addons/base/module/module.py index 984d67f01a2..7ce02e3c1e8 100644 --- a/bin/addons/base/module/module.py +++ b/bin/addons/base/module/module.py @@ -490,16 +490,13 @@ class module(osv.osv): def create(self, cr, uid, data, context={}): id = super(module, self).create(cr, uid, data, context) - print 'Create', { - 'name': 'module_name_translation', - 'model': 'ir.module.module', - 'res_id': id, - } - self.pool.get('ir.model.data').create(cr, uid, { - 'name': 'module_name_translation', - 'model': 'ir.module.module', - 'res_id': id, - }) + if data.get('name'): + self.pool.get('ir.model.data').create(cr, uid, { + 'name': 'module_name_translation', + 'model': 'ir.module.module', + 'res_id': id, + 'module': data['name'] + }) return id module() -- cgit v1.2.3