- Create 3 websites and set a website domain for each
- Install the website_links module
- Go to Website > Configuration > Settings
- Select the website 3
- Go to website
- Menu Promote > Link tracking
The URL field uses the domain you are logged into the database
rather than the domain of the active website
The expected behavior is:
With an ICP set to URL1, a website 1 set to URL2 and a website 2 set to
URL3, going to the link tracker website page from URL3 but with website
1 selected should:
Show the current website domain as placeholder of the input -> URL2
Create link for that current website the user selected -> URL2
opw-2638494
closesodoo/odoo#77705
X-original-commit: d094d76354d6f46db3dc7f8e716b5f778ca26569
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
The license is missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.
When not defined, a warning will be triggered starting from
14.0 when falling back on the default LGPL-3.
closesodoo/odoo#74245
Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
With the introduction of the new webclient, we introduced a new way to
create and interact with registry using categories. This alleviates the
need to explicitly export and import registries.
This commit converts the public root widget's custom registry to use the
new registry to avoid code duplication and having multiple diverging
implementations
Part of #72675
This branch adds request.redirect on all requests.
In case of a front end request, we do an url_for to the location.
We removed redirect_with_hash that was only for retro compatibility
local_redirect has been renamed to redirect_query, and param keep_hash has been
removed and moved.
Default code for redirect is 303 now instead of 302.
Now redirect and redirect_query make local redirect by default, you need to
pass local=False to make external redirect.
All werkeug.utils.redirect has been replaced by request.redirect.
Http.redirect now use an http.Response type, and it become easy to add an
override like 'set_cookies' e.g.
Dispatch of a website.page return an http.response too, so we first need to
check if it is a cached version before to check if it is an Odoo Response.
Migrate your code:
http.redirect -> request.redirect(location, code, local)
http.local_redirect -> request.redirect_query(location, query, code, local)
http.redirect_with_hash -> request.redirect
Courtesy of odony for help and review ;)
closesodoo/odoo#72599
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Purpose
=======
Add a unicity constraint (on the url, UTM campaign, medium and source).
As we must care about null values, we can not implement it in SQL
(possible in pure SQL, but we will need to create an index on the
columns, which is not possible in Odoo if we want to customize the
error message).
Clean the code, before the "search or create" behavior was implemented
in the create, causing strange behavior (creating a link tracker with
the same values as an existing one didn't raise an error, but open
the form view of the existing link tracker).
Task-2090344
closesodoo/odoo#48845
Related: odoo/enterprise#9608
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Conversion of all modules to the new manifest assets declaration.
Part of task: 2352566
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
Fix issues in livechat display
* rename Rated user filter into Rated Operator
* add padding to improve readability of the feedback screen in the livechat
window.
* fixed URL in placeholders to match existing "contactus" page URL
Task ID-2301261
PR odoo/odoo#60549
X-original-commit: 60e27876bb7ccdd6a6f871db82d44ac194b6f739
This commit renames the field is_website into is_auto_campaign
for clarity purpose.
The is_website field always meant that the campaigns were created automatically
in some instances. Could be created automatically via a link to the website
or even by simply creating a marketing campaign in marketing_automation.
is_auto_campaign is a better name as it does not wrongly imply that only
the website can generate campaigns automatically, while also pointing
out the automatic generation mechanism.
The utm campaigns behaviour rests unchanged.
LINKS:
TaskID: 2414694
PR: #65824
Enterprise PR: #16238
Related: odoo/upgrade#2146
Related: odoo/enterprise#16238
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit fixes the step trigger:
'#o_website_links_link_tracker_form
#generated_tracked_link:contains("/r/")' that was taking too long
because of a call to _get_title_from_url happening during the creation
of a 'link.tracker'.
Before this commit the automated tests of website_links did trigger an
http request on the 'contactus' page which sometimes took too long to
respond and reached the test failure timeout.
After this commit the information obtained from this request is
hard-coded to avoid the unpredictable timing of the test.
This commit is a manual port of #62479.
task-2397724
closesodoo/odoo#62582
X-original-commit: db3296c034fe4c82d19580418fd5cdecdf578395
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Steps to reproduce the bug:
- Create old click data in the `link_tracker_click` table or change your computer's current date to two weeks in the future.
- Go to the stats page of the link tracker
Bug:
Backtrace on the stats of the link tracker.
opw:2321377
closesodoo/odoo#58113
X-original-commit: 875aeb5c55b96fc3f7d76fc67d56f60df8453ec3
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
- Create 80k UTM sources
- Go to the Website
- Promote a page (e.g. an event)
- Select a source
The web browser freezes.
It happens because Select2 tries to display all sources at once.
To prevent this, we force at least 3 characters before searching and
hence displaying the results. Note that a such high number of UTM
sources is reached because of automatic generation of random values in
mass mailing. Therefore, the combination of 3 characters narrows down
the search result drastically.
opw-2289249
closesodoo/odoo#54947
X-original-commit: 7c7986361704d7b82b115499e64c47eb74ab655f
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Until Werkzeug 0.14, redirect() would resolve all URLs to absolute
paths or even absolute URL, because relative paths were not valid
according to the HTTP RFCs (though most browsers supported them).
However RFC 7231 allows them, so Werkzeug 0.15 removes this rewrite on
URLs, and `redirect('foo/bar')` now redirects *relative to the current
URL* instead of the old `/foo/bar`.
If `code` is not found, the link tracker loops on the current
URL (`/r/{code}`) instead of redirecting to `/` as was intended.
Going through uses of redirect() this seems to be the only problematic
call site left, others either use absolute paths or they use URLs
coming from the outside.
Task 2254691
closesodoo/odoo#53327
X-original-commit: 3a6e079e54a6f973cfc96995a84a7fabff803f1c
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
This commit adapts several views to make them use newly defined
widgets, the new decoration-xxx mechanism on fields, and to adapt
them to the new design of buttons.
Part of task 2195254
This commit increase the containers sizes in linktracker
because at the moment it's not adapted for big data.
It also add title attributes on truncated link to
preview the full link on hover.
OPW-2203428
closesodoo/odoo#47071
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The widget Selectbo was performing a search_read on every field while
only using the fields id and name. This search_read has become very costly
in the latest version due to some new fields.
We now limit the search_read to the useful fields.
closesodoo/odoo#45707
X-original-commit: a4832ccdeedd777b43825e41ffb8c20937022279
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Following things are done in this commit:
1. changed some labeling and string for more readable and helpful to the user
2. added extra width to the text box
3. added publish/unpublish option for mobile view.
4. track page option auto-activated for any new page,event,job offer,course,
blog.
task-2088546
closes#40085
Co-authored-by: jpr-odoo <jpr@openerp.com>
Simple `this` instead of `self` mistake which prevents the widgets to
trigger up events.
closesodoo/odoo#44617
X-original-commit: 033ad6680794e037566720f35b0285e18f3d2130
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Followup of a425695e
The terms were back in 12.0
Courtesy of Juan José Scarafía
closesodoo/odoo#41624
X-original-commit: 85d0c7001a997748d7691205bbb8d066597591a5
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
The link tracker model (link.tracker) contained favicon (store)
and icon_src computed fields. Computing favicon took
{3-6.5%} of installing odoo (with demo data) due to syncronous http
call to a external link (google).
Moreover, these fields had no sense to be store in odoo
and only used in one template. This template was modified to
display the same information (icon) as before but without storing fields
and with a lazy loading of icons.
TASK_ID: 2083715
closesodoo/odoo#38405
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit adds two buttons on the link.tracker tree view:
- Visit Page : Redirects the user to the visited page
- Statistics : Redirects to the page statistics
(with the '+' at the end of the shortened url)
In this commit we also add some padding to the graph of the page statistics
LINKS
closes odoo/odoo#37378
Taskid: 2075858
Pr: #37344
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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
As we now have a new debug mode 'tests' which load a new asset bundle
containing tour-test files, we moved those files to a new folder hierarchy.
That will clean the .js files trees.
Also, those files should be included in the new asset.
Basically, the .js tour files (not test) should be inside /static/src/js/tours
while .js tour test files (test=true) should be inside /static/tests/tours next
to QUnit tests, inside a tours folder.
+ test_new_api: don't run the test in debug assets
task-1934445
Comes with https://github.com/odoo/enterprise/pull/4281Closes#33213
The feature was broken by #28404 which made the JS make use of the
"animations" system.
Currently, on the website, we have an option 'Track this page' in promote
section, which will give us the URL of the landing page.
However, this option is not working and shows the default placeholder
provided on the input.
This commit will fix the issue. From now 'Track this page' option will get
the URL of the landing page and it will be shown on input rather than the
default placeholder value.
task-1998160
closes#33603
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is following c78da8a80 that fixed website_links module.
We had to merge it with a skipped test as there was an error only appearing
with Docker (on runbot or on local with Docker).
This commit fix that test error and some other remaining bugs not found during
the first fix:
1. Fix the test error by adding a step to show recently used links. Indeed the
bug was that newest links would return inconsistent order as both 2 links
created during the steps have the same creation date.
On runbot it would click on the wrong link, the one which has 0 clicks.
Then JS would crash (see error bellow).
2. `websiteLinksCharts` JS animation class would execute all the `start`
method code even if there was no `_totalClicks`. JS would then crash as
`beginDate` would not be set correctly. Before the refactoring all that code
would be skipped as surrounded by an if/else condition.
3. BS3 to BS4 broke the nav-tabs layout to switch between 'Newest, Most Clicked
and Recently Used. `mt16` needed to be removed.
Closes#31829
- The fetch of recently/most clicked links was not working due to the
fact that the widget handling this feature had not parent, thus not
having access to ajax.rpc to make rpc calls.
closesodoo/odoo#31712
Signed-off-by: Christophe Simonis <chs@odoo.com>