Commit Graph
103660 Commits
Author SHA1 Message Date
Christophe Monniez 9cf9938f04 [CLA][FIX] fix encoding of a CLA that was in ISO8859-1
In a near future (I hope), runbot will reject CLA that are not UTF-8
encoded.
2018-03-07 10:32:52 +01:00
Christophe Simonis 4aea19d9e8 [FIX] sale_crm,crm: handle timezone in dashboard
Complete parent commit by correcting overwritten method.

Also use existing method to retrive date depending on tz in context.
2018-03-06 11:23:46 +01:00
Lucas Perais (lpe) 31ad2aa31e [FIX] crm: avoid timezone date change to mess with dashboard stats
Have your OS be in Vancouver with time = 15:59:00
We are on day X
Have a next activity on a lead, scheduled for today
At 15:59:00 the next activity is not overdue

Before this commit:
Past 16:00:00 the next activity becomes overdue
This is because 16:00:00 is 00:00:00 in UTC (+8 hours)
And the next activity is scheduled for day X
But in UTC, we just passed at day X+1
Hence, the next activity being overdue

After this commit:
The next activity is not overdue, since we are actually on day X

OPW 1815323
2018-03-06 08:58:06 +01:00
qdp-odoo 6deed451ee [FIX] account: fix the runbot after commit 0e881fcd3a
The previous commit forbids to change the currency of a company having accounting entries, but there are some created by demo data and some tests were trying to set a different currency (to set up a fix environment). So in order to allow that in tests, we do it via a SQL query directly
2018-03-05 17:39:10 +01:00
qdp-odoo 0e881fcd3a [FIX] account: forbid the change of currency_id if the accounting app has already been used 2018-03-05 14:50:22 +01:00
qsm-odoo 80f97fbd19 [FIX] website_slides: load viewer for app's iframes only
The website_slides JS was working on all iframe in all pages while it
should only affect its own ones, which contains a PDF document.
2018-03-02 18:13:22 +01:00
qdp-odoo b8824913a7 [FIX] account: fix _amount_residual() dependencies.
The computation of residual amounts on account.move.line does not use account_id.currency_id... and should not. Never.
The previous implementation was thus stupidly recomputing the amount_residual fields on all journal entries of an account as soon as its currency field was touched, for nothing.
2018-03-02 14:45:15 +01:00
tbe-odoo d4ec6b75ac [FIX] yaml tests: Allow use of context inside context evaluation 2018-03-01 11:03:40 +01:00
Odoo Translation Bot fd032df4d1 [I18N] Update translation terms from Transifex 2018-03-01 02:39:27 +01:00
Olivier Colson d1377650da [FIX] account: prevent the user from assigning to an account a tax belonging to another company than the one the account is linked to. 2018-02-28 15:27:48 +01:00
Olivier Colson 239f4fec29 [FIX] account: When modifying the currency or company of a bank journal, also set it on the related res.partner.bank (if set)
See issue https://github.com/odoo/odoo/issues/22980
2018-02-28 11:39:05 +01:00
Lucas Perais (lpe) b6d4cd5deb [FIX] account: reconcile on move reversal
Make an invoice for partner X
Make a payment from partner X (not using the register payment button)
On the invoice, you'll see your payment proposal

Now, reverse the move of the payment

Before this commit:
On the invoice you *still have* the payment proposal
This is because nothing reconciled the reversed entries with the original ones when they were created

After this commit:
The reversed moves are reconciled one on one with their original counterparts
And the original payment doesn't show up anymore on the invoice's proposal

OPW 1816462
OPW 1816641
2018-02-28 09:08:38 +01:00
Olivier Sarrat f620e78301 [FIX] doc: remove readonly as button possible attrs
According to #13264, setting a button as readonly is not working
Remove from the documentation

Closes #23114
2018-02-27 17:54:56 +01:00
Jairo Llopis 77db32edf2 [FIX] base: do not force creating localhost SMTP server
Do no recreate the record if it was removed for any reason

Closes #23285
2018-02-27 15:07:08 +01:00
Patrick Tombez f435bc4fe9 [CLA] adds p-tombez to camptocamp's CLA
Closes #23329
2018-02-26 16:36:29 +01:00
qsm-odoo 216d73d727 [FIX] website_slides: fix slide loading (function call with wrong this)
Strangelly, this worked in 9.0 as the `this` element refers to the
`window` which also contains the `$` function. This may still be
wrong in some cases though, so it is fixed here (even if reported for
10.0).

