summaryrefslogtreecommitdiff
path: root/bin/addons/base/module
diff options
context:
space:
mode:
authorP. Christeas <p_christ@hol.gr>2009-01-28 15:50:50 +0200
committerP. Christeas <p_christ@hol.gr>2009-01-28 15:50:50 +0200
commitcaa5ca5ae2433b0e90cebe4ace6aa7477ce01f9e (patch)
treed4038792f08744837c183b7e73c0b279e15d5097 /bin/addons/base/module
parent3c8938fdc39b16fac8ae00ef8c7d40d34985b538 (diff)
parent4fff87ad618b808d7f34e473b01905dd3d4479e3 (diff)
Merge branch 'master' of openobject-server into mdv-gpl3-py26
Conflicts: bin/tools/translate.py bzr revid: p_christ@hol.gr-20090128135050-bb1ueo5ovziijg00
Diffstat (limited to 'bin/addons/base/module')
-rw-r--r--bin/addons/base/module/module.py21
-rw-r--r--bin/addons/base/module/module_wizard.xml3
-rw-r--r--bin/addons/base/module/report/ir_module_reference.rml8
-rw-r--r--bin/addons/base/module/wizard/wizard_export_lang.py2
-rw-r--r--bin/addons/base/module/wizard/wizard_import_lang.py2
-rw-r--r--bin/addons/base/module/wizard/wizard_module_import.py2
-rw-r--r--bin/addons/base/module/wizard/wizard_module_lang_install.py2
7 files changed, 26 insertions, 14 deletions
diff --git a/bin/addons/base/module/module.py b/bin/addons/base/module/module.py
index a4f822a5e16..9eb5e46e575 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),
@@ -487,6 +487,17 @@ 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)
+ 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()
class module_dependency(osv.osv):
diff --git a/bin/addons/base/module/module_wizard.xml b/bin/addons/base/module/module_wizard.xml
index 2b993f13dd4..a7e3ceba627 100644
--- a/bin/addons/base/module/module_wizard.xml
+++ b/bin/addons/base/module/module_wizard.xml
@@ -22,7 +22,7 @@
</record>
<menuitem action="wizard_lang_install" id="menu_wizard_lang_install" parent="menu_translation" type="wizard"/>
- <record id="wizard_lang_export" model="ir.ui.view">
+ <record id="wizard_lang_export" model="ir.ui.view">
<field name="name">Export a Translation File</field>
<field name="model">wizard.module.lang.export</field>
<field name="type">form</field>
@@ -60,6 +60,7 @@
</form>
</field>
</record>
+
<record id="action_wizard_lang_export" model="ir.actions.act_window">
<field name="name">Export a Translation File</field>
<field name="type">ir.actions.act_window</field>
diff --git a/bin/addons/base/module/report/ir_module_reference.rml b/bin/addons/base/module/report/ir_module_reference.rml
index 9cb301e89a1..52ffd04fd7f 100644
--- a/bin/addons/base/module/report/ir_module_reference.rml
+++ b/bin/addons/base/module/report/ir_module_reference.rml
@@ -184,6 +184,10 @@
</td>
</tr>
</blockTable>
+ <para style="terp_default_8">
+ <font color="white"> </font>
+ </para>
+ <para style="terp_default_8">[[ module.description ]]</para>
<para style="terp_default_Bold_8">
<font color="white"> </font>
</para>
@@ -215,10 +219,6 @@
</td>
</tr>
</blockTable>
- <para style="terp_default_8">
- <font color="white"> </font>
- </para>
- <para style="terp_default_8">[[ module.description ]]</para>
<section>
<para style="terp_default_9">
<font color="white"> </font>
diff --git a/bin/addons/base/module/wizard/wizard_export_lang.py b/bin/addons/base/module/wizard/wizard_export_lang.py
index 49f254604f7..2e8be987c24 100644
--- a/bin/addons/base/module/wizard/wizard_export_lang.py
+++ b/bin/addons/base/module/wizard/wizard_export_lang.py
@@ -73,7 +73,7 @@ class wizard_export_lang(osv.osv_memory):
'format': fields.selection( ( ('csv','CSV File'), ('po','PO File'), ('tgz', 'TGZ Archive')), 'File Format', required=True),
'modules': fields.many2many('ir.module.module', 'rel_modules_langexport', 'wiz_id', 'module_id', 'Modules', domain=[('state','=','installed')]),
'data': fields.binary('File', readonly=True),
- 'advice': fields.text('', readonly=True),
+ 'advice': fields.text('Advice', readonly=True),
'state': fields.selection( ( ('choose','choose'), # choose language
('get','get'), # get the file
) ),
diff --git a/bin/addons/base/module/wizard/wizard_import_lang.py b/bin/addons/base/module/wizard/wizard_import_lang.py
index aad846d59ac..f17b50c3434 100644
--- a/bin/addons/base/module/wizard/wizard_import_lang.py
+++ b/bin/addons/base/module/wizard/wizard_import_lang.py
@@ -30,7 +30,7 @@ view_form="""<?xml version="1.0"?>
<form string="Import language">
<image name="gtk-dialog-info" colspan="2"/>
<group colspan="2" col="4">
- <separator string="Import new language" colspan="4"/>
+ <separator string="Import New Language" colspan="4"/>
<field name="name" width="200"/>
<field name="code"/>
<field name="data" colspan="4"/>
diff --git a/bin/addons/base/module/wizard/wizard_module_import.py b/bin/addons/base/module/wizard/wizard_module_import.py
index a2c653471e2..fbf66d4c222 100644
--- a/bin/addons/base/module/wizard/wizard_module_import.py
+++ b/bin/addons/base/module/wizard/wizard_module_import.py
@@ -39,7 +39,7 @@ finish_form ='''<?xml version="1.0"?>
ask_form ='''<?xml version="1.0"?>
<form string="Module import">
- <separator string="Module import" colspan="4"/>
+ <separator string="Module Import" colspan="4"/>
<label string="Please give your module .ZIP file to import." colspan="4"/>
<field name="module_file"/>
</form>
diff --git a/bin/addons/base/module/wizard/wizard_module_lang_install.py b/bin/addons/base/module/wizard/wizard_module_lang_install.py
index badf7dce09b..1a18ca21ed9 100644
--- a/bin/addons/base/module/wizard/wizard_module_lang_install.py
+++ b/bin/addons/base/module/wizard/wizard_module_lang_install.py
@@ -28,7 +28,7 @@ view_form_end = """<?xml version="1.0"?>
<form string="Language file loaded.">
<image name="gtk-dialog-info" colspan="2"/>
<group colspan="2" col="4">
- <separator string="Installation done" colspan="4"/>
+ <separator string="Installation Done" colspan="4"/>
<label align="0.0" string="The selected language has been successfully installed.\nYou must change the preferences of the user and open a new menu to view changes." colspan="4"/>
</group>
</form>"""