Browse Source

[FIX] change name of field; Add pot file

pull/8/head
Sylvain LE GAL 10 years ago
parent
commit
ee8eb49d46
  1. 16
      module_parent_dependencies/__openerp__.py
  2. 20
      module_parent_dependencies/i18n/fr.po
  3. 45
      module_parent_dependencies/i18n/module_parent_dependencies.pot
  4. 21
      module_parent_dependencies/model/ir_module_module.py
  5. 8
      module_parent_dependencies/view/view.xml

16
module_parent_dependencies/__openerp__.py

@ -23,19 +23,19 @@
{
'name': 'Parent Dependencies of Modules',
'version': '0.1',
'summary': "allows to see the list of modules dependencies of a given"
" module, at the full depth of the dependency tree",
'summary': "allows to see the list of installed modules dependencies of"
" a given module, at the full depth of the dependency tree",
'category': 'Tools',
'description': """
allows to see the list of modules dependencies of a given module, at the"""
""" full depth of the dependency tree
========================================================================"""
"""==================================
allows to see the list of installed modules dependencies of a given module,
at the full depth of the dependency tree
===========================================================================
=========================================
Functionality:
--------------
* This module allows to see the list of modules dependencies of a"""
""" given module, at the full depth of the dependency tree.
* This module allows to see the list of installed modules dependencies of a
given module, at the full depth of the dependency tree.
Copyright, Authors and Licence:
-------------------------------

20
module_parent_dependencies/i18n/fr.po

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 7.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-07-09 15:55+0000\n"
"PO-Revision-Date: 2014-07-09 15:55+0000\n"
"POT-Creation-Date: 2014-10-19 20:38+0000\n"
"PO-Revision-Date: 2014-10-19 20:38+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -17,15 +17,19 @@ msgstr ""
#. module: module_parent_dependencies
#: view:ir.module.module:0
#: field:ir.module.module,direct_parent_ids:0
msgid "Direct Parent Modules"
msgstr "Modules Parents Directs"
#: field:ir.module.module,direct_installed_parent_ids:0
msgid "Direct Parent Installed Modules"
msgstr "Modules Parents Directs Installés"
#. module: module_parent_dependencies
#: view:ir.module.module:0
#: field:ir.module.module,all_parent_ids:0
msgid "Direct and Indirect Parent Modules"
msgstr "Modules Parents Directs et Indirectes"
msgid "Direct and Indirect Installed Parent Modules"
msgstr "Modules Parents Directs et Indirects Installés"
#. module: module_parent_dependencies
#: field:ir.module.module,all_installed_parent_ids:0
msgid "Direct and Indirect Parent Installed Modules"
msgstr "Modules Parents Directs et Indirects Installés"
#. module: module_parent_dependencies
#: code:_description:0

45
module_parent_dependencies/i18n/module_parent_dependencies.pot

@ -0,0 +1,45 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * module_parent_dependencies
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 7.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-10-19 20:40+0000\n"
"PO-Revision-Date: 2014-10-19 20:40+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: module_parent_dependencies
#: view:ir.module.module:0
#: field:ir.module.module,direct_installed_parent_ids:0
msgid "Direct Parent Installed Modules"
msgstr ""
#. module: module_parent_dependencies
#: view:ir.module.module:0
msgid "Direct and Indirect Installed Parent Modules"
msgstr ""
#. module: module_parent_dependencies
#: field:ir.module.module,all_installed_parent_ids:0
msgid "Direct and Indirect Parent Installed Modules"
msgstr ""
#. module: module_parent_dependencies
#: code:_description:0
#: model:ir.model,name:module_parent_dependencies.model_ir_module_module
#, python-format
msgid "Module"
msgstr ""
#. module: module_parent_dependencies
#: view:ir.module.module:0
msgid "Parent informations"
msgstr ""

21
module_parent_dependencies/model/ir_module_module.py

@ -28,20 +28,20 @@ class module(Model):
_inherit = 'ir.module.module'
# Field function Section
def _get_all_parent_ids(
def _get_all_installed_parent_ids(
self, cr, uid, ids, field_name, arg, context=None):
res = self._get_direct_parent_ids(
res = self._get_direct_installed_parent_ids(
cr, uid, ids, field_name, arg, context=context)
for id in ids:
parent_ids = list(res[id])
undirect_parent_ids = self._get_all_parent_ids(
undirect_parent_ids = self._get_all_installed_parent_ids(
cr, uid, res[id], field_name, arg, context=context)
for parent_id in parent_ids:
res[id] += undirect_parent_ids[parent_id]
res[id] = list(set(res[id]))
return res
def _get_direct_parent_ids(
def _get_direct_installed_parent_ids(
self, cr, uid, ids, field_name, arg, context=None):
res = {}
imd_obj = self.pool['ir.module.module.dependency']
@ -62,11 +62,12 @@ class module(Model):
# Column Section
_columns = {
'direct_parent_ids': fields.function(
_get_direct_parent_ids, type='many2many',
relation='ir.module.module', string='Direct Parent Modules'),
'all_parent_ids': fields.function(
_get_all_parent_ids, type='many2many',
'direct_installed_parent_ids': fields.function(
_get_direct_installed_parent_ids, type='many2many',
relation='ir.module.module',
string='Direct and Indirect Parent Modules'),
string='Direct Parent Installed Modules'),
'all_installed_parent_ids': fields.function(
_get_all_installed_parent_ids, type='many2many',
relation='ir.module.module',
string='Direct and Indirect Parent Installed Modules'),
}

8
module_parent_dependencies/view/view.xml

@ -27,10 +27,10 @@
<field name="arch" type="xml">
<notebook position="inside">
<page string="Parent informations">
<separator string="Direct Parent Modules" colspan="2"/>
<field name="direct_parent_ids" />
<separator string="Direct and Indirect Parent Modules" colspan="2"/>
<field name="all_parent_ids" />
<separator string="Direct Parent Installed Modules" colspan="2"/>
<field name="direct_installed_parent_ids" />
<separator string="Direct and Indirect Installed Parent Modules" colspan="2"/>
<field name="all_installed_parent_ids" />
</page>
</notebook>
</field>

Loading…
Cancel
Save