diff options
| author | qmo-odoo <qmo@odoo.com> | 2019-08-02 07:56:02 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2019-08-02 12:35:39 +0000 |
| commit | d716b53883ac998cf1d40187ea07779839c3db7f (patch) | |
| tree | 92eae228f9775dd20339520e795f53144d1ccb9c /addons | |
| parent | 4f92430139bc5386979a7d592d18df784eec37bf (diff) | |
[REF] website_links: set is_website to True on the campaign
PURPOSE
This commit removes the mass_mailing.campaign model. Instead of having a fully
fledged model, we will simply inherit utm.campaign. We will also add relevant
statistics on utm campaign model in order to use it in various applications.
SPECIFICATIONS
This commit changes website_links.js so that, when creating a campaign,
the field is_website is set to true.
This will allow us to filter irrelevant campaigns in mass_mailing and social
Task ID: 2002029
PR: #34015
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/website_links/static/src/js/website_links.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/addons/website_links/static/src/js/website_links.js b/addons/website_links/static/src/js/website_links.js index 7ebb60c0c2c..91b7177ea6b 100644 --- a/addons/website_links/static/src/js/website_links.js +++ b/addons/website_links/static/src/js/website_links.js @@ -77,10 +77,16 @@ var SelectBox = publicWidget.Widget.extend({ */ _createObject: function (name) { var self = this; + var args = { + name: name + }; + if (this.obj === "utm.campaign"){ + args.is_website = true; + } return this._rpc({ model: this.obj, method: 'create', - args: [{name: name}], + args: [args], }).then(function (record) { self.$el.attr('value', record); self.objects.push({'id': record, 'text': name}); |
