From 294174dad96419414a1e28d101aea96fd8375f01 Mon Sep 17 00:00:00 2001 From: Harsh Modi Date: Fri, 7 Feb 2025 05:59:54 +0000 Subject: [PATCH] [FIX] coding_guidelines: fix the alphabetic orders for the import In odoo, as we suggest everyone to follow an alphebetic order. The translator(`_`), ASCII is 95 and `a` ASCII value is 97 which '_' < 'a', the translator should be defined first in the import before the `api` not at the end of the import This commits adds an example to import static class `Command` with a Capital alphabet with a ASCII value of `C` as 67 which will be before than the `_` 'C' < '_' < 'a' This order of import should be followed while the import closes odoo/documentation#11989 X-original-commit: c7a6b67a870a9aa1f30b28895310675346fcb8a6 Signed-off-by: Antoine Vandevenne (anv) Signed-off-by: Harsh Modi (hamo) --- content/contributing/development/coding_guidelines.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/contributing/development/coding_guidelines.rst b/content/contributing/development/coding_guidelines.rst index d473fa63b..3e309d3cd 100644 --- a/content/contributing/development/coding_guidelines.rst +++ b/content/contributing/development/coding_guidelines.rst @@ -425,7 +425,7 @@ Inside these 3 groups, the imported lines are alphabetically sorted. from datetime import datetime # 2 : imports of odoo import odoo - from odoo import api, fields, models, _ # alphabetically ordered + from odoo import Command, _, api, fields, models # alphabetically ordered from odoo.tools.safe_eval import safe_eval as eval # 3 : imports from odoo addons from odoo.addons.web.controllers.main import login_redirect