Commit Graph
102746 Commits
Author SHA1 Message Date
Christophe Simonis cb8fefa899 [FIX] web: correct tempusdominus lib patching
Oversight of previous forward-port.
2019-01-31 15:22:27 +01:00
Christophe Simonis 49cb3d8fad [MERGE] forward port branch saas-11.3 up to aeed32d4ff 2019-01-31 15:07:09 +01:00
Fabien Pinckaers c50e82c127 [FIX] account: Undistributed Profits/Losses
If no Undistributed Profits/Losses account can be found, Odoo tries to
create one with number '999999'. However, such an account number might
have been created manually by a user. In this case, the account creation
fails.

opw-1932701

closes odoo/odoo#30719
2019-01-31 09:23:54 +00:00
Nicolas Lempereur c4d222677f [FIX] web: click/studio work in colored kanban tile
When a colored kanban tile is colored, and there is a color attribute on
the tile HTML element indicating a color field (eg. when a kanban view
with color dropdown is created in studio), there was a HTML element over
the whole tile preventing to click on links or other sub element of it.

This HTML element is just a transparent used for accessibility to
contain the tile color intelligible name, so this commit just size it
over the area of the color (currently in base bootstrap ~3px at the left
of the tile).

opw-1932283
closes #30717
2019-01-31 09:01:44 +00:00
Christophe Simonis aeed32d4ff [MERGE] forward port branch 11.0 up to 1dbe4ea0d7 2019-01-30 17:10:34 +01:00
Martin Trigaux dc4e2b92aa [FIX] website_sale_link_tracker: do not translate technical content
closes odoo/odoo#30683
2019-01-30 15:23:55 +00:00
Martin Trigaux b42b41fb0b [FIX] account: do not translate technical content 2019-01-30 15:23:55 +00:00
Martin Trigaux 2087fb5aa9 [FIX] web: support full attribute syntax
Only the syntax
<t t-operation="attributes">
    <attribute name="foo">bar</attribute>
</t>

was currently supported for attributes while the syntax

<t t-operation="attributes">
    <attribute name="foo" value="bar" />
</t>

Is also correct and supported server side.

Using value instead of the node content is needed to avoid translating the node
while it is parsed by babel to extract translatable content
2019-01-30 15:23:50 +00:00
Alexandre Kühn b117665c0d [FIX] mail: show pinned livechats on discuss app sidebar
Revision on https://github.com/odoo/odoo/commit/a669d89565ad9904d07886b00665e3940ce04665

The commit above changed the template of the Discuss app in order
to add some features, such as the channel "quick search".

The livechat module extends Discuss app to support livechats. However,
the commit above didn't update it correctly. As a result, pinned
livechats were not shown in the sidebar.

This commit fixes the issue, so pinned livechats should now always
be visible in the sidebar.

closes odoo/odoo#30738
2019-01-31 15:07:57 +00:00
Priyanka Kakadiya 4524ad06a8 [FIX] mrp: removed unexisting default filter
last_year_mo_order was removed in commit 4a350ff8cc. However it was still used in action_view_mos.
This commit adpat the action context in order to keep the same behaviour than previously.

task id 1922547

closes odoo/odoo#30347
2019-02-01 14:01:19 +00:00
Christophe Simonis d55665faf5 [FIX] website_sale_delivery: restore expected behavior
As usual, I mess up with forward-ports. This one was actually nasty, as
no syntactic error was introduce, while only failing because of this
left over `console.error` call.
2019-02-03 09:37:58 +01:00
Odoo Translation Bot 9f6c2ec11c [I18N] Update translation terms from Transifex 2019-02-03 06:03:42 +01:00
Christophe Simonis 2f118c41fb [FIX] web,mass_mailing: adapt forward-ported tests to new version 2019-01-31 18:10:02 +01:00
Christophe Simonis f927c68ddb [MERGE] forward port branch 12.0 up to cb8fefa899 2019-01-31 16:59:58 +01:00
Alexandre Kühn 24ba5ae276 [FIX] mail: open 'My Activities' from systray activity menu
Before this commit, when clicking on the activity view icon
from an item in the systray activity menu, the activity view
had no search filter by default.

This commit now auto-select 'My Activities' in the activity
view when redirected from the systray activity menu.

closes odoo/odoo#30702
2019-01-30 17:18:48 +00:00
Vincent Schippefilt 5ce86a65ac [FIX] web: allow back-end to be usable with IE11
IE11 does not support Array.filter, so I replaced it with _.filter

closes odoo/odoo#30434
2019-01-31 09:15:33 +00:00
Alexandre Kühn 8897cb1feb [FIX] mail: keep activity notification counter on today's meetings
Before this commit, when a user had some meetings planned today
and open the systray activity menu, the counter would disappear.

This was caused by a weak computation of the counter that relies
on activity having always a total counter. This was not the case
for activity that are today's meetings: Counter would be computed
as `NaN`, and since `NaN` is falsy, it won't display the counter.

Today's meetings have no reason to have a counter, so this commit
fixes the issue by letting those activities not change the
computation of the counter.

closes odoo/odoo#30695
2019-01-30 13:18:18 +00:00
Martin Trigaux 6b054f2640 [FIX] web: do not select disabled element
If xlwt is not installed on the server, the option is disabled.
However, the first element was checked, even if it is disabled.

Trying to export record without xlwt was causing a traceback.

Introduced at b60de0db41 where xls is now the first choice

closes odoo/odoo#30724
2019-01-31 10:41:33 +00:00
Pierre Paridans 6ca2563155 [FIX] web: form's tabs should be scrollable on mobile
On mobile, swiping right/left switches to next/previous record.

This feature prevents the horizontal scroll of the form notebook's tabs by
overtaking the swipe gesture on those elements.

This issue had different consequences depending on the platform:
  - on iOS: the tabs cannot be scrolled at all.
  - on Android: the tabs can only be scrolled by using a two-fingers
    gesture

This commit restore the horizontal scroll on the tabs but also keep the
swipe-gesture to navigate records.

opw-1929267

closes odoo/odoo#30658
2019-01-30 15:42:41 +00:00
Olivier Dony e61b0cac46 [FIX] account_payment: warn when payment can't be matched
The payment reconciliation screen can't be opened if there is no partner
on a payment, and currently crashes with a traceback.
Rather than hiding the button which could cause surprises for users, we
can raise a proper error to explain why it can't work, for the cases
where a payment has no related partner.

This could happen for example when a customer paid via a direct
/website_payment/pay link.
2019-01-30 22:31:51 +01:00
Nicolas Lempereur 006002646e [FIX] survey: resend survey input=>right one
When we use "Send invitation again" on a survey.user_input, it will send
the first survey.user_input it finds corresponding to:

- the state "new" or "skip",
- the partner it must be sent to,
- the survey the user_input corresponds to,
- the email it must be sent to,

or if none found, it could be create a new one.

This is an okay behavior in most instance, but in the case of
hr_appraisal where a manager could have same survey to fill for
"employee A" and "employee B" and when you send them again, we would receive two
mails linking to the same employee.

With this changeset, the current behavior is kept but when an existing
user_input is resent, we prioritize itself before searching a matching
one.

opw-1934478
closes #30693
2019-01-30 13:43:14 +00:00
Nicolas Martinelli 1b753b0d53 [FIX] document: PDF indexing
Since PyPDF2 gives bad results for PDF indexing, stop using it since it
raises more issues than it helps users.

opw-1928446

closes odoo/odoo#30692
2019-01-30 12:50:27 +00:00
Christophe Simonis 5ad3d599ce [MERGE] forward port branch 11.0 up to 7eec6b3643 2019-01-30 13:25:36 +01:00
Denis Ledoux 651859a337 [FIX] web: reports, fallback for external report layout.
Following revision 61eef73b52

the fallback to the standard external layout when
the external layout is not set on the company has been removed.

It therefore leaded to the raise of the exception
```
The report's template '%s' is wrong, please contact your administrator.
Can not separate file to save as attachment because the report's template
does not contains the attributes 'data-oe-model' and 'data-oe-id'
on the div with 'article' classname.") %  self.name)
```

when the external layout was not set,
which could happen quite easily in a multi-company environment,
if you do not set the company external layout after having created it.

This revision simply puts back the fallback as it was before.

opw-1931195

