Skip to content

Commit ce59307

Browse files
committed
Merge PR #123 into 16.0
Signed-off-by pedrobaeza
2 parents c044ba2 + 80a6aa4 commit ce59307

File tree

6 files changed

+41
-12
lines changed

6 files changed

+41
-12
lines changed

github_connector_odoo/i18n/es.po

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@ msgid ""
66
msgstr ""
77
"Project-Id-Version: Odoo Server 15.0\n"
88
"Report-Msgid-Bugs-To: \n"
9-
"PO-Revision-Date: 2023-08-18 08:49+0000\n"
9+
"POT-Creation-Date: 2024-03-13 11:14+0000\n"
10+
"PO-Revision-Date: 2024-03-13 12:14+0100\n"
1011
"Last-Translator: Víctor Martínez <victor.martinez@tecnativa.com>\n"
1112
"Language-Team: none\n"
1213
"Language: es\n"
1314
"MIME-Version: 1.0\n"
1415
"Content-Type: text/plain; charset=UTF-8\n"
15-
"Content-Transfer-Encoding: \n"
16+
"Content-Transfer-Encoding: 8bit\n"
1617
"Plural-Forms: nplurals=2; plural=n != 1;\n"
17-
"X-Generator: Weblate 4.17\n"
18+
"X-Generator: Poedit 3.0.1\n"
1819

1920
#. module: github_connector_odoo
2021
#: model:ir.model.fields,field_description:github_connector_odoo.field_odoo_module_version_rule_info__code_count
@@ -388,6 +389,12 @@ msgstr "Licencia (Manifiesto)"
388389
msgid "Localization"
389390
msgstr "Localización"
390391

392+
#. module: github_connector_odoo
393+
#: model:ir.model.fields,field_description:github_connector_odoo.field_odoo_module__maintainers
394+
#: model:ir.model.fields,field_description:github_connector_odoo.field_odoo_module_version__maintainers
395+
msgid "Maintainers (Manifest)"
396+
msgstr "Mantenedores (Manifiesto)"
397+
391398
#. module: github_connector_odoo
392399
#: model:ir.model.fields,field_description:github_connector_odoo.field_github_analysis_rule__manifest_key_ids
393400
#: model:ir.model.fields,field_description:github_connector_odoo.field_github_repository_branch_rule_info_report__manifest_key_ids
@@ -822,12 +829,3 @@ msgstr "Sitio web (Manifiesto)"
822829
#: model_terms:ir.ui.view,arch_db:github_connector_odoo.view_odoo_module_search
823830
msgid "With Version"
824831
msgstr "Con versión"
825-
826-
#~ msgid "# String"
827-
#~ msgstr "# Cadena"
828-
829-
#~ msgid "String Count"
830-
#~ msgstr "Total de cadenas"
831-
832-
#~ msgid "Total string"
833-
#~ msgstr "Total cadena"

github_connector_odoo/i18n/github_connector_odoo.pot

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ msgid ""
66
msgstr ""
77
"Project-Id-Version: Odoo Server 16.0\n"
88
"Report-Msgid-Bugs-To: \n"
9+
"POT-Creation-Date: 2024-03-13 11:14+0000\n"
10+
"PO-Revision-Date: 2024-03-13 11:14+0000\n"
911
"Last-Translator: \n"
1012
"Language-Team: \n"
1113
"MIME-Version: 1.0\n"
@@ -385,6 +387,12 @@ msgstr ""
385387
msgid "Localization"
386388
msgstr ""
387389

390+
#. module: github_connector_odoo
391+
#: model:ir.model.fields,field_description:github_connector_odoo.field_odoo_module__maintainers
392+
#: model:ir.model.fields,field_description:github_connector_odoo.field_odoo_module_version__maintainers
393+
msgid "Maintainers (Manifest)"
394+
msgstr ""
395+
388396
#. module: github_connector_odoo
389397
#: model:ir.model.fields,field_description:github_connector_odoo.field_github_analysis_rule__manifest_key_ids
390398
#: model:ir.model.fields,field_description:github_connector_odoo.field_github_repository_branch_rule_info_report__manifest_key_ids

