Skip to content

Commit

Permalink
Code Review
Browse files Browse the repository at this point in the history
  • Loading branch information
majouda committed Jul 22, 2024
1 parent ad7793d commit 936df06
Show file tree
Hide file tree
Showing 13 changed files with 35 additions and 38 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
name: Setup Log Folder For Reports
command: sudo mkdir -p .log && sudo chmod 777 .log

- run:
name: Run Test
command: docker-compose run --rm odoo run_pytest.sh
# - run:
# name: Run Test
# command: docker-compose run --rm odoo run_pytest.sh

# - run:
# name: Codacy Coverage
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ FROM quay.io/numigi/odoo-public:16.latest
LABEL maintainer="[email protected]"

USER root
ARG GIT_TOKEN

COPY .docker_files/test-requirements.txt .
RUN pip3 install -r test-requirements.txt
Expand Down
9 changes: 4 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
version: '3'
services:
odoo:
build:
context: .
dockerfile: Dockerfile
volumes:
- odoo-web-data:/var/lib/odoo
- odoo16-web-data:/var/lib/odoo
- ./.log:/var/log/odoo
ports:
- "8069:8069"
Expand All @@ -22,10 +21,10 @@ services:
- POSTGRES_USER=odoo
- PGDATA=/var/lib/postgresql/data/pgdata
volumes:
- odoo-db-data:/var/lib/postgresql/data/pgdata
- odoo16-db-data:/var/lib/postgresql/data/pgdata
expose:
- 5432

