[FIX] store the complexity field from the manifest during the database creation

bzr revid: stw@openerp.com-20110930095814-4o01upd0krmysbid
This commit is contained in:
Stephane Wirtel 2011-09-30 11:58:14 +02:00
parent c20bd2b2f8
commit 53554035ae
3 changed files with 6 additions and 3 deletions

View File

@ -290,6 +290,7 @@ CREATE TABLE ir_module_module (
state character varying(16),
latest_version character varying(64),
shortdesc character varying(256),
complexity character varying(32),
category_id integer REFERENCES ir_module_category ON DELETE SET NULL,
certificate character varying(64),
description text,

View File

@ -75,13 +75,14 @@ def initialize(cr):
cr.execute('INSERT INTO ir_module_module \
(author, website, name, shortdesc, description, \
category_id, state, certificate, web, license) \
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s) RETURNING id', (
category_id, state, certificate, web, license, complexity) \
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s) RETURNING id', (
info['author'],
info['website'], i, info['name'],
info['description'], category_id, state, info['certificate'],
info['web'],
info['license']))
info['license'],
info['complexity']))
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

@ -249,6 +249,7 @@ def load_information_from_description_file(module):
info.setdefault('website', '')
info.setdefault('name', False)
info.setdefault('description', '')
info.setdefault('complexity', False)
info['certificate'] = info.get('certificate') or None
info['web'] = info.get('web') or False
info['license'] = info.get('license') or 'AGPL-3'