Commit Graph
353 Commits
Author SHA1 Message Date
Andrea Grazioso (agr-odoo) fe82ccc860 [FIX] link_tracker,website_links: use specific site url
- 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

closes odoo/odoo#77705

X-original-commit: d094d76354d6f46db3dc7f8e716b5f778ca26569
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-10-04 14:12:26 +00:00
Xavier-Do 288595f558 [FIX] *: add explicit license to all manifest
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.

closes odoo/odoo#74245

Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-07-26 13:09:57 +00:00
Samuel Degueldre f9cc4281b6 [REF] web, website: convert public widget registry to core registry
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
2021-07-14 07:08:58 +00:00
Martin Trigaux 6758868731 [I18N] *: export saas-14.4 source terms
Without demo data

closes odoo/odoo#73560

X-original-commit: 802e46541117573e028b711ea33dad9df9075a39
Related: odoo/enterprise#19602
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-07-12 10:57:37 +00:00
Jeremy Kersten 478068c829 [IMP] *: always use Odoo Response
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 ;)

closes odoo/odoo#72599

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-08 07:00:06 +00:00
std-odoo b7e5eb639a [FIX] link_tracker: clean code and fix add a constraint
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

closes odoo/odoo#48845

Related: odoo/enterprise#9608
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-17 13:28:43 +00:00
Julien MougenotandSimon Genin 03641610c2 [REF] *: convert all modules to new asset system
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>
2021-03-31 13:57:18 +02:00
David Beguin 14316fbc31 [FIX] im_livechat: fix livechat usability
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
2021-03-29 11:17:47 +00:00
qmo-odoo fb53eb10cb [IMP] utm*: Rename is_website field
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>
2021-03-15 16:11:26 +00:00
Benoit Socias 90a7072f93 [FIX] website_links: not perform a request during automated test
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

closes odoo/odoo#62582

X-original-commit: db3296c034fe4c82d19580418fd5cdecdf578395
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-11-30 09:28:17 +00:00
nie 0f59c5b41b [FIX] website_links: Crash when loading data more than a week old
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

closes odoo/odoo#58113

X-original-commit: 875aeb5c55b96fc3f7d76fc67d56f60df8453ec3
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
2020-09-21 10:09:12 +00:00
Martin Trigaux 90d85eb9c5 [I18N] export saas-13.5 source terms
Without demo data

closes odoo/odoo#56869

X-original-commit: 33f251b6489455cd7221f2c62dee0400a69784b8
Related: odoo/enterprise#12836
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-01 11:18:00 +00:00
Nicolas Martinelli dafe96b3da [FIX] website_links: prevent display of huge list
- 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

closes odoo/odoo#54947

X-original-commit: 7c7986361704d7b82b115499e64c47eb74ab655f
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-07-27 08:24:30 +00:00
Xavier Morel 630beba02e [FIX] website_links: incorrect uses of redirect
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

closes odoo/odoo#53327

X-original-commit: 3a6e079e54a6f973cfc96995a84a7fabff803f1c
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-06-19 13:05:11 +00:00
Aaron Bohy 900d162809 [IMP] *: update list views
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
2020-05-05 10:05:12 +00:00
DramixDw 52c23e01e3 [REM] website,*: remove About us page and references
Remove the default about us page because it could be easily recreated and
doesn't add a lot of value to the website.

task-2189613
2020-05-01 07:58:11 +00:00
Martin Trigaux 2d00263127 [I18N] *: export saas-13.3 translations
closes odoo/odoo#50031

X-original-commit: 15a7a9f9d71a0b9c46d7caf2f4fbf09a5a4c63fe
Related: odoo/enterprise#10140
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-04-23 07:13:48 +00:00
jvm-odoo 3b862b4c29 [FIX] website_links: fix UI for big data
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

closes odoo/odoo#47071

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-06 11:10:48 +00:00
Rémi Rahir 8f6bf2087e [IMP] website_links: performance on search_read
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.

closes odoo/odoo#45707

X-original-commit: a4832ccdeedd777b43825e41ffb8c20937022279
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2020-02-19 11:59:16 +00:00
Bhavita Bhattandjpr-odoo 4e162a4e75 [IMP] website, website_link: improve frontend config screens
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>
2020-02-11 15:30:00 +00:00
qsm-odoo eccf6ed458 [FIX] website_links: properly attach graph widgets to the hierarchy
Simple `this` instead of `self` mistake which prevents the widgets to
trigger up events.

closes odoo/odoo#44617

X-original-commit: 033ad6680794e037566720f35b0285e18f3d2130
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-04 17:09:32 +00:00
Martin Trigaux b7d91ba25b [I18N] *: remove es_AR translations
Followup of a425695e
The terms were back in 12.0
Courtesy of Juan José Scarafía

closes odoo/odoo#41624

