[IMP] better form view: users, modules, preferences, wizards

bzr revid: fp@tinyerp.com-20120716203512-ic75m4qys1v0kid6
This commit is contained in:
Fabien Pinckaers
2012-07-16 22:35:12 +02:00
parent 364de3ad21
commit 28124a66f6
13 changed files with 109 additions and 175 deletions
@@ -7,15 +7,15 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Create Menu" version="7.0">
<header>
<button name="menu_create" string="Create _Menu" type="object" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel" />
</header>
<group>
<field name="name"/>
<field name="menu_id" domain="[('parent_id','&lt;&gt;',False)]"/>
</group>
<footer>
<button name="menu_create" string="Create _Menu" type="object" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel" />
</footer>
</form>
</field>
</record>
+2
View File
@@ -80,6 +80,7 @@ class module_category(osv.osv):
class module(osv.osv):
_name = "ir.module.module"
_rec_name = "shortdesc"
_description = "Module"
@classmethod
@@ -177,6 +178,7 @@ class module(osv.osv):
'name': fields.char("Technical Name", size=128, readonly=True, required=True, select=True),
'category_id': fields.many2one('ir.module.category', 'Category', readonly=True, select=True),
'shortdesc': fields.char('Module Name', size=256, readonly=True, translate=True),
'summary': fields.char('Summary', size=256, readonly=True, translate=True),
'description': fields.text("Description", readonly=True, translate=True),
'author': fields.char("Author", size=128, readonly=True),
'maintainer': fields.char('Maintainer', size=128, readonly=True),
+17 -19
View File
@@ -113,36 +113,32 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Module" version="7.0">
<header>
<button name="button_install" states="uninstalled" string="Install" icon="terp-gtk-jump-to-ltr" type="object" class="oe_highlight"/>
<button name="button_upgrade" states="installed" string="Upgrade" icon="terp-gtk-go-back-rtl" type="object" class="oe_highlight"/>
<button name="button_uninstall" states="installed" string="Uninstall (beta)" icon="terp-dialog-close" type="object"
confirm="Do you confirm the uninstallation of this module? This will permanently erase all data currently stored by the module!"/>
<button name="button_uninstall_cancel" states="to remove" string="Cancel Uninstall" icon="gtk-cancel" type="object"/>
<button name="button_upgrade_cancel" states="to upgrade" string="Cancel Upgrade" icon="gtk-cancel" type="object"/>
<button name="button_install_cancel" states="to install" string="Cancel Install" icon="gtk-cancel" type="object"/>
<field name="state" widget="statusbar" statusbar_visible="uninstalled"/>
</header>
<sheet>
<div class="oe_right oe_button_box">
<field name="icon_image" widget="image"/>
</div>
<field name="icon_image" widget="image" class="oe_avatar oe_left"/>
<div class="oe_title">
<h1><field name="shortdesc"/></h1>
<h2><field name="category_id" class="oe_inline"/></h2>
<h2 class="oe_fade"><field name="summary"/></h2>
<button name="button_install" states="uninstalled" string="Install" type="object" class="oe_highlight"/>
<button name="button_upgrade" states="installed" string="Upgrade" type="object" class="oe_highlight"/>
<button name="button_uninstall" states="installed" string="Uninstall" type="object"
confirm="Do you confirm the uninstallation of this module? This will permanently erase all data currently stored by the module!"/>
<button name="button_uninstall_cancel" states="to remove" string="Cancel Uninstall" type="object"/>
<button name="button_upgrade_cancel" states="to upgrade" string="Cancel Upgrade" type="object"/>
<button name="button_install_cancel" states="to install" string="Cancel Install" type="object"/>
</div>
<group>
<group>
<field name="author"/>
<field name="website" widget="url"/>
<field name="category_id" widget="selection"/>
</group>
<group>
<field name="name"/>
<field name="license"/>
<field name="installed_version"/>
</group>
<group>
<field name="author"/>
<field name="website" widget="url"/>
</group>
</group>
<notebook colspan="4">
<notebook>
<page string="Description">
<field name="description"/>
</page>
@@ -150,7 +146,9 @@
<group col="4">
<field name="demo"/>
<field name="application"/>
<field name="state"/>
</group>
<label for="dependencies_id"/>
<field name="dependencies_id">
<tree string="Dependencies">
<field name="name"/>
@@ -8,39 +8,24 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Export Translations" version="7.0">
<header>
<group colspan="4" states="choose">
<separator colspan="4" string="Export Translation"/>
<field name="lang"/>
<field name="format" required="1"/>
<field name="modules" nolabel="1"/>
<field invisible="1" name="state"/>
</group>
<group colspan="4" states="get">
<separator string="Export done" colspan="4"/>
<field name="name" invisible="1" colspan="4"/>
<field name="data" nolabel="1" readonly="1" filename="name" colspan="4"/>
<field height="80" name="advice" nolabel="1" colspan="4"/>
</group>
<footer>
<button name="act_getfile" string="_Export" type="object" states="choose" class="oe_highlight"/>
<label string="or" states="choose"/>
<button string="Cancel" class="oe_link" special="cancel" />
</header>
<group col="8">
<group colspan="3">
<field name="config_logo" widget="image" width="220" height="130" nolabel="1" colspan="1"/>
<newline/>
<label colspan="4" width="220" string="OpenERP translations (core, modules, clients) are managed through Launchpad.net, our open source project management facility. We use their online interface to synchronize all translations efforts."/>
<label colspan="4" width="220" string="To improve or expand the official translations, you should use directly Lauchpad's web interface (Rosetta). If you need to perform mass translation, Launchpad also allows uploading full .po files at once"/>
<label colspan="4" width="220"/>
<label colspan="4" width="220" string="To browse official translations, you can start with these links:"/>
<label colspan="4" width="220" string="https://help.launchpad.net/Translations"/>
<label colspan="4" width="220" string="https://translations.launchpad.net/openobject"/>
</group>
<separator orientation="vertical" rowspan="15"/>
<group colspan="4">
<group colspan="4" states="choose">
<separator colspan="4" string="Export Translation"/>
<field name="lang"/>
<field name="format" required="1"/>
<field height="200" name="modules" nolabel="1" colspan="4"/>
<field invisible="1" name="state"/>
</group>
<group colspan="4" states="get">
<separator string="Export done" colspan="4"/>
<field name="name" invisible="1" colspan="4"/>
<field name="data" nolabel="1" readonly="1" filename="name" colspan="4"/>
<field height="80" name="advice" nolabel="1" colspan="4"/>
</group>
</group>
</group>
</footer>
</form>
</field>
</record>
@@ -8,11 +8,6 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Import Translation" version="7.0">
<header>
<button name="import_lang" string="_Import" type="object" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel" />
</header>
<group>
<separator string="Import Translation" colspan="2"/>
<label nolabel="1" string="If you need another language than the official ones available, you can import a language pack from here. Other OpenERP languages than the official ones can be found on launchpad." colspan="2"/>
@@ -23,6 +18,11 @@
<field name="overwrite"/>
</group>
</group>
<footer>
<button name="import_lang" string="_Import" type="object" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel" />
</footer>
</form>
</field>
</record>
@@ -8,33 +8,21 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Load a Translation" version="7.0">
<header>
<separator string="Load a Translation"/>
<field name="state" invisible="1"/>
<group states="init">
<field name="lang"/>
<field name="overwrite" groups="base.group_no_one"/>
</group>
<group states="done" colspan="4">
<label string="The selected language has been successfully installed.
You must change the preferences of the user and open a new menu to view the changes."/>
</group>
<footer>
<button name="lang_install" string="Load" type="object" states="init" class="oe_highlight"/>
<label string="or" states="init"/>
<button string="Cancel" class="oe_link" special="cancel"/>
</header>
<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."/>
<label colspan="4" width="220"/>
<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" colspan="1" rowspan="12"/>
<group colspan="6">
<separator string="Load a Translation" colspan="4"/>
<group states="init" colspan="4">
<field name="lang" colspan="4"/>
<field name="overwrite" colspan="4" groups="base.group_no_one"/>
</group>
<group states="done" colspan="4">
<label string="The selected language has been successfully installed.
You must change the preferences of the user and open a new menu to view the changes." colspan="4"/>
</group>
</group>
</group>
</footer>
</form>
</field>
</record>
@@ -49,10 +37,10 @@ You must change the preferences of the user and open a new menu to view the chan
</record>
<menuitem
name="Load a Translation"
action="action_view_base_language_install"
id="menu_view_base_language_install"
parent="menu_translation" sequence="2"/>
name="Load a Translation"
action="action_view_base_language_install"
id="menu_view_base_language_install"
parent="menu_translation" sequence="2"/>
</data>
</openerp>
@@ -8,10 +8,10 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="System Configuration Done" version="7.0">
<header>
<button string="Cancel" class="oe_link" special="cancel" />
</header>
<label string="All pending configuration wizards have been executed. You may restart individual wizards via the list of configuration wizards."/>
<footer>
<button string="Close" class="oe_link" special="cancel" />
</footer>
</form>
</field>
</record>
@@ -8,35 +8,22 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Import module" version="7.0">
<header>
<field name="state" invisible="1"/>
<separator string="Module Import" colspan="4"/>
<group states="init" col="4">
<label string="Select module package to import (.zip file):" colspan="4"/>
<field name="module_file" colspan="4"/>
</group>
<group states="done" col="4">
<label string="Module file successfully imported!" colspan="4"/>
</group>
<footer>
<button name="importzip" string="Import module" type="object" states="init" class="oe_highlight"/>
<label string="or" states="init"/>
<button name="action_module_open" string="Open Modules" type="object" states="done" class="oe_highlight"/>
<label string="or" states="done"/>
<button string="Cancel" class="oe_link" special="cancel"/>
</header>
<group col="8">
<group colspan="3" col="1">
<field name="config_logo" widget="image" width="220" height="130" nolabel="1" colspan="1"/>
<newline/>
<label width="220" string='This wizard helps you to import a new module to your OpenERP system.
After importing a new module you can install it by clicking on the button "Install" from the form view.'/>
<label width="220"/>
<label width="220" string="Please be patient, this operation may take a few minutes..."/>
<field name="state" invisible="1"/>
</group>
<separator orientation="vertical" rowspan="5"/>
<group colspan="4">
<separator string="Module Import" colspan="4"/>
<group states="init" col="4">
<label string="Select module package to import (.zip file):" colspan="4"/>
<field name="module_file" colspan="4"/>
</group>
<group states="done" col="4">
<label string="Module file successfully imported!" colspan="4"/>
</group>
</group>
</group>
</footer>
</form>
</field>
</record>
@@ -8,12 +8,12 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Scan for new modules" version="7.0">
<header>
<label string="This function will check if you installed new modules in the 'addons' path of your server installation."/>
<footer>
<button name="watch_dir" string="Check new modules" type="object" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel" />
</header>
<label string="This function will check if you installed new modules in the 'addons' path of your server installation."/>
</footer>
</form>
</field>
</record>
@@ -8,34 +8,22 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Update Module List" version="7.0">
<header>
<field name="state" invisible="1"/>
<separator string="Module Update Result" colspan="4"/>
<group states="init" colspan="4">
<label string="Click on Update below to start the process..." colspan="4"/>
</group>
<group states="done" colspan="4">
<field name="update" colspan="4"/>
<field name="add" colspan="4"/>
</group>
<footer>
<button name="update_module" string="Update" type="object" states="init" class="oe_highlight"/>
<label string="or" states="init"/>
<button name="action_module_open" string="Open Modules" type="object" states="done" class="oe_highlight"/>
<label string="or" states="done"/>
<button string="Cancel" class="oe_link" special="cancel" />
</header>
<group col="8">
<group colspan="3">
<field name="config_logo" widget="image" width="220" height="130" nolabel="1" colspan="1"/>
<newline/>
<label colspan="4" width="220" string="This wizard will scan all module repositories on the server side to detect newly added modules as well as any change to existing modules."/>
<label colspan="4" width="220"/>
<label colspan="4" width="220" string="Please be patient, as this operation may take a few seconds..."/>
<field name="state" invisible="1"/>
</group>
<separator orientation="vertical" rowspan="15"/>
<group colspan="4">
<separator string="Module Update Result" colspan="4"/>
<group states="init" colspan="4">
<label string="Click on Update below to start the process..." colspan="4"/>
</group>
<group states="done" colspan="4">
<field name="update" colspan="4"/>
<field name="add" colspan="4"/>
</group>
</group>
</group>
</footer>
</form>
</field>
</record>
@@ -8,15 +8,15 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="System Update" version="7.0">
<header>
<button name="upgrade_module" string="Update" type="object" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel"/>
</header>
<div><label string="Your system will be updated."/></div>
<div><label string="Note that this operation might take a few minutes."/></div>
<separator string="Modules to Update"/>
<field name="module_info"/>
<footer>
<button name="upgrade_module" string="Update" type="object" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel"/>
</footer>
</form>
</field>
</record>
@@ -45,13 +45,13 @@
<field name="priority" eval="20"/>
<field name="arch" type="xml">
<form string="Apply Scheduled Upgrades" version="7.0">
<header>
<div><label string="The selected modules have been updated / installed !"/></div>
<div><label string="We suggest to reload the menu tab to see the new menus (Ctrl+T then Ctrl+R)."/></div>
<footer>
<button name="config" string="Start configuration" type="object" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel"/>
</header>
<div><label string="The selected modules have been updated / installed !"/></div>
<div><label string="We suggest to reload the menu tab to see the new menus (Ctrl+T then Ctrl+R)."/></div>
</footer>
</form>
</field>
</record>
@@ -7,23 +7,14 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Synchronize Terms" version="7.0">
<header>
<group string="Synchronize Translation">
<field name="lang"/>
</group>
<footer>
<button name="act_update" string="Update" type="object" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel"/>
</header>
<group col="8">
<group colspan="3">
<field name="config_logo" widget="image" width="220" height="130" nolabel="1" colspan="1"/>
<newline/>
<label colspan="4" width="220" string="This wizard will detect new terms to translate in the application, so that you can then add translations manually or perform a complete export (as a template for a new language example)."/>
</group>
<separator orientation="vertical" rowspan="15"/>
<group colspan="4">
<separator string="Synchronize Translation" colspan="4"/>
<field name="lang" colspan="4"/>
</group>
</group>
</footer>
</form>
</field>
</record>
+7 -12
View File
@@ -81,9 +81,7 @@
<form string="Users" version="7.0">
<field name="id" invisible="1"/>
<sheet>
<div class="oe_right">
<field name="avatar" widget='image' nolabel="1" on_change="onchange_avatar(avatar)" class="oe_avatar"/>
</div>
<field name="avatar" widget='image' on_change="onchange_avatar(avatar)" class="oe_avatar oe_left"/>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1><field name="name"/></h1>
@@ -194,24 +192,21 @@
<field eval="18" name="priority"/>
<field name="arch" type="xml">
<form string="Users" version="7.0">
<sheet>
<div class="oe_right oe_avatar">
<field name="avatar" widget='image' on_change="onchange_avatar(avatar)"/>
</div>
<sheet>
<field name="avatar" widget='image' on_change="onchange_avatar(avatar)" class="oe_avatar oe_left"/>
<div class="oe_title">
<h1>
<field name="name" readonly="1" class="oe_edit_only oe_inline"/>
(<field name="login" readonly="1" class="oe_edit_only oe_inline"/>)
<field name="name" readonly="1"/>
</h1>
<label for="company_id" class="oe_edit_only" groups="base.group_multi_company"/>
<h2>
<field name="company_id" widget="selection" readonly="0"
groups="base.group_multi_company" on_change="on_change_company_id(company_id)"/>
<field name="login" readonly="1"/>
</h2>
</div>
<group col="4" name="preferences" string="Preferences">
<field name="context_lang" readonly="0"/>
<field name="context_tz" readonly="0"/>
<field name="company_id" widget="selection" readonly="0"
groups="base.group_multi_company" on_change="on_change_company_id(company_id)"/>
</group>
<group string="Email Preferences">
<field name="user_email" widget="email" readonly="0"/>