opw-(1)817789
2018-02-23 13:37:00 +01:00
Christophe Monniez cd21ea414e [FIX] packaging: include missing files needed for tests
The test_mimetypes and base_import modules need various files for their
tests. Before this commit some of those files (.ods, .odt, .xlsx, .docx,
.zip) were not included in the packages.

Fixes #22778
2018-02-22 10:22:42 +01:00
Christophe Simonis 4432e1d5c3 [FIX] project: do not reset task's partner when changing project if project is not linked to a specific partner 2018-02-21 17:26:16 +01:00
Swapnesh Shah d6174dd226 [Fix]mrp: Removed unused copy_data method 2018-02-21 15:55:08 +01:00
Romain Derie 2120e667b9 [FIX] website_sale: variants view, currency price and price diff
Before this commit:
1. When enabling 'List View of Variants' on a product page, it would not
   replace the variant normal view as it should since the code being replaced
   is included in the code replacing it.
2.The badge specifying the price difference between the variance and the
  product base price would be calculated by taking the price_extra of the
  variance attribute and converting it in the user currency which was not
  correct if a pricelist was set on the product variant because the price diff
  would then be (the variant price set on the pricelist) - (product base price)
  Note: this is about the 'List View of Variants' mode, not the normal mode
        which list variant attribute and not variant itself
3. The strikethrough amount was not in the user currency

Step to reproduce:
  - Enable variants & pricelists
  - Enable multi-currency and activate 'COP' as second currency (you may want
    to change the currency symbol on edit mode since it is also '$')
  - Go to iPad Retina Display product page in shop
  - Enable 'List View of Variants' in 'Customize'
  - Both Variants selection mode are visible (bug 1)
  - The third variant shows '+$ 50.40' which is the diff between the
    strikethrough prices (in fact the sum of the price_extra of the product
    variant attributes, +50,40 on the 32GO attribute in this case)
    It should show '+$ 40.32' since the price change from $600 to $640.32.
    This is bug n°2
  - Change Public Pricelist currency from USD to COP
  - Back on iPad page, change between the 3 product variants, you will see
    the $ price strikedthrough instead of the COP one:
    Strikedthrough: 750 (it should be 1 714 491,47)
    Price: 1 371 593,17
    This is bug 3
  - You can notice the bug n°2 being more visible since it shows
    '+$ 115 213,83' instead of '+ 92 171.07'
  - Remove the iPad Retina from Public Pricelist and add iPad Retina 32Go
    variant to it with a fix price of $1 000 000.
  - '32Gb, 2.4GHz, White' variant cost $1 000 000 but shows '+ 115 213.83'
    instead of '- 714 491.47' since the base price of Retina is
    '1 714 491.47'.
  - You can play with the pricelist price for this variant up and down, the
    diff price shown in the badge will always be 115 213.83 since it will
    always calculate it by summing all the variant's attribute price_extra
    and then converting it to the user currency.

This closes #14094, closes #22553
2018-02-21 12:18:56 +01:00
Nicolas Martinelli e544ec8df7 [FIX] stock_account: method expect a record, not an id
Backport of 6cedc90f69
opw-817262
2018-02-20 17:07:24 +01:00
Romain Derie bcc088c348 [FIX] web, web_editor: Better email validation with regex (JS)
This commit improves link creation in web editor.

Before this commit, anything with a @​ would be considered as valid email which
is obviously not the case. It would then be prefixed by 'mailto:'.
This was causing 2 issues:
  - URL with @​ symbol in it would have 'mailto:' added as prefix, like google
    maps coordinates.
    eg: mailto:http://www.google.com/maps/whatever/@​312211.22,321321
  - Incorrect emails would go through (eg: @​@​@​, ko@​k@​k@​, mail@​mail)

Now, we will try to detect and identify valid emails from invalid emails from
URLs. It will also handle 'mailto:' directly typed in the input.

This commit comes with it's counterpart in enterprise https://github.com/odoo/enterprise/pull/1859

This closes #11984, closes #22936

Note that there is a WIP in master to use this new is_email function
everywhere we try to validate emails. It will aim to uniformize email
validation in odoo's javascript that are often performed with different mean
here and there, some more permissive than others, some only checking for @​.
2018-02-20 12:30:13 +01:00
Ward Marissen 52f3a5ecc4 [CLA] signature for Ward Marissen
Closes #22841
2018-02-19 13:44:03 +01:00
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