Commit Graph
103637 Commits
Author SHA1 Message Date
David Arnold 5d086cea9b [FIX] rpc: correctly handle xmlrpclib.Fault
The error string was always missing, despite being provided.

Backport in #22276 courtesy of Yenthe V.G

Fixes #13111
Closes #21741
Closes #22276
2018-02-19 11:15:04 +01:00
David Arnold ca36c0542c [CLA] signature for XOE and blaggacao
Backport of de803378f1 from 10.0,
in order to allow PRs in 9.0

Closes #19210
2018-02-19 11:15:03 +01:00
Xavier Morel 965f492018 [FIX] website: don't include empty keyword & description metas
Apparently, SEO audit thingies (possibly google's own? unclear) don't
ignore *empty* keyword or description meta tags, then complain that
they're duplicated (there's a use case for SQL-like nulls).

So remove the keyword & description metas entirely if the
corresponding fields are empty.

OPW-815492
2018-02-19 09:47:28 +01:00
Jordi Ballester Alomar 5404b8b4e7 [FIX] doc: update default values
limit_memory_soft and limit_memory_hard had values default different that the
ones written in the documentation

Introduced at 3ef93918a

Closes #23131
2018-02-19 08:52:14 +01:00
Lucas Perais (lpe) 840c3be7b5 [FIX] point_of_sale: display python except message on partner creation
Having base_vat installed (but is potentially more general than this)

In the pos frontend, try to save a partner with an incorrect VAT

Before this commit, the generic and cryptic message "your internet is probably down" was displayed to the user
when a python exception occured

After this commit, we display the exception's message

OPW 807656
2018-02-15 10:38:03 +01:00
Olivier Dony 1605086943 [FIX] reqs.txt: bump up recommended Pillow version
We should normally stick as close as possible to the version we depend
on in the official DEB packages. This in turn depends on the version of
Debian stable at the time of release - for 9.0 that would be Debian 8
(jessie) and thus Pillow 2.6.1.

However Pillow versions before 3.1.1 suffer from a few issues that could
lead to crashes of Odoo workers. The bugfixes have been backported in
the DEB packages for Pillow, so users of Debian/Ubuntu LTS versions
won't be affected if they are keeing their systems updated.

However it's worth an exception to our rule for pip users.

FWD-PORTS: skip
2018-02-14 19:30:16 +01:00
Olivier Dony 962af4b780 [FIX] mail: make List-Id header RFC2919 compliant
Fixes the header initially introduced in
f62f58174b

See also https://tools.ietf.org/html/rfc2919#section-3

