Skip to content
Extraits de code Groupes Projets
Valider f616f9d9 rédigé par Rémi - Le Filament's avatar Rémi - Le Filament
Parcourir les fichiers

[MIG][16.0]

parent 3b901ffa
Branches
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -16,7 +16,7 @@ exclude: | ...@@ -16,7 +16,7 @@ exclude: |
(LICENSE.*|COPYING.*) (LICENSE.*|COPYING.*)
default_language_version: default_language_version:
python: python3 python: python3
node: "14.18.0" node: "16.17.0"
repos: repos:
- repo: local - repo: local
hooks: hooks:
...@@ -27,15 +27,20 @@ repos: ...@@ -27,15 +27,20 @@ repos:
entry: found forbidden files; remove them entry: found forbidden files; remove them
language: fail language: fail
files: "\\.rej$" files: "\\.rej$"
- id: en-po-files
name: en.po files cannot exist
entry: found a en.po file
language: fail
files: '[a-zA-Z0-9_]*/i18n/en\.po$'
- repo: https://github.com/oca/maintainer-tools - repo: https://github.com/oca/maintainer-tools
rev: dfba427ba03900b69e0a7f2c65890dc48921d36a rev: 4cd2b852214dead80822e93e6749b16f2785b2fe
hooks: hooks:
# update the NOT INSTALLABLE ADDONS section above # update the NOT INSTALLABLE ADDONS section above
- id: oca-update-pre-commit-excluded-addons - id: oca-update-pre-commit-excluded-addons
- id: oca-fix-manifest-website - id: oca-fix-manifest-website
args: ["https://le-filament.com"] args: ["https://le-filament.com"]
- repo: https://github.com/myint/autoflake - repo: https://github.com/myint/autoflake
rev: v1.4 rev: v1.6.1
hooks: hooks:
- id: autoflake - id: autoflake
args: args:
...@@ -46,22 +51,22 @@ repos: ...@@ -46,22 +51,22 @@ repos:
- --remove-duplicate-keys - --remove-duplicate-keys
- --remove-unused-variables - --remove-unused-variables
- repo: https://github.com/psf/black - repo: https://github.com/psf/black
rev: 22.3.0 rev: 22.8.0
hooks: hooks:
- id: black - id: black
- repo: https://github.com/pre-commit/mirrors-prettier - repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.4.1 rev: v2.7.1
hooks: hooks:
- id: prettier - id: prettier
name: prettier (with plugin-xml) name: prettier (with plugin-xml)
additional_dependencies: additional_dependencies:
- "prettier@2.4.1" - "prettier@2.7.1"
- "@prettier/plugin-xml@1.1.0" - "@prettier/plugin-xml@2.2.0"
args: args:
- --plugin=@prettier/plugin-xml - --plugin=@prettier/plugin-xml
files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$ files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
- repo: https://github.com/pre-commit/mirrors-eslint - repo: https://github.com/pre-commit/mirrors-eslint
rev: v7.32.0 rev: v8.24.0
hooks: hooks:
- id: eslint - id: eslint
verbose: true verbose: true
...@@ -69,7 +74,7 @@ repos: ...@@ -69,7 +74,7 @@ repos:
- --color - --color
- --fix - --fix
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1 rev: v4.3.0
hooks: hooks:
- id: trailing-whitespace - id: trailing-whitespace
# exclude autogenerated files # exclude autogenerated files
...@@ -91,12 +96,12 @@ repos: ...@@ -91,12 +96,12 @@ repos:
- id: mixed-line-ending - id: mixed-line-ending
args: ["--fix=lf"] args: ["--fix=lf"]
- repo: https://github.com/asottile/pyupgrade - repo: https://github.com/asottile/pyupgrade
rev: v2.29.0 rev: v2.38.2
hooks: hooks:
- id: pyupgrade - id: pyupgrade
args: ["--keep-percent-format"] args: ["--keep-percent-format"]
- repo: https://github.com/PyCQA/isort - repo: https://github.com/PyCQA/isort
rev: 5.9.3 rev: 5.10.1
hooks: hooks:
- id: isort - id: isort
name: isort except __init__.py name: isort except __init__.py
......
[MASTER] [MASTER]
load-plugins=pylint_odoo load-plugins=pylint_odoo
score=n score=n
...@@ -8,7 +10,7 @@ manifest_required_authors=Le Filament ...@@ -8,7 +10,7 @@ manifest_required_authors=Le Filament
manifest_required_keys=license manifest_required_keys=license
manifest_deprecated_keys=description,active manifest_deprecated_keys=description,active
license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3 license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3
valid_odoo_versions=15.0 valid_odoo_versions=16.0
[MESSAGES CONTROL] [MESSAGES CONTROL]
disable=all disable=all
...@@ -96,6 +98,7 @@ enable=anomalous-backslash-in-string, ...@@ -96,6 +98,7 @@ enable=anomalous-backslash-in-string,
xml-attribute-translatable, xml-attribute-translatable,
xml-deprecated-qweb-directive, xml-deprecated-qweb-directive,
xml-deprecated-tree-attribute, xml-deprecated-tree-attribute,
external-request-timeout,
# messages that do not cause the lint step to fail # messages that do not cause the lint step to fail
consider-merging-classes-inherited, consider-merging-classes-inherited,
create-user-wo-reset-password, create-user-wo-reset-password,
......
[MASTER] [MASTER]
load-plugins=pylint_odoo load-plugins=pylint_odoo
score=n score=n
...@@ -8,7 +9,7 @@ manifest_required_authors=Le Filament ...@@ -8,7 +9,7 @@ manifest_required_authors=Le Filament
manifest_required_keys=license manifest_required_keys=license
manifest_deprecated_keys=description,active manifest_deprecated_keys=description,active
license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3 license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3
valid_odoo_versions=15.0 valid_odoo_versions=16.0
[MESSAGES CONTROL] [MESSAGES CONTROL]
disable=all disable=all
...@@ -88,7 +89,8 @@ enable=anomalous-backslash-in-string, ...@@ -88,7 +89,8 @@ enable=anomalous-backslash-in-string,
website-manifest-key-not-valid-uri, website-manifest-key-not-valid-uri,
xml-attribute-translatable, xml-attribute-translatable,
xml-deprecated-qweb-directive, xml-deprecated-qweb-directive,
xml-deprecated-tree-attribute xml-deprecated-tree-attribute,
external-request-timeout
[REPORTS] [REPORTS]
msg-template={path}:{line}: [{msg_id}({symbol}), {obj}] {msg} msg-template={path}:{line}: [{msg_id}({symbol}), {obj}] {msg}
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"summary": "Gestion des mise en production logicielles", "summary": "Gestion des mise en production logicielles",
"author": "Le Filament", "author": "Le Filament",
"website": "https://le-filament.com", "website": "https://le-filament.com",
"version": "15.0.1.0.1", "version": "16.0.1.0.0",
"license": "AGPL-3", "license": "AGPL-3",
"depends": [ "depends": [
"web", "web",
......
...@@ -9,5 +9,7 @@ class BannerController(http.Controller): ...@@ -9,5 +9,7 @@ class BannerController(http.Controller):
@http.route(["/lefilament_release/header"], type="json", auth="user") @http.route(["/lefilament_release/header"], type="json", auth="user")
def release_header(self): def release_header(self):
return { return {
"html": request.env.ref("lefilament_release.header_template")._render({}) "html": request.env["ir.qweb"]._render(
"lefilament_release.header_template", {}
)
} }
...@@ -105,10 +105,12 @@ class PartnerRelease(models.Model): ...@@ -105,10 +105,12 @@ class PartnerRelease(models.Model):
# ------------------------------------------------------ # ------------------------------------------------------
# CRUD methods (ORM overrides) # CRUD methods (ORM overrides)
# ------------------------------------------------------ # ------------------------------------------------------
@api.model @api.model_create_multi
def create(self, vals): @api.returns("self", lambda value: value.id)
def create(self, vals_list):
for vals in vals_list:
vals["access_token"] = str(uuid.uuid4()) vals["access_token"] = str(uuid.uuid4())
return super().create(vals) return super().create(vals_list)
# ------------------------------------------------------ # ------------------------------------------------------
# Actions # Actions
......
...@@ -26,7 +26,7 @@ class MultiPartnerReleaseWizard(models.TransientModel): ...@@ -26,7 +26,7 @@ class MultiPartnerReleaseWizard(models.TransientModel):
) )
release_date = fields.Datetime( release_date = fields.Datetime(
string="Date de mise en production", string="Date de mise en production",
default=fields.Datetime.now(), default=lambda self: fields.Date.today(),
) )
release_module_ids = fields.One2many( release_module_ids = fields.One2many(
comodel_name="multi.partner.release.line.wizard", comodel_name="multi.partner.release.line.wizard",
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter