Commit Graph
5315 Commits
Author SHA1 Message Date
jbm-odoo 853a773ee4 [IMP] settings: Improve general UX (back2basics)
TaskID: 2043133

closes odoo/odoo#35382

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-13 12:32:30 +00:00
fja-odoo 83310f4404 [IMP] *: change title and subtitle of warnings
* = portal, test_website, web, website

The title will now be "Someting went wrong." and we will no longer
display the error type as it is not usefull info to the user.

The message of the warning modal was not displayed right if too long.
Now it will be displayed properly.

Related to https://github.com/odoo/odoo/pull/32132 and
https://github.com/odoo/odoo/pull/35209

Part of https://github.com/odoo/odoo/pull/35342

task-2047628
2019-08-09 14:17:31 +00:00
Andrea Ulliana d5d2f5014a [IMP] website: make SEO dialog clearer
Part of https://github.com/odoo/odoo/pull/34422
task-2026299

closes odoo/odoo#34422

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-09 09:45:07 +00:00
Andrea Ulliana 599d23c670 [IMP] website: make the menu/link dialog clearer
Part of https://github.com/odoo/odoo/pull/34422
task-2026299
2019-08-09 09:45:07 +00:00
Andrea Ullianaandqsm-odoo 615f4ceefd [IMP] website: make theme dialog clearer
Review labels and alignements.

Part of https://github.com/odoo/odoo/pull/34422
task-2026299

Co-authored-by: qsm-odoo <qsm@odoo.com>
2019-08-09 09:45:07 +00:00
qsm-odoo e60323f876 [IMP] website, *: improve brand promotion in the footer
* web, website_event, website_sale, sale_quotation_builder

Instead of an ugly danger-colored badge promoting "odoo", we now use
the official odoo logo. The code is also refactored to use more
consistent and translatable sentences without duplicated code.

