Commit Graph
100952 Commits
Author SHA1 Message Date
Raphael Collet ad065093eb [FIX] models: ormcache invalidation on import
Do not propagate cache invalidations to other workers when changes must be
discarded, because of an import error or a dry run, which are both handled as
successful transactions.
2018-11-22 11:03:51 +00:00
qsm-odoo 9049892152 [FIX] website: add some more BS3 compatibility
Completes https://github.com/odoo/odoo/pull/27981

- Correct `col-*-offset-*` support.

- Compatibility for BS3-deprecated `visible-*` classes (only not taking
  care of table/table-row/table-cell cases as difficult with sass and
  those classes were already BS3 deprecated anyway).

- Correct order for BS3 `visible-*-*` and `hidden-*` classes (otherwise
  their combination are not correctly working). Also, the 'inline'
  version was forgotten by previous PR.

- Compatibility for BS3 `btn-xs` class.

closes odoo/odoo#28842
2018-11-22 14:09:22 +00:00
RomainLibert 1111de6eb2 [FIX] hr_holidays: use display_name instead of name
In order to see the remaining days in the tree view we need to use
display_name instead of name, as display name will use the name_get
which is overriden to add this information.

closes odoo/odoo#28981
2018-11-23 10:52:42 +00:00
Yenthe V.G 5fd5c4095b [IMP] hr_recruitment: improve English in demo data
closes odoo/odoo#28970
2018-11-22 16:59:58 +00:00
len-odoo fff6c93830 [FIX] board: fix the domain of consecutive 'add to dashboard' operations
Add a search containing a domain to dashboard. Remove that domain.
Do a new search with a different domain.
Add that search to dashboard;
the domain sent would be the concatenation of the two domains.

We make it so that only the last domain is sent, with a test.

opw 1907650

closes odoo/odoo#28843
2018-11-20 13:44:56 +00:00
Christophe Simonis b3052b690f [FIX] point_of_sale: use pycompat.izip 2018-11-23 00:35:16 +01:00
Christophe Simonis 5de8842b31 [FIX] account: correct test
Let postgres do the casting...
2018-11-22 21:38:45 +01:00
Christophe Simonis 97f3f9d118 [FIX] point_of_sale: adapt code and test to version 12
Oversight of previous forward-port.
2018-11-22 21:36:53 +01:00
Christophe Simonis b4e1be8ab0 [MERGE] forward port branch saas-11.3 up to b09f624f20 2018-11-22 20:06:48 +01:00
Christophe Simonis b09f624f20 [MERGE] forward port branch 11.0 up to 263b388c50 2018-11-22 17:52:57 +01:00
Christophe Simonis 263b388c50 [MERGE] forward port branch saas-15 up to e44c35f407 2018-11-22 17:06:31 +01:00
Nicolas Lempereur 1c4d49330e [FIX] mail: notif manager positions date + check
By default in the notification manager we see something like:

```
record name     {a second ago}
summary                      V
```

but if for example the record name is long or the summary empty, we can
have something like:

```
record name so very long {a s}
V
---
record name so very very lo...
                             V
```

This is because the record name was not allowed to grow, and the
positionning of the check mark based itself on the existence of the
summary container (.o_last_message_preview).

With this change the date a message was sent is shown in any case and
the check mark is on the right.

opw-1911654
closes #28960
2018-11-22 14:45:33 +00:00
Yannick Tivisse e3a4bfa1c6 [FIX] hr_payroll: Display currency on payslip pdf report
Purpose
=======

There is typo that doesn't display the currency next to the different amounts
on the payslip report.

closes odoo/odoo#28964
2018-11-22 14:46:45 +00:00
Christophe Simonis e44c35f407 [MERGE] forward port branch saas-14 up to a9752d3ad3 2018-11-22 15:03:01 +01:00
Christophe Simonis a9752d3ad3 [MERGE] forward port branch 10.0 up to af476c6949 2018-11-22 14:39:08 +01:00
Swapnesh Shah 1b8ac11d16 [FIX] sale: Fix _compute_type_name to work in batch
Closes #28713

closes odoo/odoo#28742
2018-11-22 13:35:27 +00:00
Toufik Ben Jaa ae6ab96629 [FIX] payment: if a payment transaction processing fail, rollback.
- Before this commit when a transaction failed, the code doesn't
  rollback and continue to process the other transaction, thus creating
  record that should be rollbacked.

closes odoo/odoo#28748
2018-11-22 11:44:36 +00:00
Yannick TivisseandCas Vissers 02ce0022b2 [FIX] hr_holidays: Fix remaining leaves count on employee form
Purpose
=======

Currently the remaining leaves substract the taken leaves with
no needed allocation.

That way, sick leaves are removed from the remaining leaves for example.

Closes #28659

Co-authored-by: Cas Vissers <c.vissers@brahoo.nl>

