[FIX] models.py: remove leftover import crm like compatibility

Historically, it was possible to import addons via a naked import. It is
no more possible since 9e1f13bac, since that commit, the only possible
way to import odoo addons is via the `import odoo.addons' prefix.

closes odoo/odoo#46995

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
This commit is contained in:
Julien Castiaux
2020-05-14 14:40:02 +00:00
committed by Raphael Collet
parent 975deb21da
commit d6d0e8d6d2
9 changed files with 16 additions and 29 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
from odoo import http
from odoo.http import request
from addons.google_calendar.utils.google_calendar import GoogleCalendarService
from odoo.addons.google_calendar.utils.google_calendar import GoogleCalendarService
class GoogleCalendarController(http.Controller):
@@ -5,7 +5,7 @@ import re
from odoo import api, fields, models
from addons.google_calendar.utils.google_calendar import GoogleCalendarService
from odoo.addons.google_calendar.utils.google_calendar import GoogleCalendarService
class RecurrenceRule(models.Model):
+3 -3
View File
@@ -13,9 +13,9 @@ from odoo.tools import ormcache_context
from odoo.exceptions import UserError
from odoo.osv import expression
from addons.google_calendar.utils.google_event import GoogleEvent
from addons.google_calendar.utils.google_calendar import GoogleCalendarService
from addons.google_account.models.google_service import TIMEOUT
from odoo.addons.google_calendar.utils.google_event import GoogleEvent
from odoo.addons.google_calendar.utils.google_calendar import GoogleCalendarService
from odoo.addons.google_account.models.google_service import TIMEOUT
_logger = logging.getLogger(__name__)
+2 -2
View File
@@ -3,7 +3,7 @@
import logging
import requests
from addons.google_calendar.models.google_sync import google_calendar_token
from odoo.addons.google_calendar.models.google_sync import google_calendar_token
from datetime import timedelta
@@ -11,7 +11,7 @@ from odoo import api, fields, models, _
from odoo.exceptions import UserError
from odoo.loglevels import exception_to_unicode
from odoo.addons.google_account.models.google_service import GOOGLE_TOKEN_ENDPOINT
from addons.google_calendar.utils.google_calendar import GoogleCalendarService, InvalidSyncToken
from odoo.addons.google_calendar.utils.google_calendar import GoogleCalendarService, InvalidSyncToken
_logger = logging.getLogger(__name__)
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from addons.google_calendar.utils.google_calendar import GoogleEvent
from odoo.addons.google_calendar.utils.google_calendar import GoogleEvent
import pytz
from datetime import datetime, date
from odoo.tests.common import SavepointCase, new_test_user
@@ -10,7 +10,7 @@ from odoo.addons.google_calendar.utils.google_calendar import GoogleCalendarServ
from odoo.addons.google_calendar.models.res_users import User
from odoo.addons.google_calendar.models.google_sync import GoogleSync
from odoo.modules.registry import Registry
from addons.google_account.models.google_service import TIMEOUT
from odoo.addons.google_account.models.google_service import TIMEOUT
def patch_api(func):
@@ -8,8 +8,8 @@ import logging
from odoo import api, _
from odoo.tools import exception_to_unicode
from addons.google_calendar.utils.google_event import GoogleEvent
from addons.google_account.models.google_service import TIMEOUT
from odoo.addons.google_calendar.utils.google_event import GoogleEvent
from odoo.addons.google_account.models.google_service import TIMEOUT
_logger = logging.getLogger(__name__)
@@ -3,8 +3,8 @@
from odoo import fields, models
from addons.google_calendar.models.google_sync import google_calendar_token
from addons.google_calendar.utils.google_calendar import GoogleCalendarService
from odoo.addons.google_calendar.models.google_sync import google_calendar_token
from odoo.addons.google_calendar.utils.google_calendar import GoogleCalendarService
class ResetGoogleAccount(models.TransientModel):