Fixes #18408
2018-02-14 19:15:02 +01:00
Jeremy Kersten 2d0bcce58c [FIX] website_forum: allow to submit link
Fix/Simplify previous regex that was wrong (eg: http:// instead of http:\/\/)
2018-02-14 17:20:55 +01:00
Christophe Simonis b7b82f1267 [FIX] core: call migration end- scripts with the previous version number 2018-02-14 14:58:16 +01:00
Odoo Translation Bot 3809a8a41c [I18N] Update translation terms from Transifex 2018-02-14 13:43:39 +01:00
Goffin Simon 2d73ea9bed [FIX] point_of_sale, stock_account: POS Anglo-Saxon Accounting
Anglo-Saxon Accounting entries are not created when the POS session
was closed with button "Close and post entries

opw:802727
2018-02-13 15:46:21 +01:00
Luis González 79f137f342 [FIX] base: Avoid error when keep_query is used outside an httprequest context
When the utility method `keep_query()` is used outside an httprequest
context (e.g. rendering a template from a unittest) the following
exception is throwng:
`RuntimeError: object unbound`

The above exception is caused by the method trying to retrieve
parameters from the HTTP request, even if the request object is unbownd.

This change ensures those parameters are retrieved only when exists,
making possible to use it outside the web client

Closes #18841

Closes #22942
Closes opw-815322
2018-02-13 12:03:20 +01:00
Nicolas Lempereur a6e66131ce [FIX] web_editor: error on cross domain stylesheet
On latest chromium (as of version 64), accessing rules of a stylesheet
is forbidden for cross-domain.

This commit catch and ignores the error when that happened.

chromium commit: https://chromium.googlesource.com/chromium/src/+/a4ebe08c91

opw-813480
opw-815860
closes #23009
2018-02-12 18:21:00 +01:00
qsm-odoo ce51ad7e69 [FIX] web_editor: allow deleting all images in table cells
Before this commit, it was impossible to delete an image which was a
direct child of a table cell using the trash-icon button in the
toolbar.

This commit fixes the behavior by changing the logic quite a lot, so
it is kinda tricky (see https://github.com/odoo/odoo/commit/25849e918651eba080dac3af4e4fcdc8f1280241
for more explaination).

Closes https://github.com/odoo/odoo/issues/22523
2018-02-08 10:48:14 +01:00
qsm-odoo 8dfd6a2507 [FIX] web_editor: fix image deletion and replacement
Deleting/replacing an image through summernote gave unexpected results.
As modifiying the related function may be tricky, this commit instead
wrap them to solve the specific erratic behavior: if the range is in/
matches an image, then simply remove the image and move the cursor to
its previous location.
2018-02-08 10:48:14 +01:00
Yenthe V.G 72a8b420d2 [IMP] doc: specify to go in developer mode to access a feature
Closes #22877
2018-02-08 15:10:23 +05:30
Robert Rübner 32a7a1ed09 [FIX] website: do_not_show option in translator dialog not working
Before this commit, it would do the opposite of what it should:
When 'Do not show this dialog later' is checked, it would remove the
localStorage item instead of creating it.
When unchecked, it would create the localStorage item to prevent the dialog to
shows up again.

Now, we perform the correct behavior.

This closes #10882, closes #11550
2018-02-07 16:34:38 +01:00
Romain Derie b2b71efb36 [BACKPORT] website: translation if website default lang is not en_US
Before this commit:
When website default lang was not en_US, the translation of fields* in the
web_editor would not be saved correctly.
Let's illustrate with fr_BE set as main lang:

  The web_editor's RPC calls does not send language in the context when editing
  a page (6ebcc06), but it does in translation mode.
  Note that editing is always performed in the website main lang, fr_BE in this
  case.
  Therefore:
  1. When EDITING:
    The backend suppose the language is en_US as there is no lang in the
    context (hardcoded everywhere).
    It then write in the record itself instead of the ir.translation as it
    should since fr_BE is a translation. (In Odoo, every lang is a translation,
    en_US is  always the main lang)
  2. When TRANSLATING (in en_US):
    It would also write on model as the web_editor send the language to the
    backend when in translate mode. But since en_US is recognized as the main
    lang (which is correct), it also writes in the model, overriding the
    incorrect fr_BE writing which was also wrote on the model.

This has been fixed in 10.0 with these 2 commits:
036ccbe
2955bf2

With these fixes, the lang is correctly added (by the backend) if the website
module is installed.
By ensuring the lang is correctly set, the ORM _write() function will process
the edition and translation datas as it should:

  - If it receive en_US, it will write on the model
  - If it receive another lang, it will write on ir.translation

This closes #10883, closes #22403

*Not the HTML/XML fields which are handled differently by the ORM/translation
2018-02-07 13:35:03 +01:00
celm1990 80f88ad63b [FIX] point_of_sale: unmark order finalized when invoice failed
When we validate an order that need to be invoiced, and the customer is
not set, you have to enter a customer, but your order is finalized so
you have a traceback saying it cannot be modified when you try to set
the customer.

When the invoicing fails, we don't set the order as finalized.
2018-02-07 11:00:48 +01:00
Martin Trigaux 34d2765faa [FIX] crm: allow to unlink multiple records
Closes #22647
2018-02-06 20:12:37 +05:30
Géry Debongnie a98beb13db [FIX] web_editor: correct check of 'rules' property
see issue #22517
2018-02-05 20:24:23 +01:00
Nicolas Lempereur b08185fc66 [FIX] product: can't search attribute value
A name_search on attribute line would possibly ends up with a domain like:

 ['|', ('attribute_id', '=', 'm'), ('value_ids', '=', 'm'),
  ('attribute_id', '=', 'm')]

which would just search the attribute.

This is caused by calling the default name_search. This commit forgo
the default name_search when we are in this attribute line special case.

courtesy-of: @fmdl

opw-813505
closes #22619
closes #22760
2018-02-02 17:13:14 +01:00
Christophe Simonis dc8698132a [IMP] odoo shell: set expected __name__ for scripts read from stdin
Name of scripts piped to `odoo shell` were `__builtin__` (`builtins` in
python3), which is not really obvious (and awful if your script must
handle python2 and python3).

Change it to `__main__`, allowing to use to common pattern
`if __name__ == '__main__':`
2018-02-02 13:36:32 +01:00
Nicolas Martinelli dccdff2539 [FIX] purchase: purchase kit product
The issue solved with 24eee9d7ba was introduced back with
7333f5e9b8.

opw-808056
2018-02-02 13:26:45 +01:00
qsm-odoo 76665df0cf [FIX] website_forum: allow portal users to post replies to replies
Before this commit, when connected as a portal user, the user was not
able to post replies to existing replies. This is because the textarea
section was marked to be displayed for connected internal users only.
This commit removes the whole group restriction. Indeed, it makes sense
(as a fix), to show the textarea section for public users too. Indeed,
the "Reply" button is already shown to public users but does not do
anything. With this commit, clicking the "Reply" button shows the
textarea section for everybody and, if the user is not connected,
redirects to the login page when posting the message. This of course
needs usability improvements in master.

Note: the problem had originally been fixed for regular answers with
commit https://github.com/odoo/odoo/commit/b81b03c82d282dc94595a9beb94444041509ef25

Note 2: both mentioned problems were originally introduced by commit
https://github.com/odoo/odoo/commit/9069d0127c176317436b67b23ae5677dd9d53de7

Closes https://github.com/odoo/odoo/issues/22648
2018-02-02 11:04:31 +01:00
Nicolas Lempereur 2014fabfba [FIX] web_editor: firefox editor hidden mass mail
When saving a modified mass mailing, the editor will do a number of
things to improve the mail readability accross mail client.

One of those is replacing font awesome icons by image, but firefox acts
differently than other browser. On a display:none iframe, doing
.css('color') or .height() on an element returns respectively
`undefined` and 0.

This caused an error when getting the color that we could solve by
doing a fallback for firefox like this:

 window.parent.getComputedStyle($font[0]).color

But to get the height() of an element, it seems we always need the
iframe displayed.

With this change, when the iframe is hidden and the browser is firefox,
the code try to display the iframe (with "visibility:hidden;height:1px")
when this part of the code happen.

note: backport of 10.0 13c326caaa

opw-807180
closes #22701
2018-02-01 11:40:42 +01:00
Odoo Translation Bot cbaecc5cbb [I18N] Update translation terms from Transifex 2018-02-01 02:40:21 +01:00
moutio 8c941cbfb1 [CLA] signature for MouTio
Done at #22605
2018-01-31 09:56:58 +01:00
Adrian Torres aae4d8a013 [FIX][IMP] doc: document manifest features (#22474)
Some manifest features, such as external_dependencies, hooks, etc. were
not previously documented, this commit documents these features.

Closes #22471
2018-01-29 10:59:32 +01:00
qsm-odoo 7c959e3fd5 [FIX] web_editor: properly show link alignment in toolbar
When clicking on a link in the editor, the "center" alignment button
was always marked as active whatever the real alignment of the link.
This was because it considered the alignment of the text inside the
link instead of the link's one inside its parent.
2018-01-26 16:17:19 +01:00
Christophe Simonis ea879956b1 [FIX] pad: allow to create records with unknown fields 2018-01-26 12:44:18 +01:00
Christophe Simonis 222cadda41 [FIX] base: sort ir.actions.act_window.view records deterministically 2018-01-25 20:20:09 +01:00
qsm-odoo 25849e9186 [FIX] web_editor: properly allow formatting text (normal/header 1/...)
Sometimes the formatting buttons had no effect or formatted more than
they should (like a whole column when triple clicking on a paragraph
only). This was because of the `listBetween` function implementation.
This is supposed to return all the nodes between one element and another
one... but the logic is wrong without saying from which *point* to start
and which *point* to end. For example, when asking the list between an
element and its parent, the result is very wrong as there is no way to
go from the beginning of an element to the beginning of its parent using
the `walkPoint` function as the `listBetween` function is doing.

Ideally, the function should be entirely fixed but this can be tricky.
For now, the function is just extended to allow to specify points
instead of nodes, and those are used by the `formatBlock` function to
solve the current problem.
2018-01-25 14:36:47 +01:00
qsm-odoo 2fad2e43b8 [FIX] web_editor: solve all triple-click issues
... hopefully.

This *must* be forward-ported.

Depending on the browser, the triple-click behavior is different. This
is especially problematic on Chrome, where blank characters at the start
of the neighbor of the clicked element are selected.

A weak attempt to solve that was made by commit https://github.com/odoo/odoo/commit/b85bd358234684974f9af63bc5f28cfabb527767

This commit hopes to solve all the issues once and for all by fully
reimplementing the triple-click for all browsers. The concept is simple:
when a triple-click occurs, select the whole *inner* content of the
deepest DOM *element* that was clicked.
2018-01-25 12:44:36 +01:00
qsm-odoo 78a556601e [FIX] web_editor: prevent crash when dropping snippets
For some unknown reasons, the editor sometimes crashes when dropping a
snippet. As a temporary fix, the non-critical line that causes the
problem is try/catch protected by this commit.
2018-01-25 11:11:34 +01:00
Lucas Perais (lpe) d29c2dbbdd [FIX] account: no payment terms on refund
In the case where:
create an invoice with payment terms that contains at least 2 term lines
Validate
create a refund by clicking cancel and reconcile

Before this commit, the refund move lines were wrongly created and reconciled with the invoice's move lines

After this commit, since payment terms are irrelevant on refunds, we set it to false and the problem doesn't raise

OPW 804752
2018-01-24 16:41:42 +01:00
Lucas Perais (lpe) adad192cc0 [FIX] account: reconciliation on payment terms
The case: create an invoice of 2000 euros. Payment terms have been configured as:
1) fixed amount 150, 0 days after invoice date.
2) fixed amount 200, 10 days after invoice date.
3) fixed amount 200, 20 days after invoice date.
4) balance, 30 days after invoice date

