Commit Graph
63 Commits
Author SHA1 Message Date
Kaushalya Mandaliya ded9d60986 [IMP] website_form: add info on email_cc field
In a website form, when "Email cc" field is added,
an i icon will be displayed besides the field label to
guide user about multiple email addresses support.

task-2074045
closes odoo/odoo#37116

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-12-17 13:44:39 +00:00
jerome hanke (jhk) 56588d126f [FIX] website: translation of some fields
Steps to reproduce:
- install website and crm
- install a second language and translate website
- go to website > create a new page > add a form builder
> create a new opportunity > add a new custom field (selection or m2m)

Previous behavior:
default fields and some messages are not translatable

Current behavior:
more fields are translatable

opw-2168786

closes odoo/odoo#43224

X-original-commit: 2b1359f2d2f85772c98988be5714f31163b70a23
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-01-13 15:26:07 +00:00
Prakash Prajapati a4c92c6aed [FIX] website_form: fix several issues when editing a form
This commit fixes the following points:

- While dropping a form builder, the default action is now set to
  'Send an email' instead of first available action.

- Titles of the forms which previously were readonly, are now editable.

- When sending an email, the 'reply-to' address is now set from the
  email field provided in the form, instead of the catchall mail.

- Hitting 'Send' button for 'Send an email' option now immediately
  sends the mail instead of putting it in the queue.

task-2082970

closes odoo/odoo#42515

X-original-commit: 7ada68cc91fde1b6eff151549808a20e85cb5bf7
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-12-30 17:06:39 +00:00
Jason Van Malder 453e7ab3d5 [FIX] website_form: fix missing currency field in form builder
Issue

    - Install CRM & Website
    - Edit the website contact form
    - Add "Expected revenue" field

    Traceback

Cause

    Monetary fields are not handled by the form builder

Solution

    Add the monetary field in the form builder core

OPW-2150986

closes odoo/odoo#41558

X-original-commit: 6c27c3abf4907e1faac670ea8ef006992ec96063
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-12-09 09:58:36 +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
qsm-odoo b38253f400 [REF] web_editor, *: use widgets for left panel components
Before this commit, the rendering of inner content of the left panel
options was handled through _buildXXXElement methods in the options
widgets. Now they are handled through sub-widgets which also handle
the user events.

Each sub-widget is notified with the string value it should hold
according to the snippet option target and methods. Each sub-widget
notifies a string value following user interactions, which snippet
options can use to adapt their target through their option methods.

The current sub-widgets introduced by this commit are (others will
follow):

1) we-button
2) we-checkbox
3) we-input
4) we-select (typically containing multiple we-button widgets)
5) we-multi (typically containing multiple we-input widget)

Following this commit only 3 standard option methods remain, which can
be used with any meaningful widget:

1) selectClass

-> Same as before + handle the old 'toggleClass' method when used with
   a checkbox-like widget.

2) selectStyle

-> Same as old setStyle, introduced recently (simply renamed)

3) selectDataAttribute

-> Handle both old selectDataAttribute and setDataAttribute, introduced
   recently

The parameters these methods received are now:
- previewMode: same as before
- widgetValue: the string value the widget currently holds
- params: additional parameters (mainly dataset of the related xml)
    + params.possibleValues (all the possible values for the method,
      meaninful for a select or a checkbox)
    + params.defaultValue (the value that the widget would give if it
      even holds no value)

When defining a method in XML, the given value is the default value.
e.g. data-select-style="34px" data-css-property="margin-top"
-> if set on any widget, allows to retrieve a value from the user to
   customize the margin-top, the default value being 34px.
   -> if used with a we-input, allow to retrieve any value and an empty
      value will be equal to 34px
   -> if used on a checkbox, allow to toggle between no value and 34px.
   -> ...

Hopefully, detailed documentation about all of this will follow. Code
documentation should already be helpful.

Last note: the _updateUI method (replacing the old _setActive) is now
async (so does all the functions calling it). In particular, the _select
method is now async.

