[IMP] useability config wizards

bzr revid: fp@tinyerp.com-20111001192115-mgkx8mbmx34ps5xo
This commit is contained in:
Fabien Pinckaers 2011-10-01 21:21:15 +02:00
parent ac534c9f84
commit 8cf0d19c51
8 changed files with 37 additions and 57 deletions

View File

@ -2375,8 +2375,7 @@
<attribute name="string">Accounting Application Configuration</attribute>
</form>
<separator string="title" position="attributes">
<attribute name="string"
>Generate Your Accounting Chart from a Chart Template</attribute>
<attribute name="string">Generate Your Chart of Accounts from a Chart Template</attribute>
</separator>
<xpath expr="//label[@string='description']" position="attributes">
<attribute name="string">This will automatically configure your chart of accounts, bank accounts, taxes and journals according to the selected template</attribute>

View File

@ -119,7 +119,7 @@
<attribute name="string">Define default users preferences</attribute>
</xpath>
<xpath expr="//label[@string='description']" position="attributes">
<attribute name="string">Specify default values. This will set the default values for each new user, each user is free to change his own preferences.</attribute>
<attribute name="string">This will set the default values for all users. After this, user will be free to update his own preferences.</attribute>
</xpath>
<xpath expr="//separator[@string=&quot;vsep&quot;]" position="attributes">
<attribute name="string"/>

View File

@ -22,26 +22,16 @@
from osv import osv, fields
class document_configuration(osv.osv_memory):
_name='document.configuration'
_description = 'Auto Directory Configuration'
_description = 'Directory Configuration'
_inherit = 'res.config'
_columns = {
'sale_order' : fields.boolean('Sale Orders', help="Create virtual folders for Sale Orders and Quotations. One virtual folder will appear for each, in which the latest printed PDF document can be downloaded at any time, and where you can manage (view, add, delete) other attachments."),
'product' : fields.boolean('Products', help="Create virtual folders for Products. One virtual folder will appear for each product, where you can manage (view, add, delete) the files attached to the product"),
'project': fields.boolean('Projects', help="Create virtual folders for Projects. One virtual folder will appear for each project, where you can manage (view, add, delete) the files attached to the project"),
}
def execute(self, cr, uid, ids, context=None):
conf_id = ids and ids[0] or False
conf = self.browse(cr, uid, conf_id, context=context)
dir_pool = self.pool.get('document.directory')
data_pool = self.pool.get('ir.model.data')
model_pool = self.pool.get('ir.model')
content_pool = self.pool.get('document.directory.content')
if conf.sale_order and self.pool.get('sale.order'):
if self.pool.get('sale.order'):
# Sale order
dir_data_id = data_pool._get_id(cr, uid, 'document', 'dir_sale_order_all')
if dir_data_id:
@ -90,7 +80,7 @@ class document_configuration(osv.osv_memory):
})
if conf.product and self.pool.get('product.product'):
if self.pool.get('product.product'):
# Product
dir_data_id = data_pool._get_id(cr, uid, 'document', 'dir_product')
if dir_data_id:
@ -104,7 +94,7 @@ class document_configuration(osv.osv_memory):
'ressource_type_id': mid[0],
})
if conf.project and self.pool.get('account.analytic.account'):
if self.pool.get('account.analytic.account'):
# Project
dir_data_id = data_pool._get_id(cr, uid, 'document', 'dir_project')
if dir_data_id:

View File