Before this commit, when issuing a payment of 150 at day 0, that payment got reconciled with the balance line.

After this commit, the payment is reconciled with the right payment term line

OPW 805006
2018-01-24 16:38:41 +01:00
Lucas Perais (lpe) 779afb7ac5 [FIX] point_of_sale: pos manager should have unlink rights 2018-01-23 09:21:42 +01:00
qsm-odoo 216edc206c [FIX] web_editor: properly evaluate if a range is an image
The previous implementation apparently came from an old version
of summernote (see https://github.com/odoo/odoo/commit/d33086c03fc1a0882be38ae62989b7f72df20d3b).

This commits should improve it to handle all known cases.

See https://github.com/odoo/odoo/issues/20877
2018-01-19 14:02:24 +01:00
qsm-odoo f314cf0bb3 [FIX] web_editor: deleteContents when no selection
Changing the `deleteContents` method of the editor is tricky. This
commit however dares to add a behavior: if the range does not
represent a selection but only the cursor position and is then asked
to delete its content... it should not do anything as nothing is
selected.
2018-01-18 15:19:16 +01:00
qsm-odoo cdb2cf744f [FIX] web_editor: DOMElement used as jQuery element
The function receives a jQuery element most of the time but it
may receive a DOMElement in some cases.
2018-01-18 15:17:48 +01:00
Yenthe V.G 40998a4ded [CLA] OdooExperts signs CCLA
Company renamed, was Bas Solutions
Closes #22324
2018-01-18 09:39:44 +01:00
Jeremy Kersten 74b564cf8d [FIX] website_slides: dont show upload button for public user
This commit closes #15369
2018-01-17 15:37:58 +01:00
Christophe Matthieu 128656f6ea [FIX] website: space symbol is missing when compress html is enabled
Issue: when the qWeb compress rendered HTML for a better Google PageSpeed
result, some text fields are missing spacebar between fa icons and text,
and between some fields.
2018-01-17 14:50:15 +01:00
Nicolas Lempereur 80f1d9ded6 [FIX] mail: reduce no sudo effect mark_all_as_read
The "Mark all read" button either set all messages as read, or if a
domain is given, filter messages on it.

But this filtering is also dependent on not doing sudo so odd
notification to which we would somehow not have any access would never
disappear in the unread number.

Adding a sudo is risky, so this changeset just modify the test on domain
since in most instance the domain is just an empty list (so: []).

The added test before this change would fail at the last assert ("mark
all read should conclude all needactions even inacessible ones").

opw-805185
closes #22277
2018-01-17 11:49:48 +01:00
Nicolas Lempereur 23a2bac3fa [FIX] hr_equipment: no technician subscribe in 9.0
In 9.0, an "Human Resources / Employee" see only hr.equipment for which
they are set as the "Employee".

But the code automatically subscribed the "Technician" because the field
name was named technically "user_id" which is automatically subscribed
by the system.

This led to a possible issue with read / unread message because of
feature that just happen by coincidence.

For 9.0 only (in 10.0 the field has been renamed technician_user_id and
access rules have been changed).

opw-805185
closes #22273
2018-01-16 15:09:45 +01:00
Joren Van Onder 11c73cd0aa [FIX] stock_landed_cost: round former_cost of valuations for total_cost
When computing the total_cost of a landed cost make sure to round the
individual costs of the valuation lines the same way as done by the
ORM (i.e. with the 'Product price' precision).

Otherwise the sum of the additional costs on the valuation lines will
not equal the price of the cost lines. This is wrong and leads to
errors during validation.

opw-804396
2018-01-12 11:14:09 -08:00
Guillaume Masson 26d3b77a1d [CLA] update CCLA for META IT
To add github username
Closes #22185
2018-01-12 15:17:17 +01:00
tbe-odoo d5e97eab8b [FIX] web: Kanban image not showing in some languages
- In some languages the kanban images are not displayed because of a bug in human_size method in JS.

This method translates the Unit Size for data and strip with the string with a comma as separator.
When the translatation contains spaces after the commas (like in the French translation), there is extra spaces in the final result.
This then cause an issue with the method is_bin_size that expects a unique space between the value and its unit.
Resulting in a bug in the method 'kanban_image'.

opw #804973 #804970 #804648
2018-01-12 12:05:56 +01:00
Martin Trigaux ea8cf1b7a2 [FIX] doc: escape code 2018-01-12 11:31:26 +01:00