From dd583d5a9816dffa1956183e29369ec70712c212 Mon Sep 17 00:00:00 2001 From: ddm Date: Tue, 10 Dec 2013 15:21:14 +0100 Subject: [PATCH 01/37] [IMP] Automated tour tests bzr revid: ddm@openerp.com-20131210142114-kkjy8quirw84azuq --- addons/website/static/src/js/website.tour.js | 21 ++++++++++++++----- .../static/src/js/website.tour.blog.js | 3 --- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/addons/website/static/src/js/website.tour.js b/addons/website/static/src/js/website.tour.js index 114e28a389c..583afabd437 100644 --- a/addons/website/static/src/js/website.tour.js +++ b/addons/website/static/src/js/website.tour.js @@ -52,8 +52,7 @@ } else { step.triggers = function (callback) { var emitter = _.isString(step.trigger.emitter) ? $(step.trigger.emitter) : (step.trigger.emitter || $(step.element)); - emitter.on(step.trigger.id, function customHandler () { - console.log(arguments); + emitter.on(step.trigger.id, function () { (callback || self.moveToNextStep).apply(self, arguments); }); }; @@ -219,6 +218,12 @@ }); var TestConsole = website.TestConsole = { + tests: [], + test: function (id) { + return _.find(this.tests, function (tour) { + return tour.id === id; + }); + }, dragAndDropSnippet: function (snippetId) { var selector = '#oe_snippets div.oe_snippet[data-snippet-id="'+snippetId+'"] .oe_snippet_thumbnail'; var $thumbnail = $(selector).first(); @@ -229,7 +234,6 @@ var dropPosition = $dropZone.position(); $dropZone.trigger($.Event("mouseup", { which: 1, pageX: dropPosition.left, pageY: dropPosition.top })); }, - tests: [], }; website.EditorBar.include({ @@ -260,7 +264,14 @@ this.tours.push(tour); TestConsole.tests.push({ id: tour.id, - run: function runTest () { + run: function (force) { + var url = new website.UrlParser(window.location.href); + if (tour.startPath && url.pathname !== tour.startPath) { + throw new Error(tour.startPath); + } + if (force === true) { + this.reset(); + } var actionSteps = _.filter(tour.steps, function (step) { return step.trigger; }); @@ -271,7 +282,7 @@ if (nextStep) { setTimeout(function () { executeStep(nextStep); - }, 10); + }, 100); } }); if (step.snippet && step.trigger === 'drag') { diff --git a/addons/website_blog/static/src/js/website.tour.blog.js b/addons/website_blog/static/src/js/website.tour.blog.js index d541ca0bd3b..614cd776047 100644 --- a/addons/website_blog/static/src/js/website.tour.blog.js +++ b/addons/website_blog/static/src/js/website.tour.blog.js @@ -53,9 +53,6 @@ trigger: { emitter: '.modal select', id: 'change', - predicate: function ($el, value) { - return $el.find('[value='+value+']').text().toLowerCase() === 'news'; - }, }, }, { From cbdb6a3d8104f5fc1cef0ea486e0eafad465aabc Mon Sep 17 00:00:00 2001 From: ddm Date: Tue, 10 Dec 2013 15:55:40 +0100 Subject: [PATCH 02/37] [IMP] Automated tests: remove useless delay bzr revid: ddm@openerp.com-20131210145540-jhzh8rkxj4ryf19a --- addons/website/static/src/js/website.tour.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/website/static/src/js/website.tour.js b/addons/website/static/src/js/website.tour.js index 583afabd437..caeab3d90fc 100644 --- a/addons/website/static/src/js/website.tour.js +++ b/addons/website/static/src/js/website.tour.js @@ -282,13 +282,13 @@ if (nextStep) { setTimeout(function () { executeStep(nextStep); - }, 100); + }, 0); } }); + var $element = $(step.element); if (step.snippet && step.trigger === 'drag') { TestConsole.dragAndDropSnippet(step.snippet); } else { - var $element = $(step.element); $element.trigger($.Event("click", { srcElement: $element })); } } From bfc9435830bb7ba8d5603c309a41bc4fe1586510 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Tue, 10 Dec 2013 16:10:15 +0100 Subject: [PATCH 03/37] [IMP] website snippet: layout for quotes bzr revid: chm@openerp.com-20131210151015-3gq40iam388d35cq --- addons/website/views/snippets.xml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/addons/website/views/snippets.xml b/addons/website/views/snippets.xml index 437074ba189..718fe06396f 100644 --- a/addons/website/views/snippets.xml +++ b/addons/website/views/snippets.xml @@ -302,7 +302,7 @@
-
+

