The imports are ordered as
1. External libraries (one per line sorted and split in python stdlib)
2. Imports of openerp
3. Imports from Odoo modules (rarely, and only if necessary)
Inside these 3 groups, the imported lines are alphabetically sorted.
For example is you can see below code.
# 1 : imports of python lib
import base64
import re
import time
# 2 : imports of openerp
import openerp
from openerp import api, fields, models # alphabetically ordered
from openerp.tools.safe_eval import safe_eval as eval
from openerp.tools.translate import _
# 3 : imports from odoo modules
from openerp.addons.website.models.website import slug
from openerp.addons.web.controllers.main import login_redirect
Note-Imports from Odoo modules (rarely, and only if necessary)
0 Comment(s)