summaryrefslogtreecommitdiff
path: root/addons/website/tests/__init__.py
AgeCommit message (Collapse)Author
2019-02-06[FIX] website: allow scheme and port on domain (multi-website)Sébastien Theys
Before this commit, the website selection was not working when a scheme or port was encoded in the domain field. This was not obvious or natural for the user, because the easiest way to fill it was to copy/paste the URL from the browser. Now it works when scheme or port are encoded, it is even strongly recommended to actually encode them if they don't take a default value because they will be used when creating full URL to the website (typically when sending emails to clients where a link back is necessary). PR: #30000
2019-02-06[FIX] *: share URL on the correct website if possibleSébastien Theys
* = base, auth_signup, mail, portal, sale, website, website_sale Before this commit, sending an object by email would always link to web.base.url even if the object was created from a specific website. Now if the object has a website, we use the URL of that website if it is set. The fallback will always be on the web.base.url. opw-1921030 PR: #30000
2018-08-13[IMP] website,*: support multiple websitesJoren Van Onder
This implements support to administer multiple websites. Although the core functionality already existed, managing multiple websites was fairly technical. In the interest of database updates and migration this attempts to keep duplicated data to a minimum. To do this the usual generic records are rendered unless some website-specific record exists that replaces it. Copy-on-write (COW) is used to create these website-specific records. Through this mechanism creating a website-specific record is delayed until necessary. A COW mechanism has been implemented on 4 models: ir.ui.view, website.page, website.menu and ir.attachment. These COW mechanisms are activated when editing data through the website (aka frontend). These frontend edits (e.g. with web_editor) will be website-specific, possibly creating a website-specific record when necessary. When editing data in the backend nothing special will happen, even when editing a generic record. Note that because of this mechanism also facilitates the ability to create new, uncustomized websites because the generic data is kept. Support is provided for a website to have any theme. Themes are fairly complex to handle. Standalone themes can depend on other standalone themes (e.g. theme_beauty depends on theme_loftspace) and themes usually modify some data of the themes they depend on. Because a theme can be installed on multiple websites, using website_id m2o fields does not work well. It would require duplicate data, making updates and migration harder. Because of this, data for themes (ir.ui.view and ir.attachment specifically) have a theme_id m2o. website has a theme_ids m2m that identifies all theme modules currently installed on it. Through these fields we figure out what to render. A theme is only fully uninstalled when it's no longer active on any website. The advantage of this approach is that upgrading or migrating theme data is no different from the single-website case. The website.published.mixin class was modified to handle multiple websites. A wizard was added in the backend to easily manage this for multiple website. Although not used anywhere in this commit, a 'website_id' variable has been added in the evaluation context of ir.rule. It allows to easily make any model multi-website aware, all that's needed is a custom website_id m2o field on a model and a custom record rule.
2018-06-15[FIX] qweb: use cdn for asset filesChristophe Matthieu
Refactoring of qweb to call _post_processing_att for each nodes. This change remove the crappy ovewrite in website module. The website overwrite only the _post_processing_att to add the cdn parameters. The static node (without t- attributes) can stay static (remove overwrite of _is_static_node), the cdn is applied at the compile time for this nodes instead of at the running time like the dynamic node.
2017-04-28[FIX] Various P3-related import changesxmo-odoo
* LDAP import: python-ldap is not python3-compatible, pyldap is Warning: only supported from debian Stretch (current testing)? https://packages.debian.org/search?searchon=names&keywords=pyldap * implicitly relative imports * imports of moved or removed stdlib modules issue #8530
2016-08-04[REF] website_*: remove `render` method on websiteJérome Maes
Since saas-3, website controllers use `request.website.render` to render the template of a web page. This was kept for retro compatibility. It's time to stop using deprecated stuff. Same for `_render` method on website. 'json' route don't use `request.render` since `JsonRequest` has no `render` method.
2014-06-29[IMP] test impprove HTTPCase openerAntony Lesuisse
Simplify website crawler using the generic HTTPCase opener
2014-02-17[FIX] re-enable crawler testsXavier Morel
Move URLCase back out of the test module, otherwise loadTestFromModule attempts to load it in the usual manner (~URLCase('runTest')). Which does not work at all, because that's not what URLCase is for. URLCase extends TestCase to benefit from the TestCase.run infrastructure (running tests, filling result object, etc...) bzr revid: xmo@openerp.com-20140217151535-alq7pq6qapski73x
2014-02-17[FIX] website testsAntony Lesuisse
bzr revid: al@openerp.com-20140217001148-2ub37hxyz8tbxrwe
2014-02-09[FIX] disable http test before conversionAntony Lesuisse
bzr revid: al@openerp.com-20140209141950-o9sf0jual07y315f
2013-12-18[IMP] Basic support for ui testsddm
bzr revid: ddm@openerp.com-20131218145628-9oqxlwy4g05n4jwa
2013-11-05[ADD] CMS crawling case, with a bunch of hardcoded values to fixXavier Morel
bzr revid: xmo@openerp.com-20131105145047-4ccrchj79lohry5q
2013-09-30[IMP] move conversion out of view.saveXavier Morel
Also, html.fromstring does weird stuff when encoding is not specified, force to utf-8 just in case. bzr revid: xmo@openerp.com-20130930145358-qh7xdicgg21prsk4
2013-09-10[ADD] move view.save tests from serverXavier Morel
bzr revid: xmo@openerp.com-20130910133055-75q72gd75sty317m