Write here a quote from one of your customer. Quotes are are great way to give confidence in your products or services. @@ -320,7 +320,7 @@

-
+

OpenERP provides essential platform for our project management. Things are better organized and more visible with it. @@ -739,12 +739,12 @@

-
-

- Write here a quote from one of your customer. Quotes are are - great way to give confidence in your products or services. -

- Author of this quote +
+

+ Write here a quote from one of your customer. Quotes are are + great way to give confidence in your products or services. +

+ Author of this quote
@@ -757,12 +757,12 @@
-
-

- OpenERP provides essential platform for our project management. - Things are better organized and more visible with it. -

- John Doe, CEO +
+

+ OpenERP provides essential platform for our project management. + Things are better organized and more visible with it. +

+ John Doe, CEO
From 8c91a8831ed604e60aee586c382410e63650c7a7 Mon Sep 17 00:00:00 2001 From: ddm Date: Tue, 10 Dec 2013 16:45:00 +0100 Subject: [PATCH 04/37] [FIX] Modify blog tour before automation bzr revid: ddm@openerp.com-20131210154500-4k03t4yag7qz0p0v --- addons/website/static/src/js/website.tour.js | 7 +++++++ addons/website_blog/static/src/js/website.tour.blog.js | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/addons/website/static/src/js/website.tour.js b/addons/website/static/src/js/website.tour.js index caeab3d90fc..c79c483551d 100644 --- a/addons/website/static/src/js/website.tour.js +++ b/addons/website/static/src/js/website.tour.js @@ -288,6 +288,13 @@ var $element = $(step.element); if (step.snippet && step.trigger === 'drag') { TestConsole.dragAndDropSnippet(step.snippet); + } else if (step.trigger.id === 'change') { + var currentValue = $element.val(); + var options = $element[0].options; + var newValue = _.find(options, function (option) { + return option.value !== currentValue; + }).value; + $element.val(newValue).trigger($.Event("change")); } else { $element.trigger($.Event("click", { srcElement: $element })); } diff --git a/addons/website_blog/static/src/js/website.tour.blog.js b/addons/website_blog/static/src/js/website.tour.blog.js index 614cd776047..97e6d0d0def 100644 --- a/addons/website_blog/static/src/js/website.tour.blog.js +++ b/addons/website_blog/static/src/js/website.tour.blog.js @@ -51,7 +51,6 @@ title: "Which Blog?", content: "Blog posts are organized in multiple categories (news, job offers, events, etc). Select News and click Continue.", trigger: { - emitter: '.modal select', id: 'change', }, }, @@ -114,11 +113,13 @@ placement: 'top', title: "Edit an Area", content: "Select any area of the page to modify it. Click on this subtitle.", - trigger: 'click', + trigger: { + id: 'snippet-activated', + } }, { stepId: 'remove-text-block-title', - element: '.oe_snippet_remove:last', + element: '.oe_active .oe_snippet_remove', placement: 'top', title: "Delete the Title", content: "From this toolbar you can move, duplicate or delete the selected zone. Click on the cross to delete the title.", From 6893a6ab150a26819ee26c34ffb6fd69fdc85208 Mon Sep 17 00:00:00 2001 From: ddm Date: Tue, 10 Dec 2013 17:35:22 +0100 Subject: [PATCH 05/37] [IMP] Improve automated tests bzr revid: ddm@openerp.com-20131210163522-p23703mcu8pfdsl0 --- addons/website/static/src/js/website.tour.js | 17 +++++++++++++---- .../static/src/js/website.tour.blog.js | 7 ++++++- .../static/src/js/website.tour.event.js | 6 +++++- .../static/src/js/website.tour.shop.js | 6 +++++- 4 files changed, 29 insertions(+), 7 deletions(-) diff --git a/addons/website/static/src/js/website.tour.js b/addons/website/static/src/js/website.tour.js index c79c483551d..1f458085960 100644 --- a/addons/website/static/src/js/website.tour.js +++ b/addons/website/static/src/js/website.tour.js @@ -229,7 +229,7 @@ var $thumbnail = $(selector).first(); var thumbnailPosition = $thumbnail.position(); $thumbnail.trigger($.Event("mousedown", { which: 1, pageX: thumbnailPosition.left, pageY: thumbnailPosition.top })); - $thumbnail.trigger($.Event("mousemove", { which: 1, pageX: thumbnailPosition.left+100, pageY: thumbnailPosition.top+700 })); + $thumbnail.trigger($.Event("mousemove", { which: 1, pageX: thumbnailPosition.left, pageY: thumbnailPosition.top+500 })); var $dropZone = $(".oe_drop_zone").first(); var dropPosition = $dropZone.position(); $dropZone.trigger($.Event("mouseup", { which: 1, pageX: dropPosition.left, pageY: dropPosition.top })); @@ -262,7 +262,7 @@ registerTour: function (tour) { var testId = 'test_'+tour.id+'_tour'; this.tours.push(tour); - TestConsole.tests.push({ + var test = { id: tour.id, run: function (force) { var url = new website.UrlParser(window.location.href); @@ -280,9 +280,14 @@ step.triggers(function () { var nextStep = actionSteps.shift(); if (nextStep) { + // Ensure the previous step has been fully propagated setTimeout(function () { - executeStep(nextStep); + setTimeout(function () { + executeStep(nextStep); + }, 0); }, 0); + } else { + window.localStorage.removeItem(testId); } }); var $element = $(step.element); @@ -311,7 +316,11 @@ reset: function () { window.localStorage.removeItem(testId); }, - }); + }; + TestConsole.tests.push(test); + if (window.localStorage.getItem(testId)) { + test.run(); + } }, }); diff --git a/addons/website_blog/static/src/js/website.tour.blog.js b/addons/website_blog/static/src/js/website.tour.blog.js index 97e6d0d0def..61f678e833b 100644 --- a/addons/website_blog/static/src/js/website.tour.blog.js +++ b/addons/website_blog/static/src/js/website.tour.blog.js @@ -60,6 +60,7 @@ placement: 'right', title: "Create Blog Post", content: "Click Continue to create the blog post.", + trigger: 'click', }, { stepId: 'post-page', @@ -81,7 +82,11 @@ placement: 'bottom', title: "Layout Your Blog Post", content: "Use well designed building blocks to structure the content of your blog. Click 'Insert Blocks' to add new content.", - trigger: 'click', + trigger: { + emitter: editor, + type: 'openerp', + id: 'rte:ready', + }, }, { stepId: 'drag-image-text', diff --git a/addons/website_event/static/src/js/website.tour.event.js b/addons/website_event/static/src/js/website.tour.event.js index 10582874103..a557eda1135 100644 --- a/addons/website_event/static/src/js/website.tour.event.js +++ b/addons/website_event/static/src/js/website.tour.event.js @@ -71,7 +71,11 @@ placement: 'bottom', title: "Layout your event", content: "Insert blocks like 'Banner' to layout the body of your event.", - trigger: 'click', + trigger: { + emitter: editor, + type: 'openerp', + id: 'rte:ready', + }, }, { stepId: 'drag-banner', diff --git a/addons/website_sale/static/src/js/website.tour.shop.js b/addons/website_sale/static/src/js/website.tour.shop.js index 5a4d0c04939..de84aa29276 100644 --- a/addons/website_sale/static/src/js/website.tour.shop.js +++ b/addons/website_sale/static/src/js/website.tour.shop.js @@ -109,7 +109,11 @@ placement: 'bottom', title: "Describe the product for your audience", content: "Insert blocks like text-image, or gallery to fully describe the product and make your visitors want to buy this product.", - trigger: 'click', + trigger: { + emitter: editor, + type: 'openerp', + id: 'rte:ready', + }, }, { stepId: 'drag-big-picture', From d0bdb21eb2dec65f2c268315db181484ee66fb91 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Wed, 11 Dec 2013 10:01:46 +0100 Subject: [PATCH 06/37] [IMP] purchase_requisition: remove unused import bzr revid: chm@openerp.com-20131211090146-rafbej67r9ssj8zg --- .../purchase_requisition/wizard/purchase_requisition_partner.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/purchase_requisition/wizard/purchase_requisition_partner.py b/addons/purchase_requisition/wizard/purchase_requisition_partner.py index 0fee8745931..8776bba2bf8 100644 --- a/addons/purchase_requisition/wizard/purchase_requisition_partner.py +++ b/addons/purchase_requisition/wizard/purchase_requisition_partner.py @@ -19,9 +19,7 @@ # ############################################################################## -import time from openerp.osv import fields, osv -from openerp.osv.orm import browse_record, browse_null from openerp.tools.translate import _ class purchase_requisition_partner(osv.osv_memory): From 27ddae9d6db74dc04a23bf8dace5eda52cae828d Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Wed, 11 Dec 2013 11:08:16 +0100 Subject: [PATCH 07/37] [FIX] typo bzr revid: fp@tinyerp.com-20131211100816-30iig2jh6po4z42o --- addons/website/views/themes.xml | 2 +- addons/website/views/website_templates.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/website/views/themes.xml b/addons/website/views/themes.xml index afc0b8f0d48..815c2ff57c7 100644 --- a/addons/website/views/themes.xml +++ b/addons/website/views/themes.xml @@ -15,7 +15,7 @@

Theme Changed!

- Have a look at your homepage or try another theme bellow. + Have a look at your homepage or try another theme below.

Try a New Theme

diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml index 8734777dc4f..f188a4934e0 100644 --- a/addons/website/views/website_templates.xml +++ b/addons/website/views/website_templates.xml @@ -383,7 +383,7 @@ Create Page or Search a Page
-
Edit the content bellow this line to adapt the default "page not found" page.
+
Edit the content below this line to adapt the default "page not found" page.

From 8f2f58956112a0d1616355311370f35a50c4e83c Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Wed, 11 Dec 2013 12:26:17 +0100 Subject: [PATCH 08/37] [FIX] website: typo, partner order, event demo data bzr revid: chm@openerp.com-20131211112617-11kdph7cieews0y8 --- addons/event/event_demo.xml | 6 ++--- addons/membership/membership_demo.xml | 2 +- addons/website/views/snippets.xml | 23 +++++++++---------- addons/website/views/website_templates.xml | 4 ++-- .../website_blog/data/website_blog_demo.xml | 10 ++++---- .../views/website_blog_templates.xml | 2 +- .../controllers/main.py | 18 +++++++-------- .../models/__init__.py | 1 + .../models/website.py | 11 +++++++++ .../views/website_crm_partner_assign.xml | 1 + addons/website_customer/controllers/main.py | 6 ++--- addons/website_event/data/event_demo.xml | 20 ++++++++-------- .../views/website_event.xml | 2 +- addons/website_membership/controllers/main.py | 2 +- addons/website_partner/controllers/main.py | 6 ++--- addons/website_partner/models/__init__.py | 3 ++- addons/website_partner/models/website.py | 10 ++++++++ 17 files changed, 73 insertions(+), 54 deletions(-) create mode 100644 addons/website_crm_partner_assign/models/website.py create mode 100644 addons/website_partner/models/website.py diff --git a/addons/event/event_demo.xml b/addons/event/event_demo.xml index ffc4be3a77c..3788ca8435d 100644 --- a/addons/event/event_demo.xml +++ b/addons/event/event_demo.xml @@ -160,10 +160,10 @@
5-days Technical Training

 

Course summary:

-

This course is dedicated to partners, integrators and developers who need to grasp knowledge of the business applications development process. This course is for new developers or for IT professionals eager to learn more about technical aspects.

+

This course is dedicated to partners, integrators and developers who need to grasp knowledge about the business applications development process and for new developers or for IT professionals eager to learn more about technical aspects.

 

Objectives:

-

Having attended this course, participants should be able to:

+

Having attended this course, participants should be able to:

  • Understand the development concepts and architecture;
  • Install and administer your own server;
  • @@ -176,7 +176,7 @@
  • training material.

 

-

Requirements:

+

Requirements

  • Bring your own laptop.
  • Participants are expected to have some knowledge in programming. A basic knowledge of the Python programming is recommended.
  • diff --git a/addons/membership/membership_demo.xml b/addons/membership/membership_demo.xml index 7775050fb9e..86fb055de22 100644 --- a/addons/membership/membership_demo.xml +++ b/addons/membership/membership_demo.xml @@ -7,7 +7,7 @@ True - Golden Membership + Gold Membership 180 service diff --git a/addons/website/views/snippets.xml b/addons/website/views/snippets.xml index 718fe06396f..9e2bf6a4d73 100644 --- a/addons/website/views/snippets.xml +++ b/addons/website/views/snippets.xml @@ -304,8 +304,8 @@

    - Write here a quote from one of your customer. Quotes are are - great way to give confidence in your products or services. + Write a quote here from one of your customers. Quotes are a + great way to build confidence in your products or services.

    Author of this quote
    @@ -347,7 +347,7 @@ Well
    - Explain the benefit you offer. Don't write about products or + Explain the benefits you offer. Don't write about products or services here, write about solutions.
@@ -360,8 +360,8 @@

- Write here a quote from one of your customer. Quotes are are - great way to give confidence in your products or services. + Write a quote here from one of your customers. Quotes are a + great way to build confidence in your products or services.

Author of this quote
@@ -378,9 +378,8 @@

Feature Title

- Panels are great to compare offers or to emphasize on - key features. To compare products, use panels inside - columns. + Panels are a great tool to compare offers or to emphasize on + key features. To compare products, use the inside columns.
@@ -654,8 +653,8 @@

- Write here a quote from one of your customer. Quotes are are - great way to give confidence in your products or services. + Write a quote here from one of your customers. Quotes are a + great way to build confidence in your products or services.

Author of this quote
@@ -741,8 +740,8 @@

- Write here a quote from one of your customer. Quotes are are - great way to give confidence in your products or services. + Write a quote here from one of your customers. Quotes are a + great way to build confidence in your products or services.

Author of this quote
diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml index f188a4934e0..7daa4c767d7 100644 --- a/addons/website/views/website_templates.xml +++ b/addons/website/views/website_templates.xml @@ -189,7 +189,7 @@ - About us

- We are a team of passionated people whose goal is to improve everyone's + 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.

@@ -608,7 +608,7 @@ Sitemap: sitemap.xml

- We are a team of passionated people whose goal is to improve everyone's + 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.

diff --git a/addons/website_blog/data/website_blog_demo.xml b/addons/website_blog/data/website_blog_demo.xml index 13687fdc19a..95442c14acd 100644 --- a/addons/website_blog/data/website_blog_demo.xml +++ b/addons/website_blog/data/website_blog_demo.xml @@ -234,17 +234,17 @@ - Touchscreen Point of Sale + Touchscreen Point of Sale for 6.1 Point of Sale, Hardware, Interface, Payment Terminal, Store Point of Sale with no installation required that runs online and offline. -The brand new OpenERP touchscreen point of sale available with 6.1 allows you +The brand new OpenERP touchscreen point of sale is available with 6.1 which allows you to manage your shop sales very easily. It's fully web based so that you don't have to install or deploy any software and all the sales shops can be easily consolidated. It works in connected and disconnected modes so that you can -continue to sell if you lose your internet connection.

+continue to sell even if you lose your internet connection.

Here's a summary of its main features and benefits:

@@ -116,7 +115,7 @@

Objectives:

-

Having attended this course, participants should be able to:

+

Having attended this course, participants should be able to:

  • Understand the development concepts and architecture;
  • Install and administer your own server;
  • @@ -146,7 +145,7 @@
    -

    A great content...

    +

    Read Great Contents

    What do people say about this course?

    @@ -181,8 +180,7 @@

    to learn .JS development

    - - +
@@ -279,7 +277,7 @@

Objectives:

-

Having attended this course, participants should be able to:

+

Having attended this course, participants should be able to:

  • Understand the development concepts and architecture;
  • Install and administer your own server;
  • @@ -309,7 +307,7 @@
    -

    A great content...

    +

    Read Great Contents

    What do people say about this course?

    @@ -357,7 +355,7 @@

    to learn .JS development

    - +
@@ -454,7 +452,7 @@

Objectives:

-

Having attended this course, participants should be able to:

+

Having attended this course, participants should be able to: