summaryrefslogtreecommitdiff
path: root/addons/link_tracker/models/link_tracker.py
AgeCommit message (Collapse)Author
2019-03-21[MERGE] forward port branch saas-12.1 up to 6878c9f3424Christophe Simonis
2019-03-18[FIX] link_tracker: prevent undeterministic order on new/recent filterRomain Derie
Before this commit, ordering by `create_date DESC` and `write_date DESC` could lead to undeterministic order if multiple records had the exact same date. This is the case during tests as `crate_date` is set to transaction start time. (That's what NOW() in PSQL does) Now, we enforce that order to avoid randomness. Related to #31829 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-01-14[IMP] link_tracker: make code field required on link.tracker.code modelThibault Delavallée
Indeed it makes no sense to have void codes. This commit is linked to task ID 1904277 and PR #28242.
2019-01-14[CLN] link_tracker: clean some codeThibault Delavallée
Purpose of this commit is to remove some unnecessary code in link tracker. * remove unnecessary code / parameters: * remove unused field click_date on click as create_date is already used for that purpose; This commit is linked to task ID 1904277 and PR #28242.
2019-01-14[REF] link_tracker, mass_mailing: simplify add_click method and add testsThibault Delavallée
In this commit we rewrite a bit add_click in order to remove the inlined sudo and ease inheritance and parameter management inside the method. Access through controllers is sudo-ed as the main API method is now done with current user access rights. This commit is linked to task ID 1904277 and PR #28242.
2018-12-31[FIX] link_tracker: _sql_constraints not appliedAndrea
The unicity was not applied closes odoo/odoo#29793
2018-10-26[REF] link_tracker: clean module viewsThibault Delavallée
Purpose is * to clean a bit views; * to improve link.tracker form view to have information better displayed; * to remove unused views; This commit is linked to task ID 1896681 and PR #27975.
2018-10-26[REF] link_tracker: reorganize python according to guidelinesThibault Delavallée
This was not correctly done when splitting the module at fd5361c0f7116e951cf9e69e2d97a8ccb07ce1b6. Future commits will clean a bit the code in order to better understand how this module works. This commit is linked to task ID 1896681 and PR #27975. No functional change should occur with this commit as it contains only renaming / move.
2018-10-26[MOV] link_tracker: organize module structure according to guidelinesThibault Delavallée
This module still holds old code and deserves some love. This commit cleans a bit the init and manifest files as well as renaming view file according to guidelines. This commit is linked to task ID 1896681 and PR #27975. No functional change should occur with this commit as it contains only renaming / move.
2018-10-18[FIX] mass_mailing: fix tracking link creation in mass mailingThibault Delavallée
When using only mass mailing two issues arise when trying to send mass mailings containing links * a link.tracker is created for each link to shorten; however rights are given currently only in website_links for website designers and not to marketing users that use mass mailing. This commit adds the rights for link.tracker model to those people; * a link.tracker.code is created to hold the shortened versions of the links. As it is a technical model it is now done as superuser as rights on link.tracked model has already been granted and adding rights on such a technical model is not necessary; A test is added that checks what is done with links when sending mass mailings. It helped spotting the hereabove issue. This commit is linked to task ID 1889703 and PR #27526.
2018-09-21[IMP]marketing: Improvement in model descriptionNimesh Jethva
Purpose of this commit is to give description more "business oriented" because those descriptions appears in Odoo Studio which is supposed to be used by end users, not only by developers. Related Task ID : 37311
2017-10-12[FIX] link_tracker: python3 can't concat bytes to strrde
2017-09-22[FIX] link_tracker: Use the correct method namePrakash Prajapati
Issue introduced by https://github.com/odoo/odoo/commit/7accd77999ebcd4ce16388f2a23ee296093fecbc
2017-09-15[REF][FIX] link_tracker, mass_mailing: factorize method creating link ↵Thibault Delavallée
tracker click values This commit factorizes the link.tracker.click values computation out of the add_click method. This method is called when customers click on links in email that are tracked in Odoo. Purpose of this commit is * to effectively put mass mailing related code into mass mailing. Currently link_tracker holds code related to mass mailing which is not in its dependency tree. Let us therefore try to be a bit modular and add a proper inheritance in mass mailing; * allow addons to inherit from the click values prepare method to add specific values depending on their behavior like mass mailing adding links to a mass mailing and a mass mailing campaign;
2017-09-15[FIX] link_tracker: no string.letters in Python 3xmo-odoo
2017-08-23[MERGE] forward port branch saas-16 up to db0810dc6e0Christophe Simonis
2017-08-23[MERGE] forward port branch 10.0 up to 420e433fa3aChristophe Simonis
2017-08-23[FIX] link_tracker: do not track 'tel:' or 'sms:' linksNicolas Martinelli
- Create a mass mailing including a 'tel' or 'sms' link, e.g. `<a href="tel:555-000-0000">555-000-0000</a>` - When sent, the link is converted to a tracked linked (`http://...`) We do not want to convert these links, they should be handled by the browser directly. opw-765885
2017-08-20[FIX] P3: remove pycompat.{keys,items,values} helpersOlivier Dony
Now that we're closer to switching to P3 for good, these helpers have outlived their usefulness, and mostly add noise. All remaining dict.iter*() or dict.view*() must be converted to the normal keys(), values() or items() calls. Whenever the result is likely to be used for more than the scope of a loop, or when the dict needs to be modified during iteration, the calls must be wrapped in a ``list()``, to protect the new P3 semantics. Those cases are very exceptional. Also removed some dead code or improved the API to remove unnecessary conversions.
2017-08-20[FIX] P3: fix base64 and StringIO usesXavier Morel
* StringIO removed from stdlib, replace with io * try to correctly handle BytesIO/StringIO (one is for bytes the other is for text) * fix base64: Python 3 removed bytes-encoding and bytes-bytes codecs (via #encode) so replace all calls to str.encode('base64'), also b64encode is a bytes->bytes conversion so attempt to properly handle that issue #8530
2017-05-15[FIX] P3: urllib, urllib2 and urlparseXavier Morel
In Python 3, all of these were "consolidated" under urllib(.request, .parse, .errors) which is inconvenient. Since we already have hard dependencies on requests and werkzeug(.urls, which is a backport of Python 3's unicode-aware urllib.parse) migrate *everything* to that. A sticking point is urllib2.URLError, those were (mostly) replaced by the slightly more general IOError which URLError extends.
2017-05-10[FIX] P3: list -> iterable builtins (#16811)xmo-odoo
In Python 3: * various builtins and dict methods were changed to return view/iterable objects rather than lists * and the separate Python 2 view/iterable builtins and methods were removed altogether This is problematic when using these items as list (which the happens repeatedly in Odoo), but more viciously when iterating *multiple times* over them (which also happens, which I've messed up multiple times while writing this, and which is a pain to debug even when you've just created the issue). Convert all code using these to semantics-matching cross-version helper functions to get the LCD behaviour between P2 and P3, and forbid the builtins via lint. issue #8530
2017-02-23[MERGE] forward port branch 10.0 up to 387b2acfcbfChristophe Simonis
2017-02-23[MERGE] forward port branch saas-11 up to 1730dca1016Christophe Simonis
2017-02-21[FIX] link_tracker: convert link with ampersandDenis Ledoux
Links containing HTML escaped characters, such as the ampersand `&` escaped `&amp;` were not shortened correctly: Their redirecting URL contained the escaped value (e.g. `&amp;`) instead of the actual character, leading to the wrong redirected URL. e.g. creating a mass-mailing with a link contains as query string ?test1=1&test2=2 were shortened with as redirect link ?test1=1&amp;test2=2 opw-708272
2017-01-03[REF] ir_config_parameter: remove `group_ids` and simplifyRaphael Collet
Add `sudo()` to call `get_param` where necessary, and make the web client use a controller instead of directly accessing parameters.
2016-08-10[IMP] various: use odoo for imports instead of openerp and update class namesThibault Delavallée
2016-06-13[FIX] link_tracker: page title encodingDenis Ledoux
When tracking a page with special characters in the title (e.g. `Ä`), the title of the page in the tracked links was badly encoded, because the encoding was not handled correctly when parsing the given website page. opw-679993
2016-02-15[FIX] link_tracker: use werkzeug url_encode instead of urllibDenis Ledoux
`Werkzeug.url_encode` can handle unicode, while `urllib.urlencode` cannot. opw-669541 Fixes #10928
2015-10-01[MERGE] forward port of branch saas-6 up to e9f1ee4Christophe Simonis
2015-07-10[IMP] mass_mailing: remove depends to website. Create a website_mass_mailing ↵Christophe Matthieu
bridge to add subscribe snippet into website builder. Split website_links to have link_tracker to create short and trackable URLs, and website_links to have a website layout for link_tracker and add button to share page.