closes odoo/odoo#30687
2019-01-30 10:57:00 +00:00
Julien (juc) Castiaux c7b6fcb9f2 [FIX] hr_holidays: Disable emails when importing from file
When using the "test import" feature to import leaves request, odoo
fails with a 500 error and no error message.

The only difference with a real import is that the test dry-runs by
rollbacking. The issue here is that mails are sent *after* a commit
is done hense crashes because they do not exist anymore.

opw-1916913

closes odoo/odoo#30523
2019-01-30 14:29:23 +00:00
Géry Debongnie ad9f6aee93 [FIX] web: reload view when pressing enter in search bar
Before the control panel refactoring, whenever a user pressed ENTER in
the search bar (with no text), the current view was reloaded.  This
untested behaviour was changed (not on purpose) with that refactoring:
instead of reloading, the search view add a useless filter in the list
of facets.

We restore the previous behaviour in this commit.

closes odoo/odoo#30503
2019-01-30 10:45:11 +00:00
Alexandre Kühn 1a774f9e0e [FIX] mail: click on item from composer's emoji menu
Before this commit, clicking on an item from the
emoji menu of a composer was not putting the emoji
in the input.

Steps to reproduce:
- Open discuss app
- Select a conversation with a composer
- click on emoji menu in the right-side of the composer
- click on an emoji in the emoji menu
> the emoji has not been put in the input of the composer

This problem was caused by a race condition with the event
`focusout` on the emoji button and the `click` on an emoji
item. `focusout` always happens before `click`, and `click`
event following a `focusout` event can only happen when the
element is visible. This was not the case, because the emoji
container is removed from the `focusout`, so no `click` is
triggered on the emoji item.

This commit fixes the issue by listening on `mousedown` on
the emoji item instead of `click`, which is triggered before
`focusout`.

closes odoo/odoo#30694
2019-01-30 12:23:28 +00:00
Christophe Monniez e3f54a7808 [FIX] stock: use proper font in PDF report
When printing a delivery order in waiting state under MS Windows, the
produced PDF does not use the proper font for the warning line.
This leads to an unreadable line full of small rectangles.

The problem comes from the fact that the 'fa' class is applied to a full
paragraph.

With this commit, the proper 'i' tag is used to display the exclamation
triangle.

opw-1931892

closes odoo/odoo#30680
2019-01-30 09:26:44 +00:00
wan 3eead65f07 [FIX] account: add date field in reconciliation writeoff form
purpose:
    when creating a writeoff from the manual reconciliation widget (invoices & payment matching), there's no way to specify the date of the writeoff journal entry

specs:
    in v12, add a date field in the js and set the date of the writeoff entry accordingly

Was PR #29794
Was OPW 1896593

closes odoo/odoo#30676
2019-01-30 09:28:40 +00:00
qdp-odoo 0237654113 [REF] base, account: removed useless @api.depends on name_get() 2019-01-30 09:16:26 +00:00
wan b18ebde9c2 [FIX] account: Clean receivable/payable bank reconciliation
Task 1933763
Be able to reconcile this scenario :

- You invoiced 00 to a contact—> receivable 00
- You received a 0 bill from the same contact—> payable 0
- Contact pay you 0 (bank statement)
- You want to reconcile all the things easily from bank reconciliation

the story looks like (bank move is the one to be managed) :
```
journ    n° compte              contact        DEBIT    CREDIT    Mach
sales    12 400000 Clients      Azure Interior 100.00€    0.00 €  A1
sales    12 701000 Ventes       Azure Interior   0.00 € 100.00 €
purchase 11 440000 Fournisseurs Azure Interior   0.00 €  50.00 €  A2
purchase 11 600000 Achats       Azure Interior  50.00 €   0.00 €
bank      3 550001 Bank         Azure Interior  50.00 €   0.00 €
bank      3 400000 Clients      Azure Interior   0.00 € 100.00 €  A1
bank      3 440000 Fournisseurs Azure Interior  50.00 €   0.00 €  A2
```

closes odoo/odoo#30664
2019-01-30 08:16:00 +00:00
Romain Estievenart 3956afb8e4 [IMP] web: expose FieldX2Many relational fields
Expose to public the variable FieldX2Many.

Task ID: 1910385

closes odoo/odoo#30512
2019-02-06 10:05:11 +00:00
jem-odoo e84779749b [IMP] website_slide: allow to edit comment
When a portal user post a message to review a channel, we
want to allow him to edit its own comment and rating.
This commit modifies the special check access method in
portal to extract the security check and reuse it to
allow user to update its comment on slide.channel only.
We decided to reuse existing widget (new rating popup
composer) to do the message modification.

Task-1902304
2019-02-06 09:55:13 +00:00
jem-odoo cd3b6026e9 [FIX] website_rating: display label when rating
This commit fix the display of a label when the user add
a review; when selecting desired stars, the label corresponding
to the star is displayed in a badge.
The bug probably comes from the update to bootstrap 4.
2019-02-06 09:55:13 +00:00
jem-odoo e97b40bae6 [IMP] website_slides: allow to rate slide channel
This commit allows user to rate a slide channel: using the new Popup
Rating Composer, users having access to the slide channel can submit
a rating with a comment. Then, lower in the page, they can see the
ratings of other users.

Task-1902304
2019-02-06 09:55:13 +00:00
jem-odoo 17ac041bfa [REF] portal: posting message with signed token
Before this commit, it was possible to post a message on a document
the user has no access, thanks to a token. In addition to this token,
if a hash (signed token with a partner id), the author_id of the message
was forced.
This commit change a little bit that logic by distinguish 2 cases:
1/ Token only: anyone with the token can post a message on the document. If
  the user is not logged (public with token), the author_id will be the
  customer of the document (or the public user). This case is moslty used
  for business document, through the portal or with the "share link" for
  instance.
2/ Signed token: user has no write access to the document, but can post a
  message on it. The user have to be logged, as the token is signed with its
  identifier. The goal here is to avoid leaking the access token's document
  to all visitors. This case is mostly used for public content, such as blog
  posts, slides, ...

The token case was already existing. The second is now working with this
commit. To do so, it was required to
- move `_sign_token` from the portal mixin to mail.thread.
- transfering 'pid' and 'hash' parameters from the controller to template
to js widgets.

This commit also change the `_message_post_helper` signature by making
the 3 first parameters required, as to post a message you need at lease
res_model, res_id and the message body. The optional argurments and kwargs
are here to check the bypassing access rights mecanism.

Task-1902304
2019-02-06 09:55:13 +00:00
jem-odoo 4cb228d823 [IMP] portal,website_rating: new popup composer to submit rating
Rating document available on a website will become more common, but
we want to do it with different UI widget. This commit introduces a
new "popup rating composer": the idea is the rating average is
displayed with stars, and when clicking on it, a popup with the
composer appears. The user can so submit its review.

To do so, we factorize the Portal Composer into a dedicated widget
(instead of natively inside Portal Chatter).

Task-1902304
2019-02-06 09:55:13 +00:00
jem-odoo 8c840f7539 [IMP] rating: add rating average on mixin
This commit provides 1 more field on the rating mixin: the average of
the ratings of the document. Before that, the only way to get the
average was to call `rating_get_stats` record per record.
As we are on a mixin, this new field is not stored to avoid recomputation
each time a rating is added. To improve performance, we decided to
compute `rating_count` and `rating_avg` in one `read_group`.

This commit also set an extendable method to get the domain of the
rating to include in those statistics computation, called `_rating_domain`.
This way, each model inheriting the rating.mixin can define the subset of
pertinent ratings.

As consequence, this commit uniformized the way average is displayed:
instead of taking the closer value to the 0.5 value, it only round it
at 2 digits.

Task-1902304
2019-02-06 09:55:13 +00:00
jem-odoo 1ed3cb37b0 [IMP] website_slides: provide search bar on channel
Visitor are now able to search a channel, based
on the name or description with a search bar on
the channel list page.

Task-1902304
2019-02-06 08:06:46 +00:00
Antoine Guenet c839df6e91 [FIX] website: only show "welcome" message on empty homepage
Every new page was being considered an empty homepage with "Welcome to
your Homepage! Let's start designing." shown. Now only an empty homepage
shows that message.

closes odoo/odoo#30839
2019-02-05 13:31:57 +00:00
Nikunj Ladava 6f60243726 [IMP] purchase: Set supplier currency on product supplier info
- if currency is set on vendor, and set that particular vendor to product, the currency will not being changed by vendor's currency.
-  after this commit currency in pricelist will be changed by the currency of the vendor

This commit is related to Task ID 1826166

closes odoo/odoo#24468
2019-02-06 06:03:18 +00:00
sed-odoo ec42737702 [FIX] l10n_be_hr_payroll_fleet: clean mismatched values
Between 11.0 and master there was a mismatch in the legal values used to
compute the co2 fee and the ATN of a company car.

Task : 1937082

closes odoo/odoo#30841
2019-02-05 15:36:54 +00:00
qsm-odoo fc61305f51 [IMP] website: improve documentation of user custom files
See https://github.com/odoo/odoo/pull/29999
2019-02-05 14:28:29 +00:00
Andrea Ulliana 515e7bc50f [IMP] website, *: improve CSS edition usability + add JS edition
* web_editor

Currently, when an user wants to edit the css of its website, he has
access to lots of files and, in debug mode, to even more files. While
the feature is nice for people who know what they are doing, a lambda
person can easily break its website by changing the wrong files. Also,
nothing warns the user that the files that are edited will never receive
updates anymore (unless if they are reset). The goal is to prevent
those behavior while still allowing the add custom css. Another goal
is to be able to *add* custom javascript.

Custom files created for the user:
SCSS: user_custom_rules.scss, user_custom_bootstrap_overridden.scss
JS: user_custom_javascript.js

See https://github.com/odoo/odoo/pull/29999
task-1919350
2019-02-05 14:28:29 +00:00
Andrea Ulliana 7f2ce89554 [IMP] web: add JS-related lib files for ace editor
In task handled in https://github.com/odoo/odoo/pull/29999, we will need
support for javascript files in ace editor. This commit adds the related
lib files.

See https://ace.c9.io/#extending-highlighters:
https://github.com/ajaxorg/ace/tree/master/lib/ace/mode
1. https://github.com/ajaxorg/ace/blob/master/lib/ace/mode/doc_comment_highlight_rules.js
2. https://github.com/ajaxorg/ace/blob/master/lib/ace/mode/javascript_highlight_rules.js
3. https://github.com/ajaxorg/ace/blob/master/lib/ace/mode/javascript.js

task-1919350
2019-02-05 14:12:16 +00:00
Thibault Delavallée 8f3eff13fb [REF] website_slides: light cleaning
Purpose of this commit is to prepare future code addition by making some
noise in a separate commit. In this commit we move compute methods below
fields definition because currently it is a complete mess and finding a
given field gives a headache.

Commit linked to task ID 1933820 and PR #30830.
2019-02-05 11:19:52 +00:00
Thibault Delavallée 7105669b77 [FIX] website_slides: limit auto subscription
In order to avoid spam and unwanted notification this commit limits auto
subscription on channel when

 * creating a channel;
 * automatically telling a channel a new publication has been done;
 * creating a slide;

As being a follower of a slide channel means following its slides user should
choose manually to be follower of a channel, notably through the UI.

A new way of managing subscription will come with elearning in mind and
therefore auto subscription should be limited.

Commit linked to task ID 1933820 and PR #30830.
2019-02-05 11:19:52 +00:00
Antoine Guenet 275af90b38 [FIX] web_editor: update displayed media in dialog on remove media
closes odoo/odoo#30809
2019-02-04 12:52:15 +00:00
Antoine Guenet f834204af3 [FIX] web_editor: reapply the classes of ANY type of media on replace
closes odoo/odoo#30801
2019-02-04 11:29:40 +00:00
Antoine Guenet 48cb3c71d1 [IMP] web_editor: handle CTRL+A (and then DELETE) locally
This fixes issues with CTRL+A then delete.
Now CTRL+A selects all the contents of the unbreakable node in
which the range is contained. Deleting it all will replace the contents
with `<p><br></p>` so the user can start editing afresh.

Note: Only CTRL+A is handled: ``select all`` in contextual and edit
menus are still handled by the browser.

closes odoo/odoo#30648
2019-02-04 09:44:18 +00:00