[MIG] website_portal*: migration to new api
Those modules were almost already migrated, this commit simply modified the import and the xml tags.
This commit is contained in:
@@ -1 +1,4 @@
|
||||
import controllers
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import controllers
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
{
|
||||
'name': 'Website Portal',
|
||||
'category': 'Website',
|
||||
|
||||
@@ -1 +1,4 @@
|
||||
import main
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import main
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from openerp import http
|
||||
from openerp.http import request
|
||||
from openerp import tools
|
||||
from openerp.tools.translate import _
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import http
|
||||
from odoo.http import request
|
||||
from odoo import tools
|
||||
from odoo.tools.translate import _
|
||||
|
||||
from odoo.fields import Date
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
{
|
||||
'name': 'Website Portal for Sales',
|
||||
'category': 'Website',
|
||||
|
||||
@@ -1 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import main
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import datetime
|
||||
|
||||
from openerp import http
|
||||
from openerp.exceptions import AccessError
|
||||
from openerp.http import request
|
||||
from odoo import http
|
||||
from odoo.exceptions import AccessError
|
||||
from odoo.http import request
|
||||
|
||||
from openerp.addons.website_portal.controllers.main import website_account
|
||||
from odoo.addons.website_portal.controllers.main import website_account
|
||||
|
||||
|
||||
class website_account(website_account):
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from openerp import api, models
|
||||
from odoo import api, models
|
||||
|
||||
|
||||
class sale_order(models.Model):
|
||||
class SaleOrder(models.Model):
|
||||
|
||||
_inherit = 'sale.order'
|
||||
|
||||
@api.multi
|
||||
@@ -13,7 +14,7 @@ class sale_order(models.Model):
|
||||
of the classic form view, redirect to the online quote if exists. """
|
||||
self.ensure_one()
|
||||
if self.state in ['draft', 'cancel']:
|
||||
return super(sale_order, self).get_access_action()
|
||||
return super(SaleOrder, self).get_access_action()
|
||||
return {
|
||||
'type': 'ir.actions.act_url',
|
||||
'url': '/my/orders/%s' % self.id,
|
||||
|
||||
Reference in New Issue
Block a user