diff options
| author | DramixDw <rve@odoo.com> | 2020-04-22 20:40:45 +0000 |
|---|---|---|
| committer | Jeremy Kersten <jke@odoo.com> | 2020-05-01 07:58:11 +0000 |
| commit | 52c23e01e3592126b4b4d6bde75e25594f203a99 (patch) | |
| tree | 800cf209d7cd3987d9846b51af8cbf5ab3e7f3ea /addons | |
| parent | 919185f9eb8e336d8ede3fd1855b8cca69dcdd50 (diff) | |
[REM] website,*: remove About us page and references
Remove the default about us page because it could be easily recreated and
doesn't add a lot of value to the website.
task-2189613
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/website/data/website_data.xml | 49 | ||||
| -rw-r--r-- | addons/website/static/tests/tours/html_editor.js | 12 | ||||
| -rw-r--r-- | addons/website/tests/test_ui.py | 35 | ||||
| -rw-r--r-- | addons/website/views/snippets/s_carousel.xml | 1 | ||||
| -rw-r--r-- | addons/website/views/snippets/s_cover.xml | 1 | ||||
| -rw-r--r-- | addons/website/views/website_templates.xml | 6 | ||||
| -rw-r--r-- | addons/website_hr_recruitment/data/hr_job_demo.xml | 42 | ||||
| -rw-r--r-- | addons/website_hr_recruitment/views/website_hr_recruitment_templates.xml | 7 | ||||
| -rw-r--r-- | addons/website_links/static/tests/tours/website_links.js | 8 | ||||
| -rw-r--r-- | addons/website_livechat/tests/test_livechat_basic_flow.py | 10 | ||||
| -rw-r--r-- | addons/website_sale/static/tests/tours/website_sale_buy.js | 4 | ||||
| -rw-r--r-- | addons/website_slides/data/slide_slide_demo.xml | 2 |
12 files changed, 41 insertions, 136 deletions
diff --git a/addons/website/data/website_data.xml b/addons/website/data/website_data.xml index 6eeb05326f8..a3ab74c5f1d 100644 --- a/addons/website/data/website_data.xml +++ b/addons/website/data/website_data.xml @@ -63,48 +63,6 @@ </t> </field> </record> - - <record id="aboutus" model="ir.ui.view"> - <field name="name">About us</field> - <field name="type">qweb</field> - <field name="key">website.aboutus</field> - <field name="arch" type="xml"> - <t name="About us" t-name="website.aboutus"> - <t t-call="website.layout"> - <div id="wrap"> - <div class="oe_structure"> - <section class="s_title pt24 pb24" data-vcss="001" data-snippet="s_title"> - <div class="container"> - <h1 class="text-center">About us</h1> - <h3 class="text-muted text-center">Great products for great people</h3> - </div> - </section> - <section class="s_text_image pt8 pb8" data-snippet="s_text_image"> - <div class="container"> - <div class="row align-items-center"> - <div class="col-lg-6 pt16 pb16"> - <p> - We are a team of passionate people whose goal is to improve everyone's - life through disruptive products. We build great products to solve your - business problems. - </p> - <p> - Our products are designed for small to medium size companies willing to optimize - their performance. - </p> - </div> - <div class="col-lg-6 pt16 pb16"> - <img src="/website/static/src/img/library/business_conference.jpg" class="img img-fluid shadow" alt=""/> - </div> - </div> - </div> - </section> - </div> - </div> - </t> - </t> - </field> - </record> </data> <template id="cookie_policy" name="Cookie Policy"> @@ -246,13 +204,6 @@ <field name="view_id" ref="contactus"/> <field name="track">True</field> </record> - <record id="aboutus_page" model="website.page"> - <field name="is_published">True</field> - <field name="url">/aboutus</field> - <field name="view_id" ref="aboutus"/> - <field name="track">True</field> - </record> - <!-- Default Menu to store module menus for new website --> <record id="main_menu" model="website.menu"> <field name="name">Default Main Menu</field> diff --git a/addons/website/static/tests/tours/html_editor.js b/addons/website/static/tests/tours/html_editor.js index a7eda78f6ef..22742df39e1 100644 --- a/addons/website/static/tests/tours/html_editor.js +++ b/addons/website/static/tests/tours/html_editor.js @@ -5,7 +5,7 @@ var tour = require('web_tour.tour'); tour.register('html_editor_multiple_templates', { test: true, - url: '/aboutus', + url: '/generic', }, [ // 1. Edit the page through Edit Mode, it will COW the view @@ -24,7 +24,7 @@ tour.register('html_editor_multiple_templates', { extra_trigger: '#oe_structure_test_ui.o_dirty', trigger: "#web_editor-top-edit button[data-action=save]", }, - // 2. Edit generic aboutus view + // 2. Edit generic view { content: "open customize menu", extra_trigger: "body:not(.editor_enable)", @@ -35,8 +35,8 @@ tour.register('html_editor_multiple_templates', { trigger: '#html_editor', }, { - content: "add something in the aboutus view", - trigger: 'div.ace_line .ace_xml:contains("aboutus")', + content: "add something in the generic view", + trigger: 'div.ace_line .ace_xml:contains("Generic")', run: function () { ace.edit('ace-view-editor').getSession().insert({row: 3, column: 1}, '<p>somenewcontent</p>\n'); }, @@ -52,7 +52,7 @@ tour.register('html_editor_multiple_templates', { }, { content: "add something in the oe_structure specific view", - extra_trigger: '#ace-view-id:contains("website.aboutus_oe_structure_test_ui")', // If no xml_id it should show key + extra_trigger: '#ace-view-id:contains("test.generic_view_oe_structure_test_ui")', // If no xml_id it should show key trigger: 'div.ace_line .ace_xml:contains("s_cover")', run: function () { ace.edit('ace-view-editor').getSession().insert({row: 2, column: 1}, '<p>anothernewcontent</p>\n'); @@ -74,7 +74,7 @@ tour.register('html_editor_multiple_templates', { tour.register('test_html_editor_scss', { test: true, - url: '/aboutus', + url: '/contactus', }, [ // 1. Open Html Editor and select a scss file diff --git a/addons/website/tests/test_ui.py b/addons/website/tests/test_ui.py index 78f20e62d71..ec538bf7903 100644 --- a/addons/website/tests/test_ui.py +++ b/addons/website/tests/test_ui.py @@ -61,24 +61,39 @@ class TestUiHtmlEditor(odoo.tests.HttpCase): def test_html_editor_multiple_templates(self): Website = self.env['website'] View = self.env['ir.ui.view'] - generic_aboutus = Website.viewref('website.aboutus') + Page = self.env['website.page'] + + self.generic_view = View.create({ + 'name': 'Generic', + 'type': 'qweb', + 'arch': ''' + <div>content</div> + ''', + 'key': 'test.generic_view', + }) + + self.generic_page = Page.create({ + 'view_id': self.generic_view.id, + 'url': '/generic', + }) + + generic_page = Website.viewref('test.generic_view') # Use an empty page layout with oe_structure id for this test oe_structure_layout = ''' - <t name="About us" t-name="website.aboutus"> + <t name="Generic" t-name="test.generic_view"> <t t-call="website.layout"> - <p>aboutus</p> <div id="oe_structure_test_ui" class="oe_structure oe_empty"/> </t> </t> ''' - generic_aboutus.arch = oe_structure_layout + generic_page.arch = oe_structure_layout self.start_tour("/", 'html_editor_multiple_templates', login='admin') - self.assertEqual(View.search_count([('key', '=', 'website.aboutus')]), 2, "Aboutus view should have been COW'd") - self.assertTrue(generic_aboutus.arch == oe_structure_layout, "Generic Aboutus view should be untouched") - self.assertEqual(len(generic_aboutus.inherit_children_ids.filtered(lambda v: 'oe_structure' in v.name)), 0, "oe_structure view should have been deleted when aboutus was COW") - specific_aboutus = Website.with_context(website_id=1).viewref('website.aboutus') - self.assertTrue(specific_aboutus.arch != oe_structure_layout, "Specific Aboutus view should have been changed") - self.assertEqual(len(specific_aboutus.inherit_children_ids.filtered(lambda v: 'oe_structure' in v.name)), 1, "oe_structure view should have been created on the specific tree") + self.assertEqual(View.search_count([('key', '=', 'test.generic_view')]), 2, "homepage view should have been COW'd") + self.assertTrue(generic_page.arch == oe_structure_layout, "Generic homepage view should be untouched") + self.assertEqual(len(generic_page.inherit_children_ids.filtered(lambda v: 'oe_structure' in v.name)), 0, "oe_structure view should have been deleted when aboutus was COW") + specific_page = Website.with_context(website_id=1).viewref('test.generic_view') + self.assertTrue(specific_page.arch != oe_structure_layout, "Specific homepage view should have been changed") + self.assertEqual(len(specific_page.inherit_children_ids.filtered(lambda v: 'oe_structure' in v.name)), 1, "oe_structure view should have been created on the specific tree") def test_html_editor_scss(self): self.start_tour("/", 'test_html_editor_scss', login='admin') diff --git a/addons/website/views/snippets/s_carousel.xml b/addons/website/views/snippets/s_carousel.xml index f081c71dd23..8564998a4b9 100644 --- a/addons/website/views/snippets/s_carousel.xml +++ b/addons/website/views/snippets/s_carousel.xml @@ -20,7 +20,6 @@ <h2><font style="font-size: 62px;">Slide Title</font></h2> <p class="lead">Use this snippet to presents your content in a slideshow-like format.<br/> Don't write about products or services here, write about solutions.</p> <p> - <a href="/aboutus" class="btn btn-alpha">About us</a> <a href="/contactus" class="btn btn-beta">Contact us</a> </p> </div> diff --git a/addons/website/views/snippets/s_cover.xml b/addons/website/views/snippets/s_cover.xml index 3b8c024a7ba..24226f734e3 100644 --- a/addons/website/views/snippets/s_cover.xml +++ b/addons/website/views/snippets/s_cover.xml @@ -8,7 +8,6 @@ <h1 style="text-align: center;"><font style="font-size: 62px; font-weight: bold;">Catchy Headline</font></h1> <p class="lead" style="text-align: center;">Write one or two paragraphs describing your product, services or a specific feature.<br/> To be successful your content needs to be useful to your readers.</p> <p style="text-align: center;"> - <a href="/aboutus" class="btn btn-alpha">About us</a> <a href="/contactus" class="btn btn-beta">Contact us</a> </p> </div> diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml index a1fc79b418e..921317cb3bb 100644 --- a/addons/website/views/website_templates.xml +++ b/addons/website/views/website_templates.xml @@ -328,7 +328,6 @@ <div class="o_footer_about_us"> <h5> <span>YourCompany</span> - <small> - <a href="/aboutus">About us</a></small> </h5> <p> We are a team of passionate people whose goal is to improve everyone's @@ -366,7 +365,6 @@ <div class="o_footer_about_us"> <h5> <span>YourCompany</span> - <small> - <a href="/aboutus">About us</a></small> </h5> <p> We are a team of passionate people whose goal is to improve everyone's @@ -413,7 +411,6 @@ <ul class="list-inline"> <li class="list-inline-item"><a href="/">Home</a></li> <li class="list-inline-item"><a href="/contactus">Contact us</a></li> - <li class="list-inline-item"><a href="/aboutus">About us</a></li> </ul> <div class="o_footer_address"> 250 Executive Park Blvd, Suite 3400<br/>San Francisco CA 94134<br/>United States @@ -452,11 +449,10 @@ <ul class="list-inline"> <li class="list-inline-item"><a href="/">Home</a></li> <li class="list-inline-item"><a href="/contactus">Contact us</a></li> - <li class="list-inline-item"><a href="/aboutus">About us</a></li> </ul> </div> <div class="col-lg-6 text-lg-right"> - <p class="text-lg-right"> + <p> We are a team of passionate people whose goal is to improve everyone's life through disruptive products. We build great products to solve your business problems. Our products are designed for small to medium size diff --git a/addons/website_hr_recruitment/data/hr_job_demo.xml b/addons/website_hr_recruitment/data/hr_job_demo.xml index 88b3d3b06bf..6656141fe2d 100644 --- a/addons/website_hr_recruitment/data/hr_job_demo.xml +++ b/addons/website_hr_recruitment/data/hr_job_demo.xml @@ -154,12 +154,6 @@ </div> <div class="col-lg-3 offset-lg-1 pb40"> <div> - <h5>About us</h5> - <p>Learn more about our company.</p> - <p><a href="/aboutus" class="btn btn-outline-alpha" target="_blank"><small><b>READ</b></small></a></p> - </div> - <br/> - <div> <h5>Our Product</h5> <p>Discover our products.</p> <p><a href="/" class="btn btn-outline-alpha" target="_blank"><small><b>READ</b></small></a></p> @@ -387,12 +381,6 @@ </div> <div class="col-lg-3 offset-lg-1 pb40"> <div> - <h5>About us</h5> - <p>Learn more about our company.</p> - <p><a href="/aboutus" class="btn btn-outline-alpha" target="_blank"><small><b>READ</b></small></a></p> - </div> - <br/> - <div> <h5>Our Product</h5> <p>Discover our products.</p> <p><a href="/" class="btn btn-outline-alpha" target="_blank"><small><b>READ</b></small></a></p> @@ -620,12 +608,6 @@ </div> <div class="col-lg-3 offset-lg-1 pb40"> <div> - <h5>About us</h5> - <p>Learn more about our company.</p> - <p><a href="/aboutus" class="btn btn-outline-alpha" target="_blank"><small><b>READ</b></small></a></p> - </div> - <br/> - <div> <h5>Our Product</h5> <p>Discover our products.</p> <p><a href="/" class="btn btn-outline-alpha" target="_blank"><small><b>READ</b></small></a></p> @@ -852,12 +834,6 @@ </div> <div class="col-lg-3 offset-lg-1 pb40"> <div> - <h5>About us</h5> - <p>Learn more about our company.</p> - <p><a href="/aboutus" class="btn btn-outline-alpha" target="_blank"><small><b>READ</b></small></a></p> - </div> - <br/> - <div> <h5>Our Product</h5> <p>Discover our products.</p> <p><a href="/" class="btn btn-outline-alpha" target="_blank"><small><b>READ</b></small></a></p> @@ -1084,12 +1060,6 @@ </div> <div class="col-lg-3 offset-lg-1 pb40"> <div> - <h5>About us</h5> - <p>Learn more about our company.</p> - <p><a href="/aboutus" class="btn btn-outline-alpha" target="_blank"><small><b>READ</b></small></a></p> - </div> - <br/> - <div> <h5>Our Product</h5> <p>Discover our products.</p> <p><a href="/" class="btn btn-outline-alpha" target="_blank"><small><b>READ</b></small></a></p> @@ -1316,12 +1286,6 @@ </div> <div class="col-lg-3 offset-lg-1 pb40"> <div> - <h5>About us</h5> - <p>Learn more about our company.</p> - <p><a href="/aboutus" class="btn btn-outline-alpha" target="_blank"><small><b>READ</b></small></a></p> - </div> - <br/> - <div> <h5>Our Product</h5> <p>Discover our products.</p> <p><a href="/" class="btn btn-outline-alpha" target="_blank"><small><b>READ</b></small></a></p> @@ -1548,12 +1512,6 @@ </div> <div class="col-lg-3 offset-lg-1 pb40"> <div> - <h5>About us</h5> - <p>Learn more about our company.</p> - <p><a href="/aboutus" class="btn btn-outline-alpha" target="_blank"><small><b>READ</b></small></a></p> - </div> - <br/> - <div> <h5>Our Product</h5> <p>Discover our products.</p> <p><a href="/" class="btn btn-outline-alpha" target="_blank"><small><b>READ</b></small></a></p> diff --git a/addons/website_hr_recruitment/views/website_hr_recruitment_templates.xml b/addons/website_hr_recruitment/views/website_hr_recruitment_templates.xml index 74918a3bc88..84e8ab22824 100644 --- a/addons/website_hr_recruitment/views/website_hr_recruitment_templates.xml +++ b/addons/website_hr_recruitment/views/website_hr_recruitment_templates.xml @@ -381,12 +381,6 @@ </div> <div class="col-lg-3 offset-lg-1 pb40"> <div> - <h5>About us</h5> - <p>Learn more about our company.</p> - <p><a href="/aboutus" class="btn btn-outline-alpha" target="_blank"><small><b>READ</b></small></a></p> - </div> - <br/> - <div> <h5>Our Product</h5> <p>Discover our products.</p> <p><a href="/" class="btn btn-outline-alpha" target="_blank"><small><b>READ</b></small></a></p> @@ -591,7 +585,6 @@ We are a team of passionate people whose goal is to improve everyone's life through disruptive products. We build great products to solve your business problems. </p> - <p><a href="/aboutus" class="btn btn-primary">About us</a></p> </div> </div> </div> diff --git a/addons/website_links/static/tests/tours/website_links.js b/addons/website_links/static/tests/tours/website_links.js index b3885a513ce..d958308c5f6 100644 --- a/addons/website_links/static/tests/tours/website_links.js +++ b/addons/website_links/static/tests/tours/website_links.js @@ -18,7 +18,7 @@ tour.register('website_links_tour', { content: "fill the form and submit it", trigger: '#o_website_links_link_tracker_form input#url', run: function () { - var url = window.location.host + '/aboutus'; + var url = window.location.host + '/contactus'; $('#o_website_links_link_tracker_form input#url').val(url); $('.o_website_links_utm_forms input#campaign-select').val(1).change(); $('.o_website_links_utm_forms input#channel-select').val(1).change(); @@ -32,7 +32,7 @@ tour.register('website_links_tour', { // Depending of the speed of `requests.get` from `_get_title_from_url`, // the link name will either be "About us" (page title) or // "http://url/aboutus" (page url). - extra_trigger: '#o_website_links_recent_links .truncate_text:first():contains("About us"), #o_website_links_recent_links .truncate_text:first():contains("aboutus")', + extra_trigger: '#o_website_links_recent_links .truncate_text:first():contains("Contact us"), #o_website_links_recent_links .truncate_text:first():contains("contactus")', trigger: '#o_website_links_link_tracker_form #generated_tracked_link:contains("/r/")', run: function () { window.location.href = $('#generated_tracked_link').text(); @@ -40,9 +40,9 @@ tour.register('website_links_tour', { }, { content: "check that we landed on correct page with correct query strings", - trigger: '.s_title h1:containsExact("About us")', + trigger: '.s_title h1:containsExact("Contact us")', run: function () { - var expectedUrl = "/aboutus?utm_campaign=Sale&utm_source=Search+engine&utm_medium=Website"; + var expectedUrl = "/contactus?utm_campaign=Sale&utm_source=Search+engine&utm_medium=Website"; if (window.location.pathname + window.location.search !== expectedUrl) { console.error("The link was not correctly created."); } diff --git a/addons/website_livechat/tests/test_livechat_basic_flow.py b/addons/website_livechat/tests/test_livechat_basic_flow.py index aa3fa5a4e0e..3a03e5db817 100644 --- a/addons/website_livechat/tests/test_livechat_basic_flow.py +++ b/addons/website_livechat/tests/test_livechat_basic_flow.py @@ -20,19 +20,15 @@ class TestLivechatBasicFlowHttpCase(tests.HttpCase, TestLivechatCommon): 'visitor_id': self.visitor.id, 'visit_datetime': self.base_datetime - datetime.timedelta(minutes=10), }, { - 'page_id': self.env.ref('website.aboutus_page').id, + 'page_id': self.env.ref('website.homepage_page').id, 'visitor_id': self.visitor.id, 'visit_datetime': self.base_datetime - datetime.timedelta(minutes=20), - }, { - 'page_id': self.env.ref('website.contactus_page').id, - 'visitor_id': self.visitor.id, - 'visit_datetime': self.base_datetime - datetime.timedelta(minutes=30), }]) handmade_history = "%s (21:10) → %s (21:20) → %s (21:30)" % ( - self.env.ref('website.aboutus_page').name, + self.env.ref('website.homepage_page').name, self.env.ref('website.contactus_page').name, - self.env.ref('website.homepage_page').name + self.env.ref('website.homepage_page').name, ) history = self.env['mail.channel']._get_visitor_history(self.visitor) diff --git a/addons/website_sale/static/tests/tours/website_sale_buy.js b/addons/website_sale/static/tests/tours/website_sale_buy.js index 74e4fb58cbc..ca1bbe2d345 100644 --- a/addons/website_sale/static/tests/tours/website_sale_buy.js +++ b/addons/website_sale/static/tests/tours/website_sale_buy.js @@ -79,13 +79,13 @@ tour.register('shop_buy_product', { // Leave /shop/confirmation to prevent RPC loop to /shop/payment/get_status. // The RPC could be handled in python while the tour is killed (and the session), leading to crashes run: function () { - window.location.href = '/aboutus'; // Redirect in JS to avoid the RPC loop (20x1sec) + window.location.href = '/contactus'; // Redirect in JS to avoid the RPC loop (20x1sec) }, timeout: 30000, }, { content: "wait page loaded", - trigger: 'h3:contains("Great products for great people")', + trigger: 'h1:contains("Contact us")', run: function () {}, // it's a check }, ] diff --git a/addons/website_slides/data/slide_slide_demo.xml b/addons/website_slides/data/slide_slide_demo.xml index b5f3004e8aa..880c2bd7da9 100644 --- a/addons/website_slides/data/slide_slide_demo.xml +++ b/addons/website_slides/data/slide_slide_demo.xml @@ -233,7 +233,6 @@ <h1 class="o_default_snippet_text" style="font-size: 62px; text-align: center;">Catchy Headline</h1> <p class="lead o_default_snippet_text" style="text-align: center;">Write one or two paragraphs describing your product, services or a specific feature.<br/> To be successful your content needs to be useful to your readers.</p> <p> - <a href="/aboutus" class="btn btn-delta rounded-circle o_default_snippet_text">About us</a> <a href="/contactus" class="btn btn-primary rounded-circle o_default_snippet_text">Contact us</a> </p> </div> @@ -466,7 +465,6 @@ <h1 class="o_default_snippet_text" style="font-size: 62px; text-align: center;">Catchy Headline</h1> <p class="lead o_default_snippet_text" style="text-align: center;">Write one or two paragraphs describing your product, services or a specific feature.<br/> To be successful your content needs to be useful to your readers.</p> <p class="o_default_snippet_text"> - <a href="/aboutus" class="btn btn-delta rounded-circle">About us</a> <a href="/contactus" class="btn btn-primary rounded-circle">Contact us</a> </p> </div> |