@ -1,31 +1,27 @@
<openerp>
<data>
<record id="view_auto_config_form" model="ir.ui.view">
<field name="name">Auto Configure Directory</field>
<field name="name">Auto Configure Directories</field>
<field name="model">document.configuration</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.res_config_view_base"/>
<field name="arch" type="xml">
<data>
<form position="attributes">
<attribute name="string">Knowledge Application Configuration</attribute>
<attribute name="string">Knowledge Application Configuration</attribute>
</form>
<separator string="title" position="attributes">
<attribute name="string">Virtual Document Folders</attribute>
</separator>
<xpath expr="//label[@string='description']" position="attributes">
<attribute name="string">OpenERP's Document Management System supports mapping virtual folders with documents. The virtual folder of a document can be used to manage the files attached to the document, or to print and download any document report. A few common virtual folders can be created for you automatically from this screen.</attribute>
</xpath>
<xpath expr="//separator[@string=&quot;vsep&quot;]" position="attributes">
<attribute name="rowspan">12</attribute>
<attribute name="string"/>
</xpath>
<separator string="title" position="attributes">
<attribute name="string">Configure Direcories</attribute>
</separator>
<xpath expr="//label[@string='description']" position="attributes">
<attribute name="string">OpenERP's Document Management System supports mapping virtual folders with documents. The virtual folder of a document can be used to manage the files attached to the document, or to print and download any report. This tool will create directories automatically according to modules installed.</attribute>
</xpath>
<xpath expr="//separator[@string=&quot;vsep&quot;]" position="attributes">
<attribute name="rowspan">12</attribute>
<attribute name="string"/>
</xpath>
<group string="res_config_contents" position="replace">
<group col="6" colspan="4">
<field name="sale_order"/>
<field name="product"/>
<field name="project"/>
</group>
<label align="0.0" string="When executing this wizard, it will configure your directories automatically according to modules installed."/>
</group>
<xpath expr="//button[@name='action_skip']" position="replace"/>
</data>
@ -33,7 +29,7 @@
</record>
<record id="action_config_auto_directory" model="ir.actions.act_window">
<field name="name">Document Management System: Configure Virtual Folders</field>
<field name="name">Configure Directories</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">document.configuration</field>
<field name="view_id" ref="view_auto_config_form"/>
@ -50,7 +46,6 @@
<record model="ir.actions.todo" id="config_auto_directory">
<field name="action_id" ref="action_config_auto_directory"/>
<field name="category_id" ref="category_knowledge_mgmt_config"/>
<field name="groups_id" eval="[(6,0,[ref('base.group_extended')])]"/>
<field name="type">automatic</field>
</record>
</data>

View File

@ -20,7 +20,7 @@
<field name="type">ir.actions.act_window</field>
<field name="res_model">lunch.cashbox</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_mode">tree,form</field>
</record>
<record id="action_create_cashbox_todo" model="ir.actions.todo">

View File

@ -262,7 +262,7 @@
<form string="Products">
<group col="6">
<field name="name" select="1"/>
<field name="category_id" widget="selection"/>
<field name="category_id"/>
<field name="price" />
</group>
<notebook colspan="4">
@ -300,7 +300,7 @@
<field name="arch" type="xml">
<search string="Products">
<field name="name" />
<field name="category_id" widget="selection"/>
<field name="category_id"/>
<field name="price"/>
</search>
</field>

View File

@ -8,20 +8,18 @@
<field name="arch" type="xml">
<data>
<form position="attributes">
<attribute name="string">Load Outlook Plug-In</attribute>
<attribute name="string">Install Outlook Plug-In</attribute>
</form>
<separator string="title" position="attributes">
<attribute name="string">Load Outlook Plug-In</attribute>
<attribute name="string">Install Outlook Plug-In</attribute>
</separator>
<xpath expr="//label[@string='description']" position="attributes">
<attribute name="string">This plug-in allows you to link your e-mail to OpenERP's documents. You can attach it to any existing one in OpenERP or create a new one.</attribute>
</xpath>
<xpath expr="//button[@string='Install Modules']" position="replace">
<button colspan="1" icon="gtk-close" special="cancel" string="_Close" invisible="not context.get('menu',False)"/>
<button name="action_next" icon="gtk-go-forward" type="object" string="Configure" colspan="1" invisible="context.get('menu',False)"/>
<button colspan="1" icon="gtk-close" special="cancel" string="_Close"/>
</xpath>
<xpath expr="//button[@string='Skip']" position="replace">
<button name="action_skip" icon="gtk-jump-to" special="cancel" type="object" string="Skip" colspan="1" invisible="context.get('menu',False)"/>
</xpath>
<xpath expr="//separator[@string=&quot;vsep&quot;]" position="attributes">
<attribute name="string"/>
@ -46,7 +44,7 @@
</record>
<record id="action_outlook_installer" model="ir.actions.act_window">
<field name="name">Load Outlook Plug-In</field>
<field name="name">Install Outlook Plug-In</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">outlook.installer</field>
<field name="view_id" ref="view_outlook_installer"/>
@ -62,7 +60,7 @@
</record>
<record id="action_outlook_wizard" model="ir.actions.act_window">
<field name="name">Load Outlook Plug-In</field>
<field name="name">Install Outlook Plug-In</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">outlook.installer</field>
<field name="view_id" ref="view_outlook_installer"/>
@ -74,9 +72,9 @@
<menuitem id="base.menu_base_config_plugins" name="Plugins" parent="base.menu_base_config" sequence="10"/>
<menuitem id="menu_base_config_plugins_outlook" action="action_outlook_wizard" name="Load Outlook Plug-In" parent="base.menu_base_config_plugins" sequence="10"/>
<menuitem id="menu_base_config_plugins_outlook" action="action_outlook_wizard" parent="base.menu_base_config_plugins" sequence="10"/>
<menuitem id="base.menu_sales" name="Sales" parent="base.menu_base_partner" sequence="1" />
<menuitem id="menu_base_config_plugins_outlook_sales" action="action_outlook_wizard" name="Load Outlook Plug-In" parent="base.menu_sales" />
<menuitem id="menu_base_config_plugins_outlook_sales" action="action_outlook_wizard" parent="base.menu_sales" />
</data>
</openerp>

View File

@ -9,20 +9,18 @@
<field name="arch" type="xml">
<data>
<form position="attributes">
<attribute name="string">Load Thunderbird Plug-In</attribute>
<attribute name="string">Install Thunderbird Plug-In</attribute>
</form>
<separator string="title" position="attributes">
<attribute name="string">Load Thunderbird Plug-In</attribute>
<attribute name="string">Install Thunderbird Plug-In</attribute>
</separator>
<xpath expr="//label[@string='description']" position="attributes">
<attribute name="string">This plug-in allows you to link your e-mail to OpenERP's documents. You can attach it to any existing one in OpenERP or create a new one.</attribute>
</xpath>
<xpath expr="//button[@string='Install Modules']" position="replace">
<button colspan="1" icon="gtk-close" special="cancel" string="_Close" invisible="not context.get('menu',False)"/>
<button name="action_next" icon="gtk-go-forward" type="object" string="Configure" colspan="1" invisible="context.get('menu',False)"/>
<button colspan="1" icon="gtk-close" special="cancel" string="_Close"/>
</xpath>
<xpath expr="//button[@string='Cancel']" position="replace">
<button name="action_skip" icon="gtk-jump-to" special="cancel" type="object" string="Cancel" colspan="1" invisible="context.get('menu',False)"/>
</xpath>
<xpath expr="//separator[@string=&quot;vsep&quot;]" position="attributes">
<attribute name="string"/>
@ -48,7 +46,7 @@
</record>
<record id="action_thunderbird_installer" model="ir.actions.act_window">
<field name="name">Load Thunderbird Plug-In</field>
<field name="name">Install Thunderbird Plug-In</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">thunderbird.installer</field>
<field name="view_id" ref="view_thunderbird_installer"/>
@ -65,7 +63,7 @@
<record id="action_thunderbird_wizard" model="ir.actions.act_window">
<field name="name">Load Thunderbird Plug-In</field>
<field name="name">Install Thunderbird Plug-In</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">thunderbird.installer</field>
<field name="view_id" ref="view_thunderbird_installer"/>
@ -76,9 +74,9 @@
</record>
<menuitem id="base.menu_base_config_plugins" name="Plugins" parent="base.menu_base_config" sequence="10"/>
<menuitem id="menu_base_config_plugins_thunderbird" action="action_thunderbird_wizard" name="Load Thunderbird Plug-In" parent="base.menu_base_config_plugins" sequence="10"/>
<menuitem id="menu_base_config_plugins_thunderbird" action="action_thunderbird_wizard" parent="base.menu_base_config_plugins" sequence="10"/>
<menuitem id="base.menu_sales" name="Sales" parent="base.menu_base_partner" sequence="1" />
<menuitem id="menu_base_config_plugins_thunderbird_sales" action="action_thunderbird_wizard" name="Load Thunderbird Plug-In" parent="base.menu_sales" />
<menuitem id="menu_base_config_plugins_thunderbird_sales" action="action_thunderbird_wizard" parent="base.menu_sales" />
</data>
</openerp>