Note: the odoo logo is added in the repo, downloaded from our official
brand assets page (https://www.odoo.com/page/brand-assets), in its
'tiny' version. The repo already contained multiple odoo logos but they
are quite old and should be replaced in a further update. Note: the svg
version was not able to be used as it contains external margins...

Part of https://github.com/odoo/odoo/pull/34422
task-2026299
2019-08-09 09:45:07 +00:00
fja-odoo 736353b169 [IMP] website, *: improve published smart button
* = web, website_blog, website_crm_partner_assign, website_event,
website_event_track, website_forum, website_hr_recruitment,
website_livechat, website_partner, website_profile, website_sale,
website_sale_delivery, website_slides

The published button name is a bit ambiguous, now it will clearly state
what it does with a new title : "Go to Website". The "Published",
"Unpublished" state is shown with the globe icon changing color
(green and red) and a title on the button.

Badge and Delivery don't have a website page, the button will then be
a publish/unpublish button in the backend.

task-2002435

closes odoo/odoo#34261

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-08-08 16:05:33 +00:00
Martin Trigaux 85ee046b37 [IMP] *: use res.lang methods
get_installed and _lang_get_id are both ormcached and correctly check
the context

Retrieving a res.lang from a code is a frequent action that can be
achieved with _lang_get (cf previous commit).
Using _lang_get ensure the active_test in the context is correct and
is not poluted with another context propagation issue.
odoo/odoo#35490 discussion is an example of bad context propagation

closes odoo/odoo#35504

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-07 13:06:17 +00:00
mreficent 355a5dfc36 [IMP] *: fix typos in comments
closes odoo/odoo#35404

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-07 10:28:33 +00:00
Christophe Simonis 886eca0131 [IMP] *: remove usage of oldname attribute
This attribute is misleading as it is insufficient to correctly upgrade
the database. It only renames the column in the database, but other
operations are needed, like updating the corresponding `ir.model.fields`
record (and its xmlid). The default values and the translations are also
lost during the upgrade.

Moreover, this feature was misused. It was:
 - left on fields during multiple versions.
 - used on reports (SQL views). This would be ok if the feature was
   complete, but, as is, it was useless.
 - kept unchanged after a second renaming of the field (which can happen
   versions later the first rename).
 - used, even when the meaning of the field changed. i.e. the field
   `archived` has been renamed to the classic `active`, but the value
   in the database should be switched.
2019-08-05 09:36:41 +00:00
fja-odoo 5dac8f8f29 [REF] website, *: remove hardcoded image urls
* = website_forum, website_profile, website_sale,
website_sale_comparison, website_slides, website_slides_survey

Some image links were hard coded in the xml views of website, now they
are replaced with website.image_url(model, field).

Part of https://github.com/odoo/odoo/pull/34149
task-2007400

closes odoo/odoo#34149

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-05 13:24:22 +00:00
Romain Derie 4086f344d8 [FIX] website: correctly check security of publish mixin
Commit 916968058d introduced a mechanism to check rights when writing or
creating on `website_published` field.
Problem is, `website_published` is just kind of a related to `is_published`
which really stores the value.

Thus, the checks would not work when writing/creating on `is_published`.
That would leave a loophole to bypass the expected behavior.
2019-08-03 09:51:22 +00:00
Romain Derie 7a90dedd25 [IMP] website*: use published mixin rather than own field
*website_crm_partner_assign, website_customer

Before this commit, some models would create their own `website_published`
field rather than using the `website.published.mixin` mixin which should be
used instead.

That was done to be able to override the default value of the boolean.

This commit simply adds the possibility to override the default value of the
mixin field.

Also, help and string could simply be added on xml views rather than overriding
the field.
2019-08-03 09:51:22 +00:00
Romain Derie cc1d78a80b [IMP] *: correctly read/write website_published
The `website_published` field from the website's mixins is basically a readonly
from `is_published` field.
On read, this field will simply read `is_published` and check if the record's
website_id is accessible (only for the multi mixin).
On write, it will always write on `is_published`.

This commit improves a few things:
- A lot of code was writting on website_published which was just then writting
  on is_published. Writting directly on is_published makes more sense.
- Some backend fields would still reference `website_published` instead of
  `is_published` which would just go through the related for no reason.
  Plus, using `is_published` will make the field tooltip more accurate as we
  are not in a website context ('Visible on current website' to 'Is Published')
- Filter and search on tree view were still using the `website_published`
  related field, which is just a readonly when we are not in a frontend
  context.
- Some create and write function would have security check on
  `website_published` value but that was wrong as the user could bypass that by
  simply writting on `is_published`. For the write method, check `is_published`
  is more accurate as it will cover both case since `website_published` will
  then call the write method on `is_published`
2019-08-03 09:51:22 +00:00
Andrea Ulliana f9c2716b3e [IMP] website_forum: bring forum modes
It is now possible to specify the forum mode : Questions and Answers or
Discussions. In Q&A mode, a user can only reply once while there is no
limit in Discussions mode.

task-2008910

closes odoo/odoo#34097

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-08-02 16:32:29 +00:00
Sébastien Theys 1e9772889b [IMP] *: use image.mixin when appropriate
The following models are already using big images, or they might need big images
in the future:

- partner
- hr employee
- shop category
- lunch product
- gamification badge and karma rank

PR: #34925
2019-08-02 16:47:58 +00:00
Naglis Jonaitis 7aadcf1181 [REM] website: redundant context attribute on a link
Since this is a website template, the `context` does not make much
sense. Additionally, there is no search filter named `web_features`.
Lastly, the action opened via this link already has a default search
filter enabled [1].

[1]: https://github.com/odoo/odoo/blob/81f024b545c8ddeeed040fcde42db3f5f7e2a468/addons/website/views/website_views.xml#L17

closes odoo/odoo#35275

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-07-29 19:12:51 +00:00
Andrea Ullianaandqsm-odoo 8e231c047d [IMP] website: allow adding fonts from Google Fonts
It is now possible to add very easily a font from Google Fonts under
Customize Theme > Fonts > Add Google Font.

Part of https://github.com/odoo/odoo/pull/33442
task-1974659

Co-authored-by: qsm-odoo <qsm@odoo.com>
2019-07-30 10:03:32 +00:00
Andrea Ulliana a36e5afbf7 [IMP] website: auto-discover all available fonts in the theme modal
Before this commit, if a theme had more fonts that the default number
(6), it had to override the customize dialog. Now, the number of fonts
to add in the list is found automatically.

To do so, instead of defining a <selection/> tag with 6+ <opt/> tag, we
are now able to define an unique new tag: <fontselection/> which will do
automatically the job.

Part of https://github.com/odoo/odoo/pull/33442
task-1974659
2019-07-30 10:03:26 +00:00
Andrea Ullianaandqsm-odoo 7deceae18c [IMP] website, *: use "auto" widget for font customization
* theme_bootswatch, theme_default, website_theme_install

This commit makes use of the new 'auto' widget for font selection:
instead of enabling a template which will enable a scss file which sets
a font variable to a specific value... we directly allow to do a scss
custo which sets that value.

The code in charge of resetting font customizations on theme switching
is also moved and refactored here in website (instead of being specific
to each theme).

Part of https://github.com/odoo/odoo/pull/33442
task-1974659

Co-authored-by: qsm-odoo <qsm@odoo.com>
2019-07-30 09:59:28 +00:00
Andrea Ulliana 15bae2920c [IMP] website: introduce "auto" widget for theme modal
The theme customize dialog implements its own system of widgets. For
example: data-widget="color" and data-widget="input". Now, a new type of
widget data-widget="auto" exists. The goal is the same as the
data-widget="input" but with a predefined value that the user cannot
choose.

Also, as "data-value" was badly chosen during its implementation, it
is now renamed to "data-variable" and "data-value" is now used with the
new widget.

Example of the new widget "auto":

<opt data-widget="auto" data-variable="logo-height" data-value="3rem"
	string="Logo Height"/>

-> Allows to create a button forcing the logo height to 3rem.

Part of https://github.com/odoo/odoo/pull/33442
task-1974659
2019-07-30 09:59:22 +00:00
Christophe Simonis d5e1fd16b4 [MERGE] forward port branch saas-12.4 up to cda4f3c308 2019-07-29 14:10:30 +02:00
Julien Mougenot edc60f7fb4 [REF] web,web_editor: moved ColorpickerDialog to web
The reason this widget was moved is that the next improvement
([IMP] base: Configure document layout) defines a new field (FieldColor)
which needs to call the colorpicker dialog inside of the base module.
This couldn't be done while the dialog was located in the wysiwyg assets.
2019-07-29 08:28:15 +00:00
Christophe Simonis bfd34e14b1 [MERGE] forward port branch saas-12.3 up to 40e8b67179 2019-07-26 15:12:29 +02:00
Christophe Simonis e0f9c092cc [MERGE] forward port branch saas-12.2 up to 1d6d790513 2019-07-26 11:32:43 +02:00
Christophe Simonis a4b1b532ea [MERGE] forward port branch 12.0 up to b82df99d7a 2019-07-25 20:01:05 +02:00
Christophe Simonis b82df99d7a [MERGE] forward port branch saas-11.3 up to 5f419d4ad3 2019-07-25 18:38:32 +02:00
Romain Derie 6a59224055 [FIX] web_editor, website: avoid returning children of inactive view
Before this commit, for the following view tree:
P (active)
|
I (inactive)
|
II (active)
When calling `get_related_views()` on 'P', it would wrongly return 'II'.
It shouldn't, since its parent 'I' is inactive.

Step to reproduce:
- Go to /shop
- Enable ecommerce categories
- Enable Collapsible Cateogories
- Disable ecommerce categories
- Collapsible categories is still shown even if its parent got archived

closes odoo/odoo#35154

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-07-24 15:38:42 +00:00
Christophe Simonis e4a4b5a8f0 [MERGE] forward port branch 11.0 up to 0375c0174d 2019-07-24 16:04:59 +02:00
Jairo Llopis 21ede5365a [FIX] website: Delete redirections if website is deleted
Before this patch, if a website is deleted, its redirections will stay, affecting other websites.

Now, website-specific redirections will disappear along with their corresponding website.

closes odoo/odoo#35130

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-07-24 10:16:43 +00:00
Martin Trigaux a98427834e [MERGE] Forward port of saas-12.2 to saas-12.3 up to 860ab5a1c2
closes odoo/odoo#35119

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-24 10:32:23 +00:00
Romain Derie bac4b43a23 [FIX] web_editor, website: remove unused param
`_view_get_inherited_children()` `options` parameter is not more useful.
Introduced with ae8232136d and not used since edce2fd6d0.

Also, the opportunity is taken to rename `options` in `_views_get` into
`get_children. Indeed `options` does not mean much.

closes odoo/odoo#35157

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-07-24 16:06:27 +00:00
Romain Derie ac170e8a82 [FIX] web_editor, website: stop snippet animations before cloning
Before this commit, when a snippet was cloned, its animation was not destroyed
first. The flow was:
1. Clone the snippet (DOM) - web_editor trigger `snippet_cloned`
2. Start cloned snippet animation - website listen `snippet_cloned`

This was causing bugs, eg facebook snippet for which the animation is to create
an iframe containing the facebook widget.
When cloning this snippet, its iframe would be cloned to, then its animation
would be started, creating another iframe.

To fix such flows, the snippet cloning flow should be:
1. Strop the snippet animation
2. Clone the snippet (DOM) - web_editor trigger `snippet_cloned`
3. Start cloned snippet animation - website listen `snippet_cloned`
4. Restart the original snippet animation

task-1951466

closes odoo/odoo#35029

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-07-22 08:30:21 +00:00
Odoo Translation Bot 1e66c38238 [I18N] Update translation terms from Transifex 2019-07-21 03:09:04 +02:00
Martin Trigaux e266c7c98a [MERGE] Forward port of 12.0 to saas-12.2 up to 5e4c1b3701 2019-07-23 13:41:00 +02:00
Odoo Translation Bot 9225e2e9f3 [I18N] Update translation terms from Transifex 2019-07-21 06:07:25 +02:00
Martin Trigaux aadc4a9f0b [MERGE] Forward port of saas-12.3 to saas-12.4 up to fe4caecb59
closes odoo/odoo#35059

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-22 10:05:49 +00:00
Rohan Patel 8be4567ae8 [IMP] website: allow to set independent website and company logos
task-1968099

closes odoo/odoo#32716

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-07-25 08:20:33 +00:00
fja-odoo cc87d6d4c8 [FIX] website, *: fix wishlist animation
* = website_sale, website_sale_wishlist

The wishlist animation was not handling the affixed navbar and always
referring to the main one.
Now the animation will target the right navbar if we scroll down.

When the navbar is duplicated, the ids of the tags were kept which is
wrong and was producing bugs such as the wishlist button not showing up
on the floating navbar on the first product added to the wishlist and
the first issue. Now the id is removed from the clone and never used
in JS code. Its only purpose is for the xpath of the wishlist button.

When a product was added to the cart from the wishlist and the affixed
navbar was displayed, the product was hidden before the animation was
completed. This changed the height of the page and the animation went to
the middle of the page instead of the button. This is now fixed too.

task-2002122

closes odoo/odoo#34358

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-07-25 07:54:02 +00:00
Pratima GuptaandSébastien Theys b492bde6a1 [IMP] account, portal, web, website: move chatter below invoice
No more modal because it's not visible and less handy. Use same behavior as
sales order portal.

Adapt the invoice style to properly adapt and align with the chatter block.

Part of task-37264

closes odoo/odoo#34360

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>


Co-authored-by: Pratima Gupta <pgu@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
2019-07-17 15:53:31 +00:00
Martin Trigaux 5a6a414e2c [MERGE] Forward port of saas-12.4 to master up to aadc4a9f0b 2019-07-22 14:47:52 +02:00
Odoo Translation Bot 72339a5301 [I18N] Update translation terms from Transifex 2019-07-21 01:18:28 +02:00
Martin Trigaux d8072d54ac [MERGE] Forward port of 11.0 to saas-11.3 up to d5dd136ba0
closes odoo/odoo#34872

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-15 13:32:07 +00:00
Odoo Translation Bot e26d478f49 [I18N] Update translation terms from Transifex 2019-07-14 03:08:16 +02:00
Martin Trigaux beba36416f [MERGE] Forward port of saas-12.3 to saas-12.4 up to 40421be73c 2019-07-16 16:36:40 +02:00
Martin Trigaux 40421be73c [MERGE] Forward port of saas-12.2 to saas-12.3 up to cf8e74a1a7
closes odoo/odoo#34907

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-16 11:44:38 +00:00
Martin Trigaux cf8e74a1a7 [MERGE] Forward port of 12.0 to saas-12.2 up to 1bd434da34
closes odoo/odoo#34901

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-16 09:14:17 +00:00
Odoo Translation Bot 4fc83f62fa [I18N] Update translation terms from Transifex 2019-07-14 06:08:03 +02:00
Odoo Translation Bot 5306fbb2c5 [I18N] Update translation terms from Transifex 2019-07-14 01:19:24 +02:00
Martin Trigaux 1f5a4649a6 [MERGE] Forward port of saas-12.3 to saas-12.4 up to 87fc1554d6
closes odoo/odoo#34820

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-12 13:59:35 +00:00