Commit Graph
816 Commits
Author SHA1 Message Date
Christophe Simonis a0d7763e09 [MERGE] forward port branch saas-11.2 up to 932e641be1 2018-02-23 17:20:52 +01:00
Christophe Simonis 9a84ba5533 [MERGE] forward port branch saas-11.1 up to e750bb6e11 2018-02-22 10:39:15 +01:00
Christophe Simonis ae6a65753e [MERGE] forward port branch 11.0 up to dbb713c2f8 2018-02-21 20:19:26 +01:00
Romain Derie 96a10815ab [FIX] website: Editing the URL of a menu with an already existing URL
Before this commit:
If you changed the URL of a menu linked (m2o) to a website page and the new URL
was already taken by another page, it would edit the menu.url and the
menu.page.url resulting in the menu's page having the same URL than the already
existing one.

Now, if you edit the URL of a menu linked to a page and the URL is already
taken by another page, we will simply change the menu/page m2o relationship
without writing on the menu's initial page's URL.
2018-02-19 17:38:38 +01:00
Martin Trigaux a2e76bb7e3 [FIX] website: correct typo 2018-02-19 15:48:11 +01:00
Romain Derie 4f418c26d5 [FIX] website: sitemap.xml incorrect domain
Before this commit, the domain use to retrieve pages in enumerate_pages was
wrong (mainly used for sitemap.xml). It would only show website.page that:
1. are published
2. are indexed
3. have a publishing date (whatever date, future or past).
Last point was incorrect

Now, we correctly retrieve pages that:
1. are published
2. are indexed
3. have no publishing date or a publishing date in the past
2018-02-15 23:13:50 +01:00
Christophe Simonis adeea2a88d [MERGE] forward port branch saas-11.2 up to 0f02dcb639 2018-02-12 18:34:43 +01:00
Christophe Simonis 0f02dcb639 [MERGE] forward port branch saas-11.1 up to c69d00157e 2018-02-12 18:08:27 +01:00
Christophe Simonis 5f3301e5cb [MERGE] forward port branch 11.0 up to 20e4cd5bcd 2018-02-09 16:13:08 +01:00
qdp-odoo 4a3df5256a [FIX] *: fixed decorators on copy() 2018-02-09 10:32:23 +01:00
Christophe Simonis da19a7701e [MERGE] forward port branch saas-16 up to 23752102a0 2018-02-07 17:47:26 +01:00
Christophe Simonis 23752102a0 [MERGE] forward port branch saas-15 up to 830327c66a 2018-02-07 15:18:07 +01:00
Christophe Simonis 830327c66a [MERGE] forward port branch saas-14 up to af8de1a3ed 2018-02-07 14:55:37 +01:00
Christophe Simonis ae3643ba2a [MERGE] forward port branch 10.0 up to a93a9d43e6 2018-02-07 13:34:03 +01:00
qsm-odoo a93a9d43e6 [FIX] website: allow "Customize theme" when CDN option enabled
Traceback because the `_get_asset` function was called by the
`theme_customize` route without the `values` argument (which is not
necessary for the feature).

Closes https://github.com/odoo/odoo/issues/22516
2018-02-07 12:50:28 +01:00
Christophe Simonis e00a447e2c [MERGE] forward port branch saas-11.1 up to 7e469eb77a 2018-02-01 18:20:28 +01:00
Christophe Simonis 7e469eb77a [MERGE] forward port branch 11.0 up to f5e7b86686 2018-02-01 18:15:21 +01:00
Jeremy Kersten 70d638b690 [FIX] website: let the 404 exception catch by _handleException
Don't rewrite the wheel with serve_404.
It is the job of HandleException to do it.

In the same time, that will fix the status code that was
previously 200 instead of 404 in serve_404

