[MERGE] trunk-module-summary (add field 'summary' on modules)

bzr revid: rco@openerp.com-20120720100253-ulll8tu221v14x1t
This commit is contained in:
Raphael Collet 2012-07-20 12:02:53 +02:00
commit 5a210edad4
5 changed files with 10 additions and 5 deletions

View File

@ -286,6 +286,7 @@ CREATE TABLE ir_module_module (
write_date timestamp without time zone,
write_uid integer references res_users on delete set null,
website character varying(256),
summary character varying(256),
name character varying(128) NOT NULL,
author character varying(128),
url character varying(128),

View File

@ -482,6 +482,7 @@ class module(osv.osv):
'application': terp.get('application', False),
'auto_install': terp.get('auto_install', False),
'icon': terp.get('icon', False),
'summary': terp.get('summary', ''),
}
# update the list of available packages

View File

@ -43,7 +43,7 @@
<search string="Search modules">
<group col='10' colspan='4'>
<field name="name" filter_domain="['|', ('name','ilike',self), ('shortdesc','ilike',self)]" string="Module"/>
<field name="description" string="Keywords"/>
<field name="description" string="Keywords" filter_domain="['|', ('description', 'ilike', self), ('summary', 'ilike', self)]"/>
<separator orientation="vertical"/>
<filter name="app" icon="terp-check" string="Apps" domain="[('application', '=', 1)]"/>
<filter name="extra" icon="terp-check" string="Extra" domain="[('application', '=', 0)]"/>
@ -70,6 +70,7 @@
<field name="icon"/>
<field name="name"/>
<field name="state"/>
<field name="summary"/>
<templates>
<t t-name="kanban-box">
<div class="oe_module_vignette oe_kanban_auto_height">
@ -78,7 +79,8 @@
<div class="oe_module_desc">
<h4><a type="edit"><field name="shortdesc"/></a></h4>
<p class="oe_module_name">
<field name="name"/><br/>
<t t-if="record.summary.raw_value"><field name="summary"/><br/></t>
<i><field name="name" groups="base.group_no_one"/></i>
</p>
<button type="object" name="button_immediate_install" states="uninstalled">Install</button>
<button t-if="installed" disabled="disabled">Installed</button>

View File

@ -77,8 +77,8 @@ def initialize(cr):
cr.execute('INSERT INTO ir_module_module \
(author, website, name, shortdesc, description, \
category_id, auto_install, state, certificate, web, license, application, icon, sequence) \
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s) RETURNING id', (
category_id, auto_install, state, certificate, web, license, application, icon, sequence, summary) \
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s) RETURNING id', (
info['author'],
info['website'], i, info['name'],
info['description'], category_id,
@ -86,7 +86,7 @@ def initialize(cr):
info['web'],
info['license'],
info['application'], info['icon'],
info['sequence']))
info['sequence'], info['summary']))
id = cr.fetchone()[0]
cr.execute('INSERT INTO ir_model_data \
(name,model,module, res_id, noupdate) VALUES (%s,%s,%s,%s,%s)', (

View File

@ -341,6 +341,7 @@ def load_information_from_description_file(module):
'web': False,
'website': '',
'sequence': 100,
'summary': '',
}
info.update(itertools.izip(
'depends data demo test init_xml update_xml demo_xml'.split(),