summaryrefslogtreecommitdiff
path: root/addons/website_quote/static/src
diff options
context:
space:
mode:
authorjpr-odoo <jpr@openerp.com>2018-08-13 21:34:09 +0200
committerSébastien Theys <seb@odoo.com>2018-08-13 21:53:19 +0200
commit4c31a758cf0715b1c1ff2f5b3cef18fec92c2d84 (patch)
treea82525949afd65d28d40c7015ac201c1663437e8 /addons/website_quote/static/src
parent5cf167abc61ee85d21302f21c631c4baa6ca92ce (diff)
[REF] various: move sale_payment and website_quote into sale and sale_management
[MOV] move sale_payment into sale ================================= Almost all use cases of sale require sale_payment down the line. There is only one case which does not: using sale_management without website_sale or website_quote. However, since we want to move most of the features of website_quote into sale_management, moving sale_payement first will make the task easier. [MOV] move website_quote into sale and sale_management ====================================================== We want to use some features of website_quote without having to install the whole module. The main issue with website_quote was that it had a requirement on website. What is common to website_sale and sale_management has been moved into sale. This is primarily the sales order portal view. What is only related to sale_management has been moved into it. This is notably: sales order templates, optional products, sign and pay, ... Everything that requires website has been moved into a new module named sale_quotation_builder. This is related to using the HTML builder to customize the quotation view. Models, files and routes have been renamed to better convey their purpose and to follow guidelines more closely. [IMP] merge sales order portal views ==================================== The old sales order view on the portal has been merged into the one from website_quote. The new view contains features of the two. A lot of fixes and improvements have also been done, related to BS4 issues but also to improve the sales order view in general. [IMP] add new settings ====================== The commit adds new settings related to activating the features that previously were activated by installing website_quote. PR: #26345 Task: 49205, 1838924
Diffstat (limited to 'addons/website_quote/static/src')
-rw-r--r--addons/website_quote/static/src/css/website_quotation.css55
-rw-r--r--addons/website_quote/static/src/img/online_training.pngbin11682 -> 0 bytes
-rw-r--r--addons/website_quote/static/src/img/openerp_gold_partner.pngbin23252 -> 0 bytes
-rw-r--r--addons/website_quote/static/src/img/partner_icon_01.pngbin25055 -> 0 bytes
-rw-r--r--addons/website_quote/static/src/img/partner_icon_02.pngbin14792 -> 0 bytes
-rw-r--r--addons/website_quote/static/src/img/partner_icon_04.pngbin17968 -> 0 bytes
-rw-r--r--addons/website_quote/static/src/img/partner_sc_01.pngbin51068 -> 0 bytes
-rw-r--r--addons/website_quote/static/src/js/website_quotation.js139
-rw-r--r--addons/website_quote/static/src/scss/website_quotation.scss6
9 files changed, 0 insertions, 200 deletions
diff --git a/addons/website_quote/static/src/css/website_quotation.css b/addons/website_quote/static/src/css/website_quotation.css
deleted file mode 100644
index f52a2601381..00000000000
--- a/addons/website_quote/static/src/css/website_quotation.css
+++ /dev/null
@@ -1,55 +0,0 @@
-.o_website_quote .bs-sidebar {
- position: relative;
- width: 100%;
- z-index : 1;
- background-color: #f7f5fa;
- border-radius: 5px;
-}
-
-.o_website_quote .bs-sidenav {
- padding-top: 10px;
- padding-bottom: 10px;
-}
-
-.o_website_quote .bs-sidebar .nav > li > a {
- display: block;
- color: #716b7a;
- padding: 5px 20px;
-}
-
-.o_website_quote .bs-sidebar .nav > .active > a,
-.o_website_quote .bs-sidebar .nav > .active:hover > a,
-.o_website_quote .bs-sidebar .nav > .active:focus > a {
- font-weight: bold;
- color: #563d7c;
- background-color: transparent;
- border-right: 1px solid #563d7c;
-}
-
-.o_website_quote .bs-sidebar .nav .nav {
- display: none;
- margin-bottom: 8px;
-}
-.o_website_quote .bs-sidebar .nav .nav > li > a {
- padding-top: 3px;
- padding-bottom: 3px;
- padding-left: 30px;
- font-size: 90%;
-}
-
-/* Table Styling */
-.wq-table {
- table-layout: auto !important;
-}
-
-
-@media (min-width: 992px) {
- .o_website_quote .bs-sidebar .nav > .active > ul {
- display: block;
- }
-}
-@media print {
- body {
- padding : 0 !important;
- }
-}
diff --git a/addons/website_quote/static/src/img/online_training.png b/addons/website_quote/static/src/img/online_training.png
deleted file mode 100644
index cc03d0d7c35..00000000000
--- a/addons/website_quote/static/src/img/online_training.png
+++ /dev/null
Binary files differ
diff --git a/addons/website_quote/static/src/img/openerp_gold_partner.png b/addons/website_quote/static/src/img/openerp_gold_partner.png
deleted file mode 100644
index f0404e8ca6f..00000000000
--- a/addons/website_quote/static/src/img/openerp_gold_partner.png
+++ /dev/null
Binary files differ
diff --git a/addons/website_quote/static/src/img/partner_icon_01.png b/addons/website_quote/static/src/img/partner_icon_01.png
deleted file mode 100644
index 880752e3518..00000000000
--- a/addons/website_quote/static/src/img/partner_icon_01.png
+++ /dev/null
Binary files differ
diff --git a/addons/website_quote/static/src/img/partner_icon_02.png b/addons/website_quote/static/src/img/partner_icon_02.png
deleted file mode 100644
index c3b76637f25..00000000000
--- a/addons/website_quote/static/src/img/partner_icon_02.png
+++ /dev/null
Binary files differ
diff --git a/addons/website_quote/static/src/img/partner_icon_04.png b/addons/website_quote/static/src/img/partner_icon_04.png
deleted file mode 100644
index a1c2193a152..00000000000
--- a/addons/website_quote/static/src/img/partner_icon_04.png
+++ /dev/null
Binary files differ
diff --git a/addons/website_quote/static/src/img/partner_sc_01.png b/addons/website_quote/static/src/img/partner_sc_01.png
deleted file mode 100644
index 2b4872a2b4d..00000000000
--- a/addons/website_quote/static/src/img/partner_sc_01.png
+++ /dev/null
Binary files differ
diff --git a/addons/website_quote/static/src/js/website_quotation.js b/addons/website_quote/static/src/js/website_quotation.js
deleted file mode 100644
index 214345b9dae..00000000000
--- a/addons/website_quote/static/src/js/website_quotation.js
+++ /dev/null
@@ -1,139 +0,0 @@
-odoo.define('website_quote.website_quote', function (require) {
-'use strict';
-
-require('web.dom_ready');
-var ajax = require('web.ajax');
-var config = require('web.config');
-var Widget = require('web.Widget');
-
-if(!$('.o_website_quote').length) {
- return $.Deferred().reject("DOM doesn't contain '.o_website_quote'");
-}
-
- // Add to SO button
- var UpdateLineButton = Widget.extend({
- events: {
- 'click' : 'onClick',
- },
- onClick: function(ev){
- ev.preventDefault();
- var self = this;
- var href = this.$el.attr("href");
- var order_id = href.match(/order_id=([0-9]+)/);
- var line_id = href.match(/update_line\/([0-9]+)/);
- var token = href.match(/token=(.*)/);
- ajax.jsonRpc("/quote/update_line", 'call', {
- 'line_id': line_id[1],
- 'order_id': parseInt(order_id[1]),
- 'token': token[1],
- 'remove': self.$el.is('[href*="remove"]'),
- 'unlink': self.$el.is('[href*="unlink"]')
- }).then(function (data) {
- if(!data){
- window.location.reload();
- }
- self.$el.parents('.input-group:first').find('.js_quantity').val(data[0]);
- $('[data-id="total_amount"]>span').html(data[1]);
- });
- return false;
- },
- });
-
- var update_button_list = [];
- $('a.js_update_line_json').each(function( index ) {
- var button = new UpdateLineButton();
- button.setElement($(this)).start();
- update_button_list.push(button);
- });
-
- // Nav Menu ScrollSpy
- var NavigationSpyMenu = Widget.extend({
- start: function(watched_selector){
- this.authorized_text_tag = ['em', 'b', 'i', 'u'];
- this.spy_watched = $(watched_selector);
- this.generateMenu();
- },
- generateMenu: function(){
- var self = this;
- // reset ids
- $("[id^=quote_header_], [id^=quote_]", this.spy_watched).attr("id", "");
- // generate the new spy menu
- var last_li = false;
- var last_ul = null;
- _.each(this.spy_watched.find("h1, h2"), function(el){
- var id, text;
- switch (el.tagName.toLowerCase()) {
- case "h1":
- id = self.setElementId('quote_header_', el);
- text = self.extractText($(el));
- if (!text) {
- break;
- }
- last_li = $("<li>").append($('<a href="#'+id+'"/>').text(text)).appendTo(self.$el);
- last_ul = false;
- break;
- case "h2":
- id = self.setElementId('quote_', el);
- text = self.extractText($(el));
- if (!text) {
- break;
- }
- if (last_li) {
- if (!last_ul) {
- last_ul = $("<ul class='nav'>").appendTo(last_li);
- }
- $("<li>").append($('<a href="#'+id+'"/>').text(text)).appendTo(last_ul);
- }
- break;
- }
- });
- },
- setElementId: function(prefix, $el){
- var id = _.uniqueId(prefix);
- this.spy_watched.find($el).attr('id', id);
- return id;
- },
- extractText: function($node){
- var self = this;
- var raw_text = [];
- _.each($node.contents(), function(el){
- var current = $(el);
- if($.trim(current.text())){
- var tagName = current.prop("tagName");
- if(_.isUndefined(tagName) || (!_.isUndefined(tagName) && _.contains(self.authorized_text_tag, tagName.toLowerCase()))){
- raw_text.push($.trim(current.text()));
- }
- }
- });
- return raw_text.join(' ');
- }
- });
-
- var nav_menu = new NavigationSpyMenu();
- nav_menu.setElement($('[data-id="quote_sidebar"]'));
- nav_menu.start($('body[data-target=".navspy"]'));
-
- var $bs_sidebar = $(".o_website_quote .bs-sidebar");
- $(window).on('resize', _.throttle(adapt_sidebar_position, 200, {leading: false}));
- adapt_sidebar_position();
-
- function adapt_sidebar_position() {
- $bs_sidebar.css({
- position: "",
- width: "",
- });
- if (config.device.size_class >= config.device.SIZES.LG) {
- $bs_sidebar.css({
- position: "fixed",
- width: $bs_sidebar.outerWidth(),
- });
- }
- }
-
- $bs_sidebar.affix({
- offset: {
- top: 0,
- bottom: $('body').height() - $('#wrapwrap').outerHeight() + $("footer").outerHeight(),
- },
- });
-});
diff --git a/addons/website_quote/static/src/scss/website_quotation.scss b/addons/website_quote/static/src/scss/website_quotation.scss
deleted file mode 100644
index 26ba0eaef64..00000000000
--- a/addons/website_quote/static/src/scss/website_quotation.scss
+++ /dev/null
@@ -1,6 +0,0 @@
-.o_website_quote{
- h1[id],h2[id]{
- margin-top: 0px;
- padding-top: $o-navbar-height;
- }
-}