closes odoo/odoo#28951
2018-11-22 11:35:08 +00:00
Nicolas Lempereur 10f0766b3e [FIX] mail: no link special character mention
When we mention for example `@hell'o`, the user will be added as
subscriber but he is not linked.

This is because there is two part of mentions:

- inserting the mention in the message: at this point the mention is
  not escaped (only space are replaced with non-breaking space).

- wrapping a link around the mention in a message that is being posted:
  at this time the message has been escaped ( for &<>"`' ).

Thus when wrapping the mention, we have to search the escaped content.

In the case of canned response, the system is different with defined
substitution that replaced the "shortcut" so this makes no change to
that.

Added test without fix failed with:

8. should contain a link in the message content (expected:1, result:0)
9. should have correct mention link in the message content
    (expected:"@ЅpëciãlUser<&>\"`' ツ", result: "")

opw-1909300
closes #28846
2018-11-22 11:04:47 +00:00
Toufik Ben Jaa b294fc15e3 [FIX] sale: allow duplicate SO from other company
- In some cases (record rules modified to allow access to multi company
  SO) the duplication of a quotation isn't possible if the quotation is
  set on a company than the user trying to duplicate it.

  This is due to a computed field that tries to access the order's
  company currency.

closes odoo/odoo#28945
2018-11-22 10:20:05 +00:00
Toufik Ben Jaa b083cca7ad [FIX] hr_timesheet: set allow_timesheets on task to readonly
- On `project.task` records the field `allow_timesheets` is a related
  set to `readonly=False` which triggers writes on `project.project` and
  raise access rights issue for users who can create tasks but cannot
  write on `project.project`.

  OPW-1910877

closes odoo/odoo#28943
2018-11-22 09:53:43 +00:00
Lucas Perais (lpe) d798c27f27 [FIX] mail: no autofocus when spawning a livechat window
Have a user A having the focus on the search bar, minding his own business

Have a user B send a direct message to user A

Before this commit, the chat window on user A's browser took the focus manu militari

After this commit, the focus stays on user A's search bar

OPW 1911553

closes odoo/odoo#28915
2018-11-22 10:11:56 +00:00
lul-odoo 6cfa158b4d [FIX] point_of_sale: Update dead link to POSBox doc
The link pointing to the hardware setup for PoS redirected to the POSBox doc which no longer exists in 12.0.
Therefore the response was a 404.
Now the link redirects to the IoT doc for using the box with PoS.

Btw, this new doc seems less complete than the previous one.

closes odoo/odoo#28944
2018-11-22 09:57:40 +00:00
Lucas Perais (lpe) dc23365048 [FIX] calendar: detaching event makes recurring attributes irrelevant
Have a recurring meeting, repeated until some date

Edit one of the instances and detach it (click on "update only this instance")

Edit the detached event and change some value

Save

Before this commit, a JS error was thrown saying that the field final_date was invalid
This was because the required attribute on this field was set to True, but the python
put the value of the final_date to False

After this commit, there is no error as we set this value to false, since the field
doesn't make sense for a non-recurring event anyway

OPW 1892426

closes odoo/odoo#28850
2018-11-22 10:06:06 +00:00
Denis Ledoux af476c6949 [FIX] report: support for wkhtmltopdf 0.12.5
This revision brings the compatibility for our reports
using wkhtmltopdf 0.12.5.

Up to now,
the supported wkhtmltopdf version was 0.12.1.

The goal of this revision is to add the compatibility
to wkhtmltopdf 0.12.5,
while keeping the same exact rendering than in 0.12.1.

There is a behavior change with the `--dpi` parameter,
which no longer has a "zoom" level effect as it did with 0.12.1.

To deal with it, we pass the `--zoom` parameter when
the detected version installed of wkhtmltopdf is after 0.12.2,
with a ratio 96:dpi. 96 being the default dpi of wkhtmltopdf.

This trick allows to render the reports with the exact same
zoom level, whatever the dpi value configured in the reports paperformat.
(at least with dpi values up to 149, after 150, included,
the dpi parameter with wkhtmltopdf 0.12.1 as a weird behavior,
it no longer zoom out)

opw-1907346

closes odoo/odoo#28864
2018-11-21 09:30:02 +00:00
Nicolas Lempereur 1f8788deef [FIX] purchase: es_AR translation typo
Fixing it directly by commit since there is no es_AR on transifex.

The issue of the ticket has been solved by transifex, this is for
another similar issue that has been found.

opw-1907924
closes #28923
2018-11-21 17:37:35 +01:00
Denis Roussel e81809b89d [FIX] mrp: Allow mrp user to delete stock_move_lot links
With an mrp user, add lots lines to mrp production order moves. Then,
try to delete one line, the dustbin icon does not appear.

opw-1908930
2018-11-21 14:08:47 +01:00
Denis Roussel 8a6162d00d [FIX] mrp: User with no products write access cannot create production order
As the product_tmpl_id field is related one but not readonly, the creation
of production order triggers a write on product.product model
2018-11-21 13:16:45 +01:00
Lucas Perais (lpe) 462681723b [FIX] web: search input date in another timezone
Put the browser in timezone Sao Paulo (Or like West of UTC)

Trigger the autocomplete (and the subsequent search) on a date field
by writing a date (in the locale format) in the search view

Before this commit, the domain sent to the server contained the date as the day
**before** the one asked for in the input

This is because, the string input is parsed and gives:
input = 12/02/2018
When creating the moment object:
> since there is no explicit time, moment will interpret it as 12am (midnight)
> We force moment to consider the string as being UTC (function: moment.utc())
> the moment contains, as output the time ** 2018-02-12T00:00:00 UTC **

When getting the facet value for making the domain
> we call toDate on the moment object, which, according to the browser is UTC and will
be converted to the locale timezone before formatting
> And the domain will use the date 2018-02-11T22:00:00 Brazil/SaoPaulo
which gives the day before the one we asked for

After this commit, this issue doesn't arise, because we don't convert the moment into a Date,
and we directly format that moment into a string

OPW 1903224

closes odoo/odoo#28689
2018-11-20 10:06:18 +00:00
Julien (juc) Castiaux 8ccc976c20 [FIX] website_crm_partner_assign: unpublised parter rendered empty
Unpublised parters were rendered empty instead of not rendered at
all in the resellerrs tab of website

opw-1903573

closes odoo/odoo#28917
2018-11-21 14:43:57 +00:00
Laurent Smet b8e32340c5 [FIX] account: Fix _convert in Aged Partner Report
Introduced by the forwart-port:
https://github.com/odoo/odoo/commit/4b8bd36219c1c11bb1ca36a9862baf632a995bad

closes odoo/odoo#28825
2018-11-20 09:47:32 +00:00
Nicolas Lempereur d36b42a779 [FIX] purchase: es_AR translation typo
Fixing it directly by commit since there is no es_AR on transifex.

The issue of the ticket has been solved by transifex, this is for
another similar issue that has been found.

opw-1907924
closes #28929
2018-11-21 17:17:08 +00:00
Nicolas Lempereur b642687d53 [FIX] lunch: BS4 previous order not just one column
In bootstrap 4 grid are based on flex and so flex items require a flex
container parent.

opw-1911572
closes #28905
2018-11-21 15:05:31 +00:00
Nicolas Lempereur 6d5df714a7 [FIX] mail: add mention no set focus on subject
In the extended composer, we focus on subject when adding a mention in
the body. Focusing in subject is wanted at the opening of the composer,
but not when adding a mention.

opw-1911566
closes #28910
2018-11-21 12:40:24 +00:00
Julien (juc) Castiaux d395accd94 [FIX] account: outstanding credit add button not shown in green
The "add" button shown in the outstanding credits menu in the
button right corner of a payment wasn't shown in green like the
other clickable elements.

opw-1907342

closes odoo/odoo#28908
2018-11-21 12:05:56 +00:00
RomainLibert 1d28525d6b [FIX] resource: increase the rounding factor in resource_mixin
In order to be more precise in the number of hours shown in leaves, we
need more precision in resource_mixin

closes odoo/odoo#28907
2018-11-21 13:04:55 +00:00
RomainLibert 4a2c73d1a5 [FIX] hr_holidays: change selection keys from floats to integers
In the following commit (https://github.com/odoo/odoo/commit/744de4ee1cec5e43aa77ac3eccc7a9b1224f8fa1) we introduced some floats as keys
to Selection fields (namely request_hour_from and request_hour_to)

This lead to the ORM creating a column of type `int4` to store this
field which rounded the values.

In order to repair that faulty behaviour we use negative integer values
for the half hours, which is then transformed back into a float in the
code.

closes odoo/odoo#28877
2018-11-21 10:49:02 +00:00
Goffin Simon f3b3875305 [FIX] mrp: field result on 'quality.check' displayed False as uom
Steps to reproduce the bug:

- In the Manufacturing App , enable Work Orders and Quality
- Configure your products,BOM and Routing
- Create steps in routing with type='Register Consumed Materials'

Bug:

When you finished your Work Order operations it displayed "False" value in
the "Finished Steps" tab instead of the uom of the finished product.

Technically:

The function "record_production" unlinks the temporary stock.move.line that can
be linked to a quality.check. So the component_uom_id of the quality.check could not
be found when computing the field 'result' on model "quality.check' with function "_compute_result".

opw:1909768

closes odoo/odoo#28865
2018-11-21 09:34:20 +00:00
Nicolas Martinelli f533ddab43 [FIX] hr_timesheet: total in list view
opw-1911593

closes odoo/odoo#28872
2018-11-21 10:30:20 +00:00
Nicolas Martinelli 6d42f2f0bb [FIX] event: expected attendees
The 'Expected attendees' text is replaced by the number of attendees.

opw-1911577

closes odoo/odoo#28868
2018-11-21 10:06:29 +00:00
Nicolas Lempereur 3455a4d0e7 [FIX] account: send several invoices => state sent
When we print or post_message of an invoice it is set as sent.

But when we multiprint, we do not use each invoice post_message but
create directly mail.mail then send them in batch.

Thus the invoices are not set as "Sent".

With this change we make a special case.

opw-1910937
closes #28852
2018-11-21 10:00:36 +00:00
Odoo Translation Bot c487d2c26c [I18N] Update translation terms from Transifex 2018-11-21 09:40:22 +01:00
Yannick Tivisse 602f7ea0bc [FIX] lunch: Fix unreviewed new feature from a2f69ca
Purpose
=======

As we try to open a mail.compose.message on a model that doesn't inherit
from mail.thread (Mimic a cowboy yellin' "Yihaaa" while shooting into the air
with one revolver in each hand).

Specification
=============

The only way to fix this issue while keeping the feature (Open a
mail composer) is to open the mail composer in mass_mail mode and
to remove the model on which it should be called.

The template won't be rendered in the mail composer but will
be rendered when sending the mass_mailing obviously, while avoiding
the unavoidable traceback when clicking on the 'Send' button

closes odoo/odoo#28849
2018-11-20 14:40:16 +00:00
Julien (juc) Castiaux 82f7fdd66b [FIX] gengo_base: Unable to uninstall module
The gengo module is used for automatic translation, if you try to
uninstall the module, at some point the required models/fields of
gengo no more exist but the module is still in use by odoo for
every translation.

This commit fixes the problem by disabling the gengo translations
when the system is installing/uninstalling a module.

opw-1906293

closes odoo/odoo#28806
2018-11-19 15:14:55 +00:00
Julien (juc) Castiaux f197498058 [FIX] google_drive: button in config not cross-browser
The "Get authorization code" button in the General Settings >
Integrations > Google drive was not correctly rendered on firefox.

This PR fixes that bug by correcly rendering the button, it has
been tested on both Firefox and Chrome

opw-1907644

closes odoo/odoo#28672
2018-11-20 10:02:45 +00:00
Toufik Ben Jaa 69c2b0a7d1 [FIX] portal: force cache clearing at access_token generation
- The value returned by the method `_portal_ensure_token` is False due
  to a cache issue.

  The value is generated written using the `sudo` environment while in
  the current user environment the cached value is `False`.
  After generating the value, the cache is not cleared, thus letting the
  method return `False`

closes odoo/odoo#28836
2018-11-20 11:49:17 +00:00
Alexandre Kühn a13db188f3 [FIX] mail: notify when resetting unread counter of thread
Before this commit, we had the following issue:

1. Open two tabs A & B.
2. Receive a message from a channel in tab A.
3. Mark it as read in tab A by clicking on the
   chat window of the channel.

> The unread counter is correct in tab A: no
  unread messages on this channel, and the
  messaging menu counter has been updated.
> The unread counter is not correct in tab B:
  it still has unread messages on this channel,
  and the messaging menu counter has not been
  updated.

The issue was caused by not notifying the updated
unread counter to the widgets when receiving the
'channel_seen' notification from the longpoll.
It was working in tab A because this is were we made
the action, so that it already marked messages as
read without waiting for the longpoll response.
However, Tab B has to wait for the longpoll response
to update the unread counter. It was updating the
counter, but it was not notifying the widgets.

This commit fixes the issue by letting the widgets
know when the unread counter has been reset.

Task-ID 1911239

closes odoo/odoo#28833
2018-11-20 10:52:26 +00:00
Nicolas Martinelli 09a2ef2e7c [FIX] l10n_fr_fec: date
The FEC report fails to generate because of an incorrect variable type.

opw-1908541

closes odoo/odoo#28832
2018-11-20 10:49:47 +00:00
Aaron Bohy 49e78f46ee [IMP] web: tests: backport of new helpers
This rev. is a partial backport of abf32b8b, so that the newly
introduced helpers are already available in 12.0.

closes odoo/odoo#28827
2018-11-20 10:17:37 +00:00
len-odoo 24ca67b545 [FIX] mail: execute only once when setting automated actions at record update
Fine-tuning of commit: d60f2ab0e2
Which applied when the next action was to create a new activity.
However the problem is also present when the next action is to send an email.
We extract the logic in a new private function to share the code in both cases.

opw 1904156

closes odoo/odoo#28819
2018-11-19 19:36:14 +00:00