[MIG] website_crm : migration to new api
This commit is contained in:
@@ -1,2 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import controllers
|
||||
import models
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from openerp import http
|
||||
from openerp.http import request
|
||||
from dateutil.relativedelta import relativedelta
|
||||
from datetime import datetime, date, timedelta
|
||||
from math import floor
|
||||
import time
|
||||
import operator
|
||||
import babel
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from openerp.addons.website.controllers.backend import WebsiteBackend
|
||||
from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT, DEFAULT_SERVER_DATE_FORMAT
|
||||
import babel
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
from odoo import http
|
||||
from odoo.http import request
|
||||
|
||||
from odoo.addons.website.controllers.backend import WebsiteBackend
|
||||
from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT, DEFAULT_SERVER_DATE_FORMAT
|
||||
|
||||
|
||||
class WebsiteCrmBackend(WebsiteBackend):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="crm.model_crm_lead" model="ir.model">
|
||||
<record id="crm.model_crm_lead" model="ir.model">
|
||||
<field name="website_form_default_field_id" ref="crm.field_crm_lead_description" />
|
||||
<field name="website_form_access">True</field>
|
||||
<field name="website_form_label">Create a lead</field>
|
||||
@@ -36,4 +36,4 @@
|
||||
<field name="use_opportunities" eval="False"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
</odoo>
|
||||
|
||||
@@ -1 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import crm_lead
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
from openerp import models, SUPERUSER_ID
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import models
|
||||
|
||||
|
||||
class Lead(models.Model):
|
||||
_inherit = 'crm.lead'
|
||||
|
||||
@@ -1 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import test_website_crm
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
from openerp.api import Environment
|
||||
import openerp.tests
|
||||
@openerp.tests.common.at_install(False)
|
||||
@openerp.tests.common.post_install(True)
|
||||
class TestWebsiteCrm(openerp.tests.HttpCase):
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo.api import Environment
|
||||
import odoo.tests
|
||||
|
||||
|
||||
@odoo.tests.common.at_install(False)
|
||||
@odoo.tests.common.post_install(True)
|
||||
class TestWebsiteCrm(odoo.tests.HttpCase):
|
||||
|
||||
def test_tour(self):
|
||||
self.phantom_js("/", "odoo.__DEBUG__.services['web.Tour'].run('website_crm_tour', 'test')", "odoo.__DEBUG__.services['web.Tour'].tours.website_crm_tour")
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<odoo>
|
||||
<template id="contactus_form" name="Contact Form" inherit_id="website.contactus" customize_show="True">
|
||||
<xpath expr="//div[@name='mail_button']" position="replace">
|
||||
<div>
|
||||
@@ -97,5 +96,4 @@
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user