Part of https://github.com/odoo/odoo/pull/40282
In preparation of task-2122935 and other tasks
2019-12-01 15:49:57 +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
Nicolas Lempereur a855f47b3b [FIX] website_form: website form type in form parameters
In 13.0 odoo/odoo@6404233bb0 adds a new website_form_key field that was
not taken into account when creating a form from website studio.

This would cause that when editing the form, we would not see it in the
list of form type, and so think it was doing another action that the
current one. And if saved that could cause an issue because the form is
now for doing something else and no way to change it back.

With this changeset, we get back to what was before 13.0 and display a
model in the "Change Form Parameters" modal even if it has no associated
form in the registry (through a website_form_key).

opw-2118567
closes #40533

closes odoo/odoo#40578

X-original-commit: 6337a04b73e8030b13d5338cee8c045006c21eae
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-11-20 16:28:58 +00:00
qsm-odoo 72a2f417ae [IMP] web_editor, *: introduce select & checkboxes for the left panel UI
* website, website_blog, website_form, website_sale

+ introduce default UI for snippet options
+ refactor style of icon buttons

Part of https://github.com/odoo/odoo/pull/38959
task-2066614
2019-11-18 09:56:08 +00:00
qsm-odoo 877e3c6bfa [FIX] website_form: add missing call to _super in snippet options
closes odoo/odoo#40200

X-original-commit: 424dfc913b2259862e6e6d7838844dfefd72a15c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-11-13 13:50:37 +00:00
Dharmraj Jhala 6882191b6f [IMP] website_form: apply layout to newly added field
This commit copies design of the last form-field and automatically applies
it on the newly added field to ease the designing.

Part of https://github.com/odoo/odoo/pull/30595
task-1874350
2019-11-06 15:39:25 +00:00
Dharmraj Jhala 3a9b563306 [IMP] website_form: show warning while changing form parameters
If user changes the form-parameters (like targetted model), it removes
all the existing fields without any warning and re-renders a new form
according to changed parameters.

This commit improves above behavior to prevent accidental loss of a well
designed form. Now when user changes form parameters, a warging will be
shown to user before re-rendering the form if the model is not same.

Part of https://github.com/odoo/odoo/pull/30595
task-1874350
2019-11-06 15:39:16 +00:00
Dharmraj Jhala 03425f1306 [IMP] website_form: add new 'email' type of field in custom fields
This commit adds possibility to add 'email' type of custom field using
form builder.

Part of https://github.com/odoo/odoo/pull/30595
task-1874350
2019-11-06 15:39:11 +00:00
Dharmraj Jhala 655bd95f6d [IMP] website_form: improve radio/checkbox behavior and layout
This commit implements following changes:

- aligns radio / checkboxes with their label
- adds an option on radio buttons and checkboxes to
  display them horizontally or vertically