This commit closes #22438
2018-02-01 14:13:32 +01:00
Thibault Delavallée 175671c59c [FIX] website: correctly propapate field renaming
At commit faf6165e03 some configuration fields have been
renamed as config field naming has been hardened. However renaming
has not been properly propagated through the code. This commit
fixes that.
2018-01-17 10:14:39 +01:00
Thibault Delavallée faf6165e03 [REF][FIX] base_setup, sale, website: update config field name for config_parameter fields
Those fields are prefixed by default_ which now strictly means they
should be linked to a default value for a given model. Their name
is updated so that it does not conflict with the strict verification
done recently for settings.
2018-01-16 13:34:29 +01:00
Richard Mathot a18bd499ac [REF] various: convert res.config.settings to use ir.config_parameter integration
This commit updates the various res config of Odoo addons to use the
newly-introduced config_parameter field attribute.
2018-01-16 13:34:29 +01:00
Christophe Simonis 03a36a9bba [MERGE] forward port branch saas-11.1 up to 56974322f8 2018-01-12 19:13:10 +01:00
Christophe Simonis 56974322f8 [MERGE] forward port branch 11.0 up to 3b80a059ff 2018-01-12 19:03:00 +01:00
Christophe Simonis b42b9c936b [MERGE] forward port branch saas-16 up to 3b7bf3a4b8 2018-01-12 18:15:23 +01:00
Christophe Simonis 3b7bf3a4b8 [MERGE] forward port branch saas-15 up to 8962b8ecc2 2018-01-12 17:23:10 +01:00
Christophe Simonis 8962b8ecc2 [MERGE] forward port branch saas-14 up to d35a76ee17 2018-01-12 16:47:12 +01:00
Christophe Simonis d35a76ee17 [MERGE] forward port branch 10.0 up to d76237e038 2018-01-12 16:16:51 +01:00
Christophe Simonis 4eaef03df3 [MERGE] forward port branch 9.0 up to 330f84f211 2018-01-12 11:25:58 +01:00
Romain Derie 0474de44c0 [FIX] website: unpublished homepage read error + first menu fallback
Before this commit:
1. If the website's homepage is unpublished and a public user naviguate on it,
it will log an access read error in the server. The user won't see the error
though.

2. If the user can't access '/', we serve the first menu's page instead.
This first menu's page can be an unpublished page, resulting in a 403, which is
not convenient.

3. Menus are sorted by sequence, then the ORM sort them by write_date.
Menu with same sequence will be sorted differently every time you edit one of
them. (This issue get hidden/solved if user edit and save the menus with
"Edit Menu" since it will recompute every sequence.)
  - Create 3 pages 'A', 'B', 'C', with 'Add page in menu' enabled
  - Menu is now 'A B C'
  - Edit website.page B (in property dialog), it will write on the page's menu
    aswell
  - Menu is now 'A C B'

Now:
1. We prevent this error by ensuring the page is published and so can be read
by anyone before accessing its properties.

2. We serve the first menu's page that is published

3. We sort menu by id after sequence to keep original order

This closes #21259
2018-01-11 13:33:30 +01:00
Romain Derie bf8519853f [FIX] website: hide menu if related to an unpublished page
Before this commit, if there was a menu entry linked to an unpublished
website.page, the menu would be shown. For restricted users, they would land on
a 403 forbidden.

Now, we dont show website.page's menu if user can't access it.

This closes #21328
2018-01-11 13:30:12 +01:00
Romain Derie 32701aa512 [FIX] website: menus with null URL would throw an error on display
Before this commit, if a website.menu had a URL set to null, it would throw an
error when displaying that menu.
It is normally not possible to do so in v11 but after a migration, menus can be
empty. (eg: Using an empty menu to display a divider in a dropdown menu)

Now we return an empty url instead of an error
2018-01-11 12:49:18 +01:00
Christophe Simonis 782154da11 [MERGE] forward port branch saas-11.1 up to f6ef0c7760 2018-01-10 20:35:53 +01:00
Paul Catinean eded3cfda8 [FIX] website: check that website.user_id is not falsy
This field should be required.

This commits closes #21997

