base, base_module_publish, kernel: improve module publication
- allow including source - fix GPL-2 - module are active=False by default - add license in module object bzr revid: ced-46f980c78df4585ba6d69c98af02c50092c33b30
This commit is contained in:
parent
2e78c4db9a
commit
de25bb420a
|
@ -107,11 +107,15 @@ class module(osv.osv):
|
|||
('to install','To be installed')
|
||||
], string='State', readonly=True),
|
||||
'demo': fields.boolean('Demo data'),
|
||||
'license': fields.selection([('GPL-2', 'GPL-2'),
|
||||
('Other proprietary', 'Other proprietary')], string='License',
|
||||
readonly=True),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'state': lambda *a: 'uninstalled',
|
||||
'demo': lambda *a: False,
|
||||
'license': lambda *a: 'GPL-2',
|
||||
}
|
||||
_order = 'name'
|
||||
|
||||
|
@ -203,6 +207,7 @@ class module(osv.osv):
|
|||
'author': terp.get('author', 'Unknown'),
|
||||
'website': terp.get('website', ''),
|
||||
'latest_version': terp.get('version', ''),
|
||||
'license': terp.get('license', 'GPL-2'),
|
||||
})
|
||||
cr.execute('DELETE FROM ir_module_module_dependency where module_id = %d', (ids[0],))
|
||||
self._update_dependencies(cr, uid, ids[0], terp.get('depends', []))
|
||||
|
@ -232,6 +237,7 @@ class module(osv.osv):
|
|||
'author': terp.get('author', 'Unknown'),
|
||||
'website': terp.get('website', ''),
|
||||
'latest_version': terp.get('version', ''),
|
||||
'license': terp.get('license', 'GPL-2'),
|
||||
})
|
||||
self._update_dependencies(cr, uid, id, terp.get('depends', []))
|
||||
self._update_category(cr, uid, id, terp.get('category', 'Uncategorized'))
|
||||
|
|
|
@ -78,11 +78,15 @@
|
|||
<field name="installed_version"/>
|
||||
<field name="latest_version"/>
|
||||
<field name="author" select="2"/>
|
||||
<field name="website" select="2"/>
|
||||
<field name="url"/>
|
||||
<field name="website" select="2" widget="url"/>
|
||||
<field name="url" widget="url"/>
|
||||
<field name="license"/>
|
||||
<newline/>
|
||||
<label colspan="2"/>
|
||||
<field name="demo" readonly="1"/>
|
||||
<newline/>
|
||||
<field name="state" readonly="1" select="1"/>
|
||||
<group col="7" colspan="2">
|
||||
<group col="6" colspan="2">
|
||||
<button string="Install" name="button_install" type="object" states="uninstalled"/>
|
||||
<button string="Cancel Install" name="button_install_cancel" type="object" states="to install"/>
|
||||
<button string="Uninstall" name="button_uninstall" type="object" states="installed"/>
|
||||
|
|
|
@ -86,7 +86,7 @@ def init_db(cr):
|
|||
p_id = c_id
|
||||
categs = categs[1:]
|
||||
|
||||
active = info.get('active', True)
|
||||
active = info.get('active', False)
|
||||
installable = info.get('installable', True)
|
||||
if installable:
|
||||
if active:
|
||||
|
|
Loading…
Reference in New Issue