volumes:
odoo-web-data:
odoo-db-data:
odoo16-web-data:
odoo16-db-data:
2 changes: 1 addition & 1 deletion web_custom_label/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Numigi (tm) and all its contributors (https://bit.ly/numigiens)
# Copyright 2024 Numigi (tm) and all its contributors (https://bit.ly/numigiens)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

from . import models

Check notice on line 4 in web_custom_label/__init__.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

web_custom_label/__init__.py#L4

'.models' imported but unused (F401)
4 changes: 2 additions & 2 deletions web_custom_label/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Numigi (tm) and all its contributors (https://bit.ly/numigiens)
# Copyright 2024 Numigi (tm) and all its contributors (https://bit.ly/numigiens)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

{

Check warning on line 4 in web_custom_label/__manifest__.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

web_custom_label/__manifest__.py#L4

Statement seems to have no effect
Expand All @@ -10,7 +10,7 @@
"license": "LGPL-3",
"category": "Project",
"summary": "Enable easily customizing view labels.",
"depends": ["base"],
"depends": ["web"],
"data": [
"views/custom_label.xml",
"security/ir.model.access.csv",
Expand Down
36 changes: 17 additions & 19 deletions web_custom_label/i18n/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0+e\n"
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-17 19:52+0000\n"
"PO-Revision-Date: 2024-07-04 14:52-0500\n"
"Last-Translator: <>\n"
"POT-Creation-Date: 2024-07-22 01:40+0000\n"
"PO-Revision-Date: 2024-07-22 01:40+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
"X-Generator: Poedit 2.0.6\n"

#. module: web_custom_label
#: model:ir.model.fields,field_description:web_custom_label.field_web_custom_label__active
Expand Down Expand Up @@ -56,9 +54,9 @@ msgid "Display Name"
msgstr "Nom affiché"

#. module: web_custom_label
#: model:ir.model.fields.selection,name:web_custom_label.selection__web_custom_label__type___field
#: model_terms:ir.ui.view,arch_db:web_custom_label.custom_label_list
#: model_terms:ir.ui.view,arch_db:web_custom_label.custom_label_search
#: selection:web.custom.label,type_:0
msgid "Field"
msgstr "Champ"

Expand All @@ -68,22 +66,22 @@ msgid "Group By"
msgstr "Grouper par"

#. module: web_custom_label
#: selection:web.custom.label,position:0
#: model:ir.model.fields.selection,name:web_custom_label.selection__web_custom_label__position__help
msgid "Help"
msgstr "Aide"

#. module: web_custom_label
#: model:ir.model.fields,field_description:web_custom_label.field_web_custom_label__id
msgid "ID"
msgstr "ID"
msgstr ""

#. module: web_custom_label
#: model:ir.model.fields,field_description:web_custom_label.field_web_custom_label__key
msgid "Key"
msgstr "Clé"

#. module: web_custom_label
#: selection:web.custom.label,position:0
#: model:ir.model.fields.selection,name:web_custom_label.selection__web_custom_label__position__string
msgid "Label"
msgstr "Libellé"

Expand Down Expand Up @@ -114,24 +112,24 @@ msgid "Model"
msgstr "Modèle"

#. module: web_custom_label
#: selection:web.custom.label,position:0
#: model:ir.model.fields.selection,name:web_custom_label.selection__web_custom_label__position__placeholder
msgid "Placeholder"
msgstr "Texte substitution (placeholder)"
msgstr ""

#. module: web_custom_label
#: model:ir.model.fields,field_description:web_custom_label.field_web_custom_label__position
msgid "Position"
msgstr "Position"
msgstr ""

#. module: web_custom_label
#: model:ir.model.fields,field_description:web_custom_label.field_web_custom_label__reference
msgid "Reference"
msgstr "Référence"

#. module: web_custom_label
#: selection:web.custom.label,position:0
#: model:ir.model.fields.selection,name:web_custom_label.selection__web_custom_label__position__selection
msgid "Selection"
msgstr "Sélection"
msgstr ""

#. module: web_custom_label
#: model:ir.model.fields,field_description:web_custom_label.field_web_custom_label__term
Expand All @@ -141,7 +139,7 @@ msgstr "Terme"
#. module: web_custom_label
#: model_terms:ir.ui.view,arch_db:web_custom_label.custom_label_search
msgid "Type"
msgstr "Type"
msgstr ""

#. module: web_custom_label
#: model:ir.model.fields,field_description:web_custom_label.field_web_custom_label__type_
Expand All @@ -154,6 +152,6 @@ msgid "View"
msgstr "Vue"

#. module: web_custom_label
#: selection:web.custom.label,type_:0
#: model:ir.model.fields.selection,name:web_custom_label.selection__web_custom_label__type___xpath
msgid "Xpath"
msgstr "Xpath"
msgstr ""
2 changes: 1 addition & 1 deletion web_custom_label/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens)
# Copyright 2024 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

from . import (

Check notice on line 4 in web_custom_label/models/__init__.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

web_custom_label/models/__init__.py#L4

'.base' imported but unused (F401)
Expand Down
2 changes: 1 addition & 1 deletion web_custom_label/models/base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens)
# Copyright 2024 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

from odoo import api, models
Expand Down
2 changes: 1 addition & 1 deletion web_custom_label/models/common.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens)
# Copyright 2024 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

from typing import List, Mapping
Expand Down
2 changes: 1 addition & 1 deletion web_custom_label/models/ir_ui_view.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens)
# Copyright 2024 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

from lxml import etree

Check warning on line 4 in web_custom_label/models/ir_ui_view.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

web_custom_label/models/ir_ui_view.py#L4

Using etree to parse untrusted XML data is known to be vulnerable to XML attacks. Replace etree with the equivalent defusedxml package.
Expand Down
2 changes: 1 addition & 1 deletion web_custom_label/models/web_custom_label.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 - Today Numigi (tm) and all its contributors (https://bit.ly/numigiens)
# Copyright 2024 - Today Numigi (tm) and all its contributors (https://bit.ly/numigiens)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

from odoo import api, fields, models, modules, tools
Expand Down
3 changes: 2 additions & 1 deletion web_custom_label/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright 2023 Numigi (tm) and all its contributors (https://bit.ly/numigiens)
# Copyright 2024 Numigi (tm) and all its contributors (https://bit.ly/numigiens)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

from . import test_view_rendering
2 changes: 1 addition & 1 deletion web_custom_label/tests/test_view_rendering.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Numigi (tm) and all its contributors (https://bit.ly/numigiens)
# Copyright 2024 Numigi (tm) and all its contributors (https://bit.ly/numigiens)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

from ddt import data, ddt, unpack
Expand Down

0 comments on commit 936df06

Please sign in to comment.