@kangol: diff in addons/website/models/ir_http.py is for existing db
It can be ignored in master because required will be apply
2018-01-10 13:09:32 +01:00
Christophe Simonis 228ecdbe28 [MERGE] forward port branch 11.0 up to ff0abd214c 2018-01-10 11:41:35 +01:00
Kinjal Mehta 145c1fd931 [IMP] website,website_blog,website_event_track,website_sale_stock,website_sale: changed duplicate field label in the same model 2018-01-04 17:56:57 +05:30
Adrian Torres 9f583717e5 [FIX] website: unlink website_id (#21972)
In the module website, the relational field website_id is defined twice,
once for ir_ui_view and a second time for res_config_settings, for the
former we perform an ondelete='cascade', which means that when the
website model is unlinked, the field is unlinked as well.

This is not done for the website_id field in res_config_settings, which
instead defaults to setting the field to NULL, which violates a not-null
constraint and therefore causes issues when trying to modify/save
settings.

To solve this, a hard delete of the ir_model_field website_id is
performed during the uninstall process of the website module.

Fixes #21905
OPW 803018
2018-01-03 13:53:44 +00:00
Christophe Simonis 55b810dc70 [MERGE] forward port branch saas-11.1 up to 726b91b9fb 2018-01-03 14:05:48 +01:00
Christophe Simonis 362f0489d0 [MERGE] forward port branch 11.0 up to fe22a0f9ca 2018-01-03 12:28:52 +01:00
Romain Derie 174cd2aeee [FIX] website: website had incomplete context
Before this commit, website had incomplete context.
It was causing website.menu to not be translated correctly because lang was
not set on website.

Now, since the website has the context correctly binded, menus are translated

opw-787012
2017-12-22 15:44:39 +01:00
Christophe Simonis 4708812b6c [MERGE] forward port branch 11.0 up to b37cc1f9b7 2017-12-12 18:50:59 +01:00
Romain Derie 9d2d9a3528 [FIX] website: edit website.page's menu URL not saving
Before this commit, editing a website.menu (linked to a website.page (m2o))
would not save the URL on the website.page record but only on the
website.menu.
But since the URL retrieved to display the website navbar is:
  1. The website.page url if the menu has a page_id
  2. The website.menu url otherwise
It would never get the edited URL stored on website.menu
2017-12-12 17:50:41 +01:00
Jeremy Kersten 294dc70a38 [FIX] http_routing, website: fix and clean routing
Clean method _add_dispatch_parameters
Remove unused code for caching

Call super before to have the correct lang when we browse website.
Without it, menu was not loaded in correct language.
2017-12-12 17:47:08 +01:00
Adrian Torres 9a7fd72197 [ADD] social_media: new module for social media
This technical dependency module adds settings to res_company for the
company's social media pages.

It is introduced to fix duplicated fields for res_company in website and
mass_mailing, these two modules now require social_media as a dependency
2017-12-12 14:56:59 +00:00
Romain Derie 56ae134bb2 [FIX] website: allow user to create/remove website.menu
Before this commit, an user could not create or remove a website.menu since
there was no list/form view for it. Changing sequence also impossible.
Therefore, it was impossible to create or delete a menu from an event. (you
could just edit the existing one)

Now, user can access in debug mode to the list and form view of website.menu to
manage the menus.

This commit also add a link on the ir.ui.view form view to access it's related
website.page

This closes #21302
2017-12-12 15:27:51 +01:00
Adrian Torres b7ce07ad2a [FIX] website, mass_mailing: same field defined twice (#21503)
The ORM does not currently, an probably won't support two fields with
the same name in different modules that do not depend on each other.

This is obviously a nasty hack, but it's the best one can do for a
stable branch.

THIS IS WHY WE HAVE DEPENDENCY MODULES, PEOPLE.
2017-12-11 10:43:48 +00:00
Christophe Simonis 2f99470458 [MERGE] forward port branch 11.0 up to c201cf2b77 2017-12-01 12:55:02 +01:00
Christophe Simonis 42264d8dcb [MERGE] forward port branch saas-16 up to 5d7ad2b16c 2017-11-30 18:43:08 +01:00
Christophe Simonis ab084d580f [MERGE] forward port branch saas-15 up to 98539336a5 2017-11-30 15:27:59 +01:00
Christophe Simonis 98539336a5 [MERGE] forward port branch saas-14 up to b780e4a0e4 2017-11-30 14:44:49 +01:00
Christophe Simonis 299a5e058b [MERGE] forward port branch 10.0 up to 7754538750 2017-11-28 12:25:16 +01:00