Part of https://github.com/odoo/odoo/pull/30595
task-1874350
2019-11-06 15:39:03 +00:00
qsm-odooandDharmraj Jhala c755fb1257 [IMP] website_form: focus the first input / footer button of modal
This commit focuses the first form input on the opened modal (or footer
button in case there's no form input).

This behavior will enable users to navigate through the modal using
keyboard right away (without having to click on input).

Part of https://github.com/odoo/odoo/pull/30595
task-1874350

Co-authored-by: Dharmraj Jhala <dja@odoo.com>
2019-11-06 15:38:49 +00:00
Nans Lefebvre 6901adbe98 [FIX] website_form: multiple input files with same name
By default, the name of a file input field is 'Custom File Upload'.
If there are two fields with the same name, then they both end up in
self.form_fields with the name 'Custom File Upload[0]', and their values
are concatenated, which are file objects. So the concatenation of two
files is a String, ('[object File],[object File]'), because JavaScript.
(And if you don't like it you don't like the web nor human progress.)

The resulting bug is that instead of adding attachments to the created
record, it adds the string message to the notes.

Adding the outer loop index disambiguates the names, so that all
attachments are created as intended.

opw 2092653

closes odoo/odoo#39674

X-original-commit: 5df3f662dc9f7e3030a899a6f4196245083ad415
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-10-31 16:33:22 +00:00
qsm-odoo f34fae25d1 [FIX] web_editor, *: expose access to all snippet options UI
* website_form

To support old theme options, a hack had to be made to allow access to
left panel UI. This will be improved in master.

Part of https://github.com/odoo/odoo/pull/38495
task-2083198

X-original-commit: 5ac6a7a5dbd2af1190d0d027d0239dd1cfc257b0
2019-10-11 22:34:40 +00:00
fw-bot bc4b7c5036 [FIX] web: can't edit subscription with end date beyond 200 years in the future
-Import a subscription with end date beyond 200 in the future (ex: 2500-01-01).
-Open the subscription and click the Edit button.

Before this commit:

A stacktrace appears indicating that a date is not valid. It's not possible to
edit the subscription.

After this commit:

The maxDate of the date picker has been increased to 31/12/9999, allowing the
user to edit subscriptions whose end date is that far in the future.

A test `toggle datepicker far in the future` for this case has been created.

closes odoo/odoo#38527

Opw: 2079696
X-original-commit: 32b6131c04fef7a542a0ccbdb924d177627bfe38
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-11 16:12:34 +00:00
fja-odooandqsm-odoo 75014ffba4 [FIX] website_form: fix website form snippet
The modal of the website_form snippet was broken. Now it uses Dialog.
Hidden inputs were not aligned with there labels.

task-2078138

closes odoo/odoo#37545

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2019-10-01 17:35:39 +00:00
qsm-odoo 623d7358d8 [REF] web_editor, *: review the whole snippets options UI system again
* website_form

Now, the snippets options are still displayed in the left panel but all
the parent options are also shown (and do not require to toggle them
anymore). On hovering them, the overlay style is turned in preview mode
(even for the sticky one) allowing to see which part of the DOM the
option is editing.

Part of https://github.com/odoo/odoo/pull/36515
2019-09-10 11:49:34 +00:00
qsm-odoo 4f27e52cab [IMP] web_editor, *: introduce and restore new web_editor UI
* mass_mailing, note, website, website_blog, website_form,
website_mass_mailing, website_sale

This commit, unfortunately, mixes three things:

- Restoring as much as possible the scss organisation to allow styling
the web_editor UI properly.

- Fixing some bugs like a border around the page once the editor is
loaded, no ability to scroll the snippets, etc

- Introducing a whole new UI for snippet options: a left panel instead
of the old dropdown & button overlay.

Note: this commit also do some linting and ES6 convertion even though
some of it has been done in the parent commit.

Note 2: some elements that were removed are still styled in the POS apps
but this is because part of a feature was removed while leaving dead
code behind, this is handled in another PR which is to be merged
(https://github.com/odoo/odoo/pull/36136).

Part of https://github.com/odoo/odoo/pull/36068
task-1942370

closes odoo/odoo#36068

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-28 09:04:55 +00:00
Antoine Guenet af56405753 [FIX] website_form_editor: properly edit select fields
Select fields were not `contenteditable=true`, which means they could
not be edited. Besides, being that each of their option was individually
considered a snippet, and that they were contained in `div` tags, they
were effectively unbreakable, which means that adding new options by
hitting `ENTER` did not work (note: this also currently doesn't work
properly in v12.0, for other reasons as the concept of an "unbreakable"
node didn't exist yet). This fixes those issues.

closes odoo/enterprise#4817

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

X-port/Cherry-pick of odoo/enterprise@af51d9ff2a
2019-07-26 15:21:48 +02:00
RomainLibert 2b8b828867 [FIX] website_form: replace False and None by ""
In python false is written `False` however JSON only support the notation
`false` otherwise JSON.parse fails
Again in python a null value is written `None` however `None` is `null`
in JSON notation

A solution to this incompatibility problem between python and javascript
can be to replace `False` and `None`by empty strings on the javascript
side.

closes odoo/odoo#34995

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-07-19 08:36:48 +00:00
mgh-odoo c3a609eae4 [FIX] website_form_editor: retain selection field design while saving
In case of selection or many2one field, while saving the page, the field
is re-rendered and loses the applied design changes.

This commit fixes the behavior by re-applying those changes on a newly
rendered field.

task-1961733

closes odoo/enterprise#4657

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

X-port/Cherry-pick of odoo/enterprise@298a9b3a94
2019-06-27 19:59:16 +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
Jigar Patel 126d180bc1 [IMP] website_form: set server-side form values outside the form
`t-att-` inside form should be removed because it makes the form not editable
by the form builder.
Instead of having these values set to the `<form>` DOM element, it will use a
`<span>` outside it.

task-32212
2019-04-19 10:39:21 +00:00
Jigar Patel 80ffa246e9 [IMP] website_form: adapt tour to new default form
Now, the default form already has multiple fields by defult, including
`subject` one.
The test was adding that field, so it now needs to add another one that is not
on the form.

task-32212
2019-04-19 10:39:21 +00:00
Jigar Patel 82a6222161 [IMP] website_form: add default attributes for 'Send an E-mail' form
task-32212
2019-04-19 10:39:21 +00:00
Jigar Patel 6404233bb0 [IMP] wesbite_form: add mechanism to allow default atttibutes to form
That way, it is possible to add the template, fields and success page to
different type of form.
Next commits will use what has been done in this commit.

task-32212
2019-04-19 10:39:16 +00:00
Jeremy Kersten 82ea590264 [MRG] website_form[_editor]: merge modules together
closes odoo/odoo#32491

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-08 10:07:49 +00:00
f7917b1502 [REF] website_form: 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
qsm-odoo d946b7a85d [REF] website, *: use public widgets instead of website animations
* website_blog, website_crm_partner_assign, website_event,
  website_event_track, website_form, website_forum, website_links,
  website_mail, website_mail_channel, website_mass_mailing,
  website_sale, website_sale_comparison, website_sale_delivery,
  website_sale_stock, website_sale_wishlist, website_slides,
  website_twitter

While using the 'Animation' class of website instead of the frontend
'Widget' class leads to the same behaviors, this refactoring is done for
two reasons:
- Stop using the confusing 'Animation' name for non-animated behaviors
- Instantiation of 'Widget' is slightly faster than 'Animation'

Part of https://github.com/odoo/odoo/pull/29442
task-1932066
2019-02-26 17:09:23 +00:00
qsm-odoo 93b0001df6 [REF] *: BS4, adapt forms
The 'form-horizontal' class have been removed; the '.form-group'
elements must now use the 'row' class for an horizontal layout.

The 'control-label' class was renamed to 'col-form-label'.

The 'help-block' class was renamed to 'form-text'.

The 'has-error' and 'has-success' classes have been removed and
replaced by a new system using the :valid and :invalid pseudo-classes,
when a parent has the 'was-validated' class. While this system is great,
it is not straightforward to use it in Odoo. Fortunately, BS4 provides
the 'is-valid' and 'is-invalid' classes as fallback. This commit
replaces the 'has-error' and 'has-success' classes by 'o_has_error' and
'o_has_success' classes (for JS compatibility) and use the 'is-*'
fallback classes. (The 'has-warning' class has no equivalent but was
unused in Odoo anyway).
2018-07-27 12:36:54 +02:00
qsm-odoo ed1b18f103 [REF] *: BS4, adapt col-related classes
col-lg-* -> col-xl-*
col-md-* -> col-lg-*
col-sm-* -> col-md-*
col-xs-* -> col-*

col-lg-offset-* -> offset-xl-*
col-md-offset-* -> offset-lg-*
col-sm-offset-* -> offset-md-*
col-xs-offset-* -> offset-*

col-lg-pull-* -> order-xl-1
col-md-pull-* -> order-lg-1
col-sm-pull-* -> order-md-1
col-xs-pull-* -> order-1

col-lg-push-* -> order-xl-2
col-md-push-* -> order-lg-2
col-sm-push-* -> order-md-2
col-xs-push-* -> order-2
2018-07-27 12:36:54 +02:00
qsm-odoo 0ca6d39777 [REF] *: BS4, adapt media queries
media queries that target a specific screen size handled by bootstrap
have now a more convenient way to be defined:

```
@​media (min-width: $screen-sm-min) { ... }
->
@​include media-breakpoint-up(sm) { ... }
```

```
@​media (max-width: $screen-sm-max) { ... }
->
@​include media-breakpoint-down(sm) { ... }
```

```
@​media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) { ... }
->
@​include media-breakpoint-only(sm) { ... }
```

```
@​media (min-width: $screen-sm-min) and (max-width: $screen-md-max) { ... }
->
@​include media-breakpoint-between(sm, md) { ... }
```

Also, bootstrap has changed the values for its default screen sizes:

------------------
     | BS3 | BS4 |
------------------
0    | XS  | XS  | -> Portrait Mobile
576  | /   | SM  | -> Landscape Mobile
768  | SM  | MD  | -> Portrait Tablet
992  | MD  | LG  | -> Landscape Tablet / Small Desktop
1200 | LG  | XL  | -> Desktop
------------------

While it is possible to configure BS variables to behave as BS3, we took
the decision to keep the BS4 variables untouched. BS4 system seems
indeed better and having the purest bootstrap possible is better for
Odoo to be used as a framework.
2018-07-27 12:36:54 +02:00
qsm-odoo 6692919d1e [REF] web, *: update bootstrap-datetimepicker to tempusdominus
* website_form, debian

Our old library for datetimepicker for bootstrap 3 is deprecated and
an updated version is developed by the same team under the new name
"tempusdominus", for bootstrap 4.

The lib is imported by taking the *unminified build* JS and the *src*
scss. Odoo is also bundling the lib better by putting the scss file
in both backend and frontend assets instead of only in common (so that
the scss is compiled differently for the frontend and the backend).

Note: the lib also needed to be patched inline to solve a bug at one
line.
2018-07-27 12:36:54 +02:00
kujiu 9de1bc0eef [IMP] Improve compatibility with screen readers (accessibility) (#24574)
Today, Odoo is really tricky to use without seeing the screen, it must be improved to be usable.

This PR forbid to use labels without a "for" attribute, add some title, rule and aria attributes in HTML. With that, Odoo will be fully usable with a screen reader.


* [IMP] Labels must have a for attribute. Improve accessibility.
* [IMP] Better error message when trying to read a missing cached value
* [FIX] Add some aria-label and title attributes for screen readers.
* [FIX] Template name is not included in the error message in case of SyntaxError in QWeb
* [FIX] Improve the Tour failed at step error message to be more explicit.
* [IMP] Add aria-labels
* [FIX] Add missing aria-label on failing test
* [IMP] aria-hidden means hidden. Fix all bad aria-hidden and hide aria-hidden for all.
* [IMP] Color names on kanban views and many2many tags
* [IMP] Add some checks on views for accessibility.
* [IMP] Add `alt` attribute on `img` tags.
* [IMP] Add aria-label and title on non-described icons
* [IMP] Add button role to widgets with btn class
* [IMP] Translate aria and formatted attributes.
* [IMP] Remove wrong aria-labelledby
* [IMP] Add menu role on dropdowns
* [IMP] Buttons must be focusable
* [IMP] Add aria attributes on progress bars
* [IMP] Improve accessibility of basic widgets
* [IMP] Change main layout to more semantic tags
* [IMP] Add menuitem role when missing
* [IMP] Remove wrong role='presentation'
* [IMP] Improve accessibility of tab panels
* [IMP] Add aria-invalid on invalid fields
* [IMP] Add aria-sort on ordered columns
* [IMP] Add role on alerts
* [IMP] Use dialog role, header, main and footer tags for modals
* [IMP] Add labels on o_status
* [IMP] Improve accessibility of kanban view with feeds and articles
* [IMP] Add alerts in case of new messages
* [IMP] Add widget, navigation or img role to aria-labelled items
2018-06-22 21:22:21 +02:00
qsm-odoo 97aa0a8dec [REF] *: convert less content to scss content
Convert content so that the assets compile on app installation. The
style is still broken after this as the variables/mixins/... are not
defined in the right order (as it did not matter in LESS but does in
SCSS).

This commit basically changes:
- Variables: @​var_hello -> $var-hello
- Mixins: .mixin_world() {} -> @​mixin mixin-world {}
- Classes used as mixin: .my_class() -> @​extend .my_class
    - Here there were no other solution than to convert the use of
      a mixin call by the use of an extend as a first approximation
- LESS functions -> SCSS functions (e.g. fade -> rgba)
- Move first variable definition before the variable is used
    - Still need to make sure last variable definition is at the
      right place
2018-04-18 15:59:16 +02:00
qsm-odoo b04dec4025 [REF] *: rename all LESS files to SCSS
This is a simple renaming without adaptation.
2018-04-18 15:59:15 +02:00
Christophe Simonis ad825b673b [MERGE] forward port branch saas-15 up to bfa5af45df 2018-04-16 17:10:23 +02:00
Christophe Simonis bfa5af45df [MERGE] forward port branch saas-14 up to aab0908818 2018-04-16 14:21:00 +02:00
Jairo Llopis 30aa75329c [FIX] website_form: Disable form send on editable mode
Before this patch, when a user was editing a website page containing a form
and he clicked "Send", for some reason, the form tried to be sent.

Now, the button behavior is disabled when entering editable mode.

Closes #23852
2018-04-11 15:45:47 +02:00
Christophe Simonis 5ad55264e4 [MERGE] forward port branch saas-15 up to b04c8eae6b 2018-03-01 18:02:30 +01:00
Christophe Simonis b04c8eae6b [MERGE] forward port branch saas-14 up to 153ae5e8b8 2018-03-01 17:26:43 +01:00
qsm-odoo b9d217c4f5 [FIX] website_form: button seemed buggy while it was actually disabled
Thank you to @Yajo
Closes https://github.com/odoo/odoo/pull/21628
2018-02-28 17:09:17 +01:00
Christophe Simonis 2f95cfb8ed [MERGE] forward port branch saas-16 up to f99c4f2b48 2018-01-19 12:43:58 +01:00
Christophe Simonis f99c4f2b48 [MERGE] forward port branch saas-15 up to 0c54862cbf 2018-01-19 11:30:35 +01:00
Christophe Simonis 3e197bf000 [MERGE] forward port branch saas-14 up to 4887a75e2c 2018-01-18 16:27:43 +01:00
Jairo Llopis a92eba42b8 [FIX] website_form: avoid race condition
This fixes what is explained in https://github.com/odoo/odoo/issues/20821#issuecomment-358574349

 (PR #22330)
2018-01-18 11:43:53 +01:00
Alexandre Kühn 6cc5a9963b [FIX] web,*: time format from user's language
Before this fix, the chatter always showed dates of messages in military time format.

This was not the expected behavior, as the user could have had customize
the date and time format in the settings of the current language.

Steps to reproduce the issue:

1. Set Odoo in English
2. Settings > Translations > Languages > English
   2.1. Set Date Format to %m/%d/%Y
   2.2. Set Time Format to %I:%M:%S %p
3. CRM > (Select any opportunity with at least one message) > Mouse hover on elapsed time (e.g. "an hour ago")

Expected:

- It shows the customized time format (e.g. 11/07/2017 5:33:36 PM)

Results:

- It shows the military time format (e.g. Tue Nov 07 2017 17:33:36 GMT+0100)

opw-781647
2017-12-05 09:13:31 +01:00