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

bzr revid: fp@tinyerp.com-20120716203512-fvc3dx0fhwq5qb5m
This commit is contained in:
Fabien Pinckaers
2012-07-16 22:35:12 +02:00
13 changed files with 119 additions and 141 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,30 +8,26 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Export Translations" version="7.0">
<field invisible="1" name="state"/>
<header states="choose">
<button icon="gtk-ok" name="act_getfile" string="_Export" type="object" class="oe_highlight"/> or
<button icon="gtk-cancel" name="act_cancel" special="cancel" string="_Cancel" type="object" class="oe_link"/>
</header>
<sheet>
<group colspan="4">
<group states="choose">
<field name="lang"/>
<field name="format" required="1"/>
<field height="200" name="modules" nolabel="1" colspan="4"/>
</group>
<group colspan="4" states="get" string="Export done">
<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 colspan="8" col="8" states="get">
<separator string="" colspan="8"/>
<label colspan="7" width="220"/>
<button icon="gtk-close" name="act_destroy" special="cancel" string="_Close" type="object"/>
</group>
</sheet>
<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 states="choose">
<button name="act_getfile" string="_Export" type="object" class="oe_highlight"/> or
<button name="act_cancel" special="cancel" string="_Cancel" type="object" class="oe_link"/>
</footer>
<footer states="get">
<button name="act_cancel" special="cancel" string="_Close" type="object"/>
</footer>
</form>
</field>
</record>
@@ -8,17 +8,17 @@
<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>
<field name="name"/>
<field name="code" string="Code" placeholder="en_US"/>
<field name="data"/>
<field name="overwrite"/>
</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,26 +8,23 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Load a Translation" version="7.0">
<separator string="Load a Translation"/>
<field name="state" invisible="1"/>
<header states="init">
<button name="lang_install" string="Load" type="object" icon="gtk-ok" colspan="1" class="oe_highlight"/> or
<button special="cancel" string="Cancel" icon="gtk-cancel" colspan="1" class="oe_link"/>
</header>
<sheet>
<group>
<group states="init">
<field name="lang"/>
<field name="overwrite" groups="base.group_no_one"/>
</group>
<group states="done">
<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>
</group>
<group states="done">
<button special="cancel" string="Close" icon="gtk-ok"/>
</group>
</sheet>
<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 states="init">
<button name="lang_install" string="Load" type="object" icon="gtk-ok" class="oe_highlight"/> or
<button special="cancel" string="Cancel" icon="gtk-cancel" class="oe_link"/>
</footer>
<footer states="done">
<button special="cancel" string="Close" icon="gtk-cancel"/>
</footer>
</form>
</field>
</record>
@@ -42,10 +39,10 @@
</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>
@@ -9,7 +9,15 @@
<field name="arch" type="xml">
<form string="Update Module List" version="7.0">
<field name="state" invisible="1"/>
<header>
<separator string="Module Update Result"/>
<group states="init">
<label string="Click on Update below to start the process..." />
</group>
<group states="done" >
<field name="update"/>
<field name="add" />
</group>
<footer>
<div states="init">
<button name="update_module" string="Update" type="object" icon="gtk-ok" class="oe_highlight"/> or
<button special="cancel" string="Cancel" icon="gtk-cancel" class="oe_link"/>
@@ -18,13 +26,7 @@
<button name="action_module_open" string="Open Modules" type="object" icon="gtk-go-forward" class="oe_highlight"/> or
<button special="cancel" string="Close" icon="gtk-ok" class="oe_link"/>
</div>
</header>
<group>
<group states="done" colspan="4">
<field name="update" colspan="4"/>
<field name="add" colspan="4"/>
</group>
</group>
</footer>
</form>
</field>
</record>
@@ -8,12 +8,15 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="System Update" version="7.0">
<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"/>
</header>
<field name="module_info"/>
</footer>
</form>
</field>
</record>
@@ -42,11 +45,13 @@
<field name="priority" eval="20"/>
<field name="arch" type="xml">
<form string="Apply Schedule Upgrade" 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>
</footer>
</form>
</field>
</record>
@@ -7,16 +7,12 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Synchronize Terms" version="7.0">
<header>
<button icon="gtk-ok" name="act_update" string="Update" type="object" class="oe_highlight"/>
or
<button icon="gtk-cancel" name="act_cancel" class="oe_link" special="cancel" string="Cancel" type="object"/>
</header>
<sheet>
<group>
<field name="lang"/>
</group>
</sheet>
<group string="Synchronize Translation">
<field name="lang"/>
</group>
<footer>
<button name="act_cancel" special="cancel" string="Cancel" type="object"/>
</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>
@@ -193,24 +191,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"/>