X-original-commit: 85d0c7001a997748d7691205bbb8d066597591a5
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-10 10:00:18 +00:00
Kevin Baptiste 6cbe824871 [REV] web: reverts update to fontawesome 5.11.2
This reverts commit ff1c35513a.

closes odoo/odoo#41480

X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc
Related: odoo/enterprise#7110
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-09 10:33:36 +00:00
Kevin Baptiste ff1c35513a [IMP] web: update to fontawesome 4.7.0 to 5.11.2
FontAwesome 5 introduced new names for some icons as described on
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes

This commit replaces the old names to the new ones.

closes odoo/odoo#35826

Taskid: 2050241
Related: odoo/enterprise#5180
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 10:05:12 +00:00
ryv-odoo e0ba61d9fb [REM] website_links: remove favicon, icon_src for performance
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

closes odoo/odoo#38405

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-10-10 15:19:43 +00:00
Odoo Translation Bot b6e7ed6c7b [I18N] Update translation terms from Transifex 2019-10-07 09:11:11 +02:00
Odoo Translation Bot 40deff7cbe [I18N] Update translation terms from Transifex 2019-10-01 21:21:46 +02:00
Odoo Translation Bot d7b8831ea8 [I18N] Update translation terms from Transifex 2019-09-29 01:22:33 +02:00
Martin Trigaux 6378c8fb25 [I18N] *: export saas-12.5 source terms
Still without demo data

closes odoo/odoo#37502

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-27 11:58:55 +00:00
qmo-odoo 403bf9e76f [IMP] website_links, link_tracker: Add action buttons on tree view
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>
2019-09-25 14:06:24 +00:00
Victor Feyens 07631a5185 [IMP] * : manifest module categories cleanup
closes odoo/odoo#35754

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-09-25 14:03:45 +00:00
Odoo Translation Bot e80b81dca1 [I18N] Update translation terms from Transifex 2019-09-15 01:30:37 +02:00
Odoo Translation Bot 86809804f9 [I18N] Update translation terms from Transifex 2019-09-01 01:28:13 +02:00
Christophe Simonis 140ee6b8f0 [MERGE] forward port branch saas-12.4 up to 98a55917a6 2019-08-14 16:48:10 +02:00
Martin Trigaux 8be6470a82 [I18N] *: export saas-12.4 source terms 2019-08-13 11:53:38 +02:00
qmo-odoo d716b53883 [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
2019-08-02 12:35:39 +00:00
Christophe Simonis 71a50a2214 [MERGE] forward port branch saas-12.3 up to 409679866b 2019-06-06 11:54:35 +02:00
Christophe Simonis c8d7ad9a6b [MERGE] forward port branch saas-12.2 up to 995aa1685e 2019-06-03 15:49:31 +02:00
Romain Derie fdbf11643f [IMP] *: move test and tour files to new folder hierarchy and asset
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/4281
Closes #33213
2019-06-05 05:56:33 +00:00
Christophe Simonis 5ac0c7960c [MERGE] forward port branch saas-12.1 up to 9bcc0498c0 2019-05-28 12:25:14 +02:00
Varun Raval bf70759e14 [FIX] website_links: fix url of the landing page in link tracker
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>
2019-05-23 11:12:58 +00:00
Odoo Translation Bot 4b033b3917 [I18N] Update translation terms from Transifex 2019-05-12 06:07:53 +02:00
Romain Derie d0cd971afb [FIX] website_links: fix remaining bugs and restore skipped test
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
2019-03-18 13:54:11 +00:00
Odoo Translation Bot 01a5464509 [I18N] Update translation terms from Transifex 2019-04-28 06:07:42 +02:00
Odoo Translation Bot 1b932b339a [I18N] Update translation terms from Transifex 2019-03-24 06:23:04 +01:00
Géry Debongnie 8b7891044d [IMP] *: use Chart.js in website_links/website_sale_link_tracker.
This commit is one part of the task 'removing nvd3'.
We use now Chart.js to draw charts.

Task ID: 1946138
2019-04-01 14:40:51 +00:00
Christophe Simonis 5df4746c9a [MERGE] forward port branch saas-12.2 up to 230ad8c381
closes odoo/odoo#32088

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-25 11:13:41 +00:00
Christophe Simonis 44515bc7be [MERGE] forward port branch saas-12.2 up to c9f832d9f0
closes odoo/odoo#31790

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-13 14:24:51 +00:00
Toufik Ben Jaa 7d4ca67680 [FIX] website_links: links fetching not working
- 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.

closes odoo/odoo#31712

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-08 14:54:37 +00:00
6928bfb6c7 [REF] website_links: adapt code after jQuery update
Part of task 1896658

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Christophe Matthieu <chm@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: David Monjoie <dmo@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
Co-authored-by: svs-odoo <svs@odoo.com>
Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
2019-03-06 20:07:17 +01:00