summaryrefslogtreecommitdiff
path: root/addons/website_sale/static/src/js/variant_mixin.js
blob: 0e92564bd5c42b61e88621abc182223c28f4631f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
odoo.define('website_sale.VariantMixin', function (require) {
'use strict';

var VariantMixin = require('sale.VariantMixin');

/**
 * Website behavior is slightly different from backend so we append
 * "_website" to URLs to lead to a different route
 *
 * @private
 * @param {string} uri The uri to adapt
 */
VariantMixin._getUri = function (uri) {
    if (this.isWebsite){
        return uri + '_website';
    } else {
        return uri;
    }
};

return VariantMixin;

});