summaryrefslogtreecommitdiff
path: root/bin/addons/base/module/wizard
diff options
context:
space:
mode:
authorYSA (Openerp) <ysa@tinyerp.com>2011-01-20 11:07:33 +0530
committerYSA (Openerp) <ysa@tinyerp.com>2011-01-20 11:07:33 +0530
commitf030d1219e2411e4b557f960d603fca1fcbb012e (patch)
treef7cc7e772563e2a1fecc9713987b569af35bd0d4 /bin/addons/base/module/wizard
parent1b287f9b7b7ffc6719a7839753597341cc75d7fb (diff)
parent10a6bb350c2f054e262ee4649855185795e611d5 (diff)
Merge with trunk-server
bzr revid: ysa@tinyerp.com-20110120053733-ws7mfcfw15p0iyy1
Diffstat (limited to 'bin/addons/base/module/wizard')
-rw-r--r--bin/addons/base/module/wizard/base_export_language.py4
-rw-r--r--bin/addons/base/module/wizard/base_language_install.py14
-rw-r--r--bin/addons/base/module/wizard/base_language_install_view.xml14
-rw-r--r--bin/addons/base/module/wizard/base_module_configuration_view.xml8
-rw-r--r--bin/addons/base/module/wizard/base_module_shortcut_data.xml13
5 files changed, 36 insertions, 17 deletions
diff --git a/bin/addons/base/module/wizard/base_export_language.py b/bin/addons/base/module/wizard/base_export_language.py
index 1b43b561ac3..86683bbcc4f 100644
--- a/bin/addons/base/module/wizard/base_export_language.py
+++ b/bin/addons/base/module/wizard/base_export_language.py
@@ -47,7 +47,7 @@ class base_language_export(osv.osv_memory):
mods = map(lambda m: m.name, this.modules) or ['all']
mods.sort()
buf=cStringIO.StringIO()
- tools.trans_export(this.lang, mods, buf, this.format, dbname=cr.dbname)
+ tools.trans_export(this.lang, mods, buf, this.format, cr)
if this.format == 'csv':
this.advice = _("Save this document to a .CSV file and open it with your favourite spreadsheet software. The file encoding is UTF-8. You have to translate the latest column before reimporting it.")
elif this.format == 'po':
@@ -86,4 +86,4 @@ class base_language_export(osv.osv_memory):
}
base_language_export()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/bin/addons/base/module/wizard/base_language_install.py b/bin/addons/base/module/wizard/base_language_install.py
index f7b469f85ed..1e40f84cc60 100644
--- a/bin/addons/base/module/wizard/base_language_install.py
+++ b/bin/addons/base/module/wizard/base_language_install.py
@@ -21,6 +21,7 @@
import tools
from osv import osv, fields
+from tools.translate import _
class base_language_install(osv.osv_memory):
""" Install Language"""
@@ -50,7 +51,18 @@ class base_language_install(osv.osv_memory):
context = {'overwrite': True}
modobj.update_translations(cr, uid, mids, lang, context or {})
self.write(cr, uid, ids, {'state': 'done'}, context=context)
- return False
+ return {
+ 'name': _('Language Pack'),
+ 'view_type': 'form',
+ 'view_mode': 'form',
+ 'view_id': False,
+ 'res_model': 'base.language.install',
+ 'domain': [],
+ 'context': dict(context, active_ids=ids),
+ 'type': 'ir.actions.act_window',
+ 'target': 'new',
+ 'res_id': ids and ids[0] or False,
+ }
base_language_install()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/bin/addons/base/module/wizard/base_language_install_view.xml b/bin/addons/base/module/wizard/base_language_install_view.xml
index d207ea9ea29..250710e0d37 100644
--- a/bin/addons/base/module/wizard/base_language_install_view.xml
+++ b/bin/addons/base/module/wizard/base_language_install_view.xml
@@ -8,8 +8,8 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Load Official Translation">
- <group col="8">
- <group colspan="3">
+ <group colspan="4" col="8">
+ <group colspan="1">
<field name="config_logo" widget="image" width="220" height="130" nolabel="1" colspan="1"/>
<newline/>
<label colspan="4" width="220" string="This wizard helps you add a new language to your OpenERP system. After loading a new language it becomes available as default interface language for users and partners."/>
@@ -17,8 +17,8 @@
<label colspan="4" width="220" string="Please be patient, this operation may take a few minutes (depending on the number of modules currently installed)..."/>
<field name="state" invisible="1"/>
</group>
- <separator orientation="vertical" rowspan="15"/>
- <group colspan="4">
+ <separator orientation="vertical" colspan="1" rowspan="12"/>
+ <group colspan="6">
<separator string="Load an Official Translation" colspan="4"/>
<group states="init" colspan="4">
<field name="lang" colspan="4"/>
@@ -29,18 +29,18 @@
You must change the preferences of the user and open a new menu to view the changes." colspan="4"/>
</group>
</group>
+ </group>
<group colspan="8" col="8" states="init">
<separator string="" colspan="8"/>
<label colspan="6" width="220"/>
- <button special="cancel" string="Cancel" icon="gtk-cancel"/>
- <button name="lang_install" string="Load" type="object" icon="gtk-ok"/>
+ <button special="cancel" string="Cancel" icon="gtk-cancel" colspan="1"/>
+ <button name="lang_install" string="Load" type="object" icon="gtk-ok" colspan="1"/>
</group>
<group colspan="8" col="8" states="done">
<separator string="" colspan="8"/>
<label colspan="7" width="220"/>
<button special="cancel" string="Close" icon="gtk-ok"/>
</group>
- </group>
</form>
</field>
</record>
diff --git a/bin/addons/base/module/wizard/base_module_configuration_view.xml b/bin/addons/base/module/wizard/base_module_configuration_view.xml
index 8ab47e2c2bc..f8abf1e2732 100644
--- a/bin/addons/base/module/wizard/base_module_configuration_view.xml
+++ b/bin/addons/base/module/wizard/base_module_configuration_view.xml
@@ -24,7 +24,7 @@
<field name="code">action = obj.start()</field>
</record>
- <menuitem name="Start Configuration"
+ <menuitem name="Reconfigure"
action="action_start_configurator"
id="menu_view_base_module_configuration" parent="base.menu_config"
type="server" icon="STOCK_EXECUTE" sequence="100" />
@@ -38,12 +38,6 @@
<field name="key">action</field>
<field name="model">ir.actions.todo</field>
</record>
- <record id="ir_ui_view_sc_configuration" model="ir.ui.view_sc">
- <field name="name">Reconfigure</field>
- <field name="resource">ir.ui.menu</field>
- <field name="user_id" ref="base.user_root"/>
- <field name="res_id" ref="menu_view_base_module_configuration"/>
- </record>
</data>
</openerp>
diff --git a/bin/addons/base/module/wizard/base_module_shortcut_data.xml b/bin/addons/base/module/wizard/base_module_shortcut_data.xml
new file mode 100644
index 00000000000..e5faaabdd5e
--- /dev/null
+++ b/bin/addons/base/module/wizard/base_module_shortcut_data.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data noupdate="1">
+
+ <record id="ir_ui_view_sc_configuration" model="ir.ui.view_sc">
+ <field name="name">Reconfigure</field>
+ <field name="resource">ir.ui.menu</field>
+ <field name="user_id" ref="base.user_root"/>
+ <field name="res_id" ref="menu_view_base_module_configuration"/>
+ </record>
+
+ </data>
+</openerp>