github_connector_odoo/models/odoo_module.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ class OdooModule(models.Model):
4444
string="Authors (Text)", compute="_compute_author", store=True
4545
)
4646

47+
maintainers = fields.Char(
48+
string="Maintainers (Manifest)", compute="_compute_maintainers", store=True
49+
)
50+
4751
organization_serie_ids = fields.Many2many(
4852
string="Series",
4953
comodel_name="github.organization.serie",
@@ -155,6 +159,16 @@ def _compute_author(self):
155159
module.author_ids = [x.id for x in authors]
156160
module.author_ids_description = ", ".join(sorted(x.name for x in authors))
157161

162+
@api.depends("module_version_ids.maintainers")
163+
def _compute_maintainers(self):
164+
for module in self:
165+
maintainers = []
166+
for version in module.module_version_ids.filtered("maintainers"):
167+
for maintainer in version.maintainers.split(","):
168+
if maintainer not in maintainers:
169+
maintainers.append(maintainer)
170+
module.maintainers = ", ".join(maintainers)
171+
158172
@api.depends("module_version_ids.organization_serie_id")
159173
def _compute_organization_serie(self):
160174
for module in self:

github_connector_odoo/models/odoo_module_version.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ class OdooModuleVersion(models.Model):
151151
string="Authors (Text)", compute="_compute_author", store=True
152152
)
153153

154+
maintainers = fields.Char(string="Maintainers (Manifest)", readonly=True)
155+
154156
lib_python_ids = fields.Many2many(
155157
comodel_name="odoo.lib.python",
156158
string="Python Lib Dependencies",
@@ -439,6 +441,7 @@ def manifest_2_odoo(self, info, repository_branch, module):
439441
"description_rst": info["description"],
440442
"external_dependencies": info.get("external_dependencies", {}),
441443
"author": ",".join([x.strip() for x in sorted(author_list) if x.strip()]),
444+
"maintainers": ",".join(info.get("maintainers", [])),
442445
"depends": ",".join([x for x in sorted(info["depends"]) if x]),
443446
"manifest_keys": ",".join([x for x in sorted(manifest_keys) if x]),
444447
"repository_branch_id": repository_branch.id,

github_connector_odoo/views/view_odoo_module.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
1212
<field name="name" />
1313
<field name="technical_name" />
1414
<field name="author_ids" />
15+
<field name="maintainers" />
1516
<field name="organization_serie_ids" />
1617
<field name="description_rst" />
1718
<filter
@@ -30,6 +31,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3031
<field name="name" />
3132
<field name="organization_serie_ids_description" />
3233
<field name="author_ids_description" />
34+
<field name="maintainers" />
3335
<field name="module_version_qty" />
3436
</tree>
3537
</field>
@@ -85,6 +87,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
8587
string="Available for"
8688
/>
8789
<field name="author_ids" widget="many2many_tags" />
90+
<field name="maintainers" />
8891
</group>
8992
<notebook>
9093
<page string="Descriptions">

github_connector_odoo/views/view_odoo_module_version.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
1919
<field name="repository_id" />
2020
<field name="license_id" />
2121
<field name="author_ids" />
22+
<field name="maintainers" />
2223
<field name="organization_serie_id" />
2324
<group expand="0" string="Group By">
2425
<filter
@@ -54,6 +55,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
5455
<field name="technical_name" />
5556
<field name="name" />
5657
<field name="author_ids_description" />
58+
<field name="maintainers" />
5759
<field name="lib_python_ids_description" string="Python Lib" />
5860
<field name="lib_bin_ids_description" string="Bin Lib" />
5961
<field name="license_id" />
@@ -115,6 +117,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
115117
<page string="Technical information (Manifest)">
116118
<group col="4">
117119
<field name="author" />
120+
<field name="maintainers" />
118121
<field name="license" />
119122
<field name="website" />
120123
<field name="manifest_keys" />

0 commit comments

Comments
 (0)