Commit Graph
117975 Commits
Author SHA1 Message Date
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
William Henrotin a4e05fb185 [FIX] point_of_sale: create picking at pos payment registering
previously, it was not possible to complete a payment on return in POS because of a stock move function that does not exist. The commit https://github.com/odoo/odoo/commit/6aebc800538b6fabd79c6cd1e819ef6d961e7589 changed some function names in stock.move model to make them private but the forward-port https://github.com/odoo/odoo/commit/aea68e4730d6c06a111504dacb3357e208971288 was not compatible with these new names.
2018-02-23 11:53:13 +01:00
Pierre Masereel 57f6c12834 [FIX] point_of_sale: add menu taxes to POS
When only point_of sale module is installed, it is impossible to modify
existing taxes because the One2many tags widget doesn't allow to open the
taxes and edit them. So we add a menu item allowing to modify them.

It is needed if we want to set a tax included in the price.
2018-02-23 11:19:48 +01:00
Christophe Simonis d6f5b7e2e6 [FIX] payment_ogone: correctly decode 3DS html form 2018-02-23 11:15:46 +01:00
Lucas Perais (lpe) 801b02f0ce [FIX] account: reconciliation widget: avoid created lines proposition may be empty
Before this commit, when stroking "Enter" in the filter, a JS traceback popped, because no created lines where found

After this commit, we control that we have created lines

OPW 1814309
2018-02-23 11:10:57 +01:00
Simon Lejeune 001b360458 [FIX] stock_account: fifo vacuum
If the vacuum finds that there is nothing to do regarding the accounting
entries, do not call `_account_entry_move`, else an accounting entry
will be created for the entire cost of the compensated move.

opw-1817372
2018-02-23 11:07:45 +01:00
Jeremy Kersten 708ad186d5 [FIX] website: sitemap is not translatable
Disable the multilang on the route sitemap to avoid the user to be redirected
from /sitemap.xml to /<lang>/sitemap.xml
2018-02-23 10:37:09 +01:00
Jeremy Kersten 7179008ffa [FIX] doc: fix link to our website
Remove wrong slash trailing

Now, in V11, matching of page are done on the exact name.

Previously, the error was transparent because we was using a
dedicated controller that allow trailing slash.
https://github.com/odoo/odoo/blob/11.0/odoo/http.py#L936

https://webmasters.googleblog.com/2010/04/to-slash-or-not-to-slash.html

    http://example.com/foo/ (with trailing slash, conventionally a directory)
    http://example.com/foo (without trailing slash, conventionally a file)

    Google treats each URL above separately     (and equally) regardless of
    whether it’s a file or a directory, or it contains a trailing slash or
    it doesn’t contain a trailing slash.

    Different content on / and no-/ URLs okay for Google, often less ideal for users

   Special case for homepage
       Rest assured that for your root URL specifically,
       http://example.com is equivalent to
       http://example.com/ and can’t be redirected even if you’re Chuck Norris.
2018-02-23 10:36:15 +01:00
Jeremy Kersten dee3b87ae4 [FIX] website_customer: fix sitemap when customer had no country
Before this commit, the sitemap will crash if you have some res.partner
without country that are publish and with an assigned_partner_id.

Now, we only search for customer with country that are set and avoid to have
a traceback:
  File "/home/odoo/src/odoo/11.0/addons/website_customer/controllers/main.py", line 31, in sitemap_industry
    loc = '/customers/country/%s' % slug(country['country_id'])
  File "/home/odoo/src/odoo/11.0/addons/http_routing/models/ir_http.py", line 91, in slug
    identifier, name = value
  TypeError: 'bool' object is not iterable
2018-02-23 10:36:15 +01:00
Adrian Torres ff7efbb1e8 [FIX] website,sale,auth_signup: prevent shared field deletion
The field `auth_signup_uninvited` is defined in the 3 aforementioned
modules, yet they are independant modules in respects to one another.

This means that whichever module is installed first will create an XMLID
for the field, if this module is uninstalled before the other two: boom!
crash when changing general settings because the res.config.settings
field set by the other two modules no longer exists.

To solve this, we simply ignore the field during ir_model_field.unlink()

Fixes #23171
2018-02-23 10:28:10 +01:00
Aaron Bohy ad1cceb4fb [FIX] web: one2many and onchange corner case issue
Let's assume a one2many list view inside a form view, displaying
a single char field A. There is an onchange on the form view
returning a command 0 (CREATE) for the one2many. The command 0 only
specifies a value for field A. The one2many list isn't editable, so
when a sub-record is clicked, it is open in a form view (in a
dialog). In this form view, an x2many field B is displayed in a sub
list or kanban view.

Before this rev., it crashed when the user tried to open the
created one2many sub-record (returned by the onchange) in the form
view, because of the presence of the x2many field B, which wasn't
correctly processed by the BasicModel (its value was undefined,
whereas it must be a valid, empty, dataPoint).

Moreover, the limit of the x2many field B wasn't set, so a pager
was displayed as soon as it contained at least one record.

Fixes #22050
2018-02-23 10:01:39 +01:00
Nicolas Martinelli 8a29e37dda [FIX] sale_timesheet: format amount
Due to the representation of floats, it may happen that the amounts in
the project overview appear with much more decimals than expected.

We use the usual `monetary` widget to render the amounts.

opw-1814843
2018-02-23 08:59:28 +01:00
Martin Trigaux 370c944c2f [IMP] pos_mercury: do not translate technical error messages
Error messages are given by vendor and have specific meaning
Translating it does not specifally help to find out more about the problem
pos_mecury is intended for US market anyway
2018-02-23 08:45:40 +01:00
Akim Juillerat ab60d773eb [FIX] hr_timesheet_sheet: set default company on the company instead of department
Code is explicit enough ...

Closes #23120
2018-02-23 08:42:50 +01:00
Monica Diaz Pena 088d00f2a7 [FIX] mail: Don't duplicate uuid of mail channels.
If you duplicate a channel the UUID should not
be copied, otherwise it might introduce security
issues and the method 'channel_minimize' will
fail with an "expected singleton error".

Closes #23102
2018-02-23 08:42:43 +01:00
jem-odoo 7b29f410a5 [CLA] Add Monica to Merchise's CLA 2018-02-23 08:42:34 +01:00
Christophe Simonis 69ef302aa0 [FIX] website_quote: call existing method 2018-02-22 19:45:42 +01:00
Christophe Simonis e5987434c6 [MERGE] forward port branch saas-15 up to 9cfd4a5c07 2018-02-22 19:06:31 +01:00
Christophe Simonis 9cfd4a5c07 [MERGE] forward port branch saas-14 up to caea203ba6 2018-02-22 18:59:43 +01:00
Christophe Simonis caea203ba6 [MERGE] forward port branch 10.0 up to f492c73080 2018-02-22 18:57:02 +01:00
Christophe Simonis f492c73080 [MERGE] forward port branch 9.0 up to cd21ea414e 2018-02-22 18:56:22 +01:00
Alexandre Kühn d56d96dc03 [FIX] *: no concatenation of static and dynamic nocontent helper
* crm, hr_expense, mail

The nocontent helper can be generated either statically (in xml)
or dynamically (in python).

Before this commit, the result of some nocontent helpers was simply
the concatenation of the static and dynamic parts.

Due to recent changes (see https://github.com/odoo/odoo/commit/a87d761fdbf345ada5dc93e0a686b08a0f5a0417),
the nocontent helper has changed so that any of the nocontent helper
parts has to define its style for showing the face (e.g. smiling,
neutral, or folder face).

As a consequence of the changes above, the styles of some
nocontent helper screens were duplicated, e.g. two smiling faces
were shown instead of a single one.

With this commit, most dynamically generated nocontent helpers keep
only the dynamic part, so the static part is usually dropped in this
case.

Exception to above rule:

    dyn_help = 'You could also add a new [document_name] by sending an email to [email_link]'

The dynamic part is appended right after the static help message, in its dedicated paragraph.
2018-02-22 16:53:52 +01:00
Prakash Prajapati 30a5ddbe82 [IMP] mail: Discuss inside alignment 'Add a channel' field with a channel list 2018-02-22 16:50:21 +01:00
Nicolas Martinelli 5ce76a0e70 [FIX] hr_payroll, resource: no attendances
Method `get_day_work_hours_count` can return 0 if no attendance is found
in the calendar. Therefore, we must make sure to not divide by zero,
otherwise, boom boom.

Closes #22900
opw-1815095
2018-02-22 16:32:43 +01:00
Nicolas Martinelli 932c7e428d [FIX] l10n_in_hr_payroll: spelling mistake
opw-1814701
2018-02-22 16:24:49 +01:00
Alexandre Kühn 58eea6b3b3 [FIX] mail: backport fixes on the composer from saas-11.2
This commit back-port some fixes from saas-11.2 on composer.
Tests are available only in saas-11.2 and up.

List of fixes:

1. Pressing TAB with @ mention propositions should cycle through them
  (see https://github.com/odoo/odoo/commit/497a44ab7f04e377decf5fde42f075616f764f26)
2. Prevent a crash when focusing out the emoji button
  (see https://github.com/odoo/odoo/commit/1753017255f3f078ede05a68842f440e02b64630)
2018-02-22 16:11:06 +01:00
Prakash Prajapati a3dda5b350 [IMP] base, base_iban, l10n_ch: few improvements in res.partner.bank
- Change the type in 'acc_type' field char into selection field and change tooltip
- added new field 'acc_holder_name' that can be used to set the account holder name in case it is different than the partner name

Was task 39334.
Was PR #20794
2018-02-22 15:19:51 +01:00
Prakash Prajapati 42aae02c0f [IMP] account: improved warning message,
Improved warning message which is raised when we try to validate internal payment transfer without setting the account for the same in accounting settings.

Was task: 39334
Was PR #20794
2018-02-22 15:12:39 +01:00
Nicolas Lempereur fbbd070a21 [FIX] point_of_sale: make pricelist tour pass
The change in 3ae382f8d3a caused a similar error to ef91c141f6.

So the tour failed in enterprise because account_taxcloud caused a
customer tax to be added to the "Orange Butterfly" product.
2018-02-22 14:27:54 +01:00
Alexandre Kühn 1753017255 [FIX] mail: prevent crash when focusout emoji button
Before this commit, on a clear session, there was a traceback
after focusing out the emoji button next to the composer.

This is due to a DOM element that exists only after clicking on
the emoji button, and it was wrongly assumed that focusout cannot
occur without a preceding click. Indeed, we can press TAB to move
between focusable elements, so that we can have the focus in/out
on the button without clicking on it.
2018-02-22 14:23:04 +01:00
Alexandre Kühn 7113e27cb6 [FIX] web: update to qunit from 2.2.1 to 2.3.0
In particular, qunit 2.3.0 solves this issue: https://github.com/qunitjs/qunit/issues/1119

A consequence of the above issue is that some tests could have completed successfully,
although an error was raised.
2018-02-22 14:23:03 +01:00
Alexandre Kühn 497a44ab7f [FIX] mail: let TAB cycle through @ mention propositions
Before this commit, when the partner mention propositions dropup was visible
on discuss composer, pressing on TAB result in selecting the next focusable DOM
element after the composer input, which is usually the 'Send' or 'Log' button.

This behaviour is confusing, because users expect that TAB either autofill the
input or cycle through the propositions.

We decided to align on Slack's behaviour of TAB, which is to cycle through
the mention popositions from top to bottom.
2018-02-22 14:23:03 +01:00
Alexandre Kühn 5532825851 [FIX] mail: show mention link at the end of a message content
Before this commit, when mentioning a user at the end of a message,
no link was shown.

The cause is that any mention should end with whitespace, but during
the preprocessing of a message, the message is trimmed, which removes
the final whitespace of the mention.

We would like to keep trimming at the preprocessing of the message,
but we can relax a bit the regex to detect a mention, so that it is
not necessary to have a whitespace at the end of a matched mention.
2018-02-22 14:23:03 +01:00
Alexandre Kühn 89e2679f08 [FIX] web: tests: turn patchWindowGetSelection stateless
test_utils.js contains helper functions, which should be stateless
(good practices). This was not the case with patchWindowGetSelection
and unpatchWindowGetSelection, so instead we keep only the first
function which returns the second one.

From the test POV, instead of this:

    utils.patchWindowGetSelection();
    // ...
    utils.unpatchWindowGetSelection();

It now looks like that:

    var unpatchWindowGetSelection = utils.patchWindowGetSelection();
    // ...
    unpatchWindowGetSelection();
2018-02-22 14:23:03 +01:00
Alexandre Kühn 9445d2f04d [FIX] web: hide nocontent helper in grouped kanban with no column
Before this commit, the no content helper was displayed in grouped
kanban without any column.

It should be hidden, because the user expects to have a button to
create a task, which is intentionally hidden in this case.
(To sum up, the user is expected to create new columns before being
prompted to create new tasks)
2018-02-22 14:23:03 +01:00
Duc Dao ad3cc1b231 [FIX] resource: Fix default empty timezone
Since the method `_get_leave_intervals` assumed that field `tz` is always filled in.
There is a case in default function, when `self._context` had key `tz` but its value was `False`,
which may causes null value of field `tz` and lead to mismatch interval between leave and payslip
2018-02-22 14:09:49 +01:00
Christophe Simonis cf2d07aa22 [MERGE] forward port branch saas-16 up to 521c29317c 2018-02-22 13:53:28 +01:00
Dennis Sluijk f2501bfd3c [FIX] web: return dialog in web.CrashManager functions
This is more a architecture fix than a bug fix.  With this commit, it is easier to modify the behavior of the dialog using the super function. like this: this._super.apply(this, arguments).opened(...)

PR #23255
2018-02-22 12:01:57 +01:00
Goffin Simon 0da5d63f52 [FIX] account: Register a partial payment as fully paid
Due to this commit: 3267e76520

Steps to reproduce the bug:

When registering a payment for a customer invoice in an other currency than
the company currency and marking it as fully paid, it raised an error:
"Wrong credit or debit value in accounting entry !".

Reason: counterpart_aml['debit'] and counterpart_aml['credit'] were both incremented
and it violated the constraint credit*debit=0

opw:815465
2018-02-22 11:52:52 +01:00
Christophe Simonis d4a67bbcf4 [FIX] web_editor: do not try to expose non existant widgets 2018-02-22 11:43:21 +01:00
Goffin Simon 5cdefcc39a [FIX] purchase: Adding PO on refund vendor bill
The function  _prepare_invoice_line_from_po_line has not been
designed to compute in a right the quantity for a  line in an
in_refund invoice. So it has no sens to display the field purchase_id
for a refund vendor bill.

Closes #23095

opw:816717
2018-02-22 11:21:13 +01:00
Nicolas Martinelli 075f13ac63 [FIX] pos_discount: error if misconfigured product
In case the discount product is misconfigured and therefore not loaded
by the POS, a traceback appears when applying a discount.

Add a comprehensive error message instead.

opw-817527
2018-02-22 11:01:40 +01:00
Nicolas Martinelli 310e3c15fd [FIX] pos_discount: default product
Several issues:
- If product `product_product_consumable` was deleted, an error is
  raised.
- The default values are inconsistent with the fact that
  `module_pos_discount` is `False` at POS creation.
- The domain should ensures that both `available_in_pos` and `sale_ok`
  are `True`, otherwise the product won't be loaded by the POS.

opw-814426
2018-02-22 10:50:28 +01:00
Christophe Simonis 9a84ba5533 [MERGE] forward port branch saas-11.1 up to e750bb6e11 2018-02-22 10:39:15 +01:00
Yannick Tivisse 521c29317c [FIX] l10n_be_hr_payroll: Adapt the warrant costs to the new 20% law
https://www.claeysengels.be/en-gb/news-events/m/a/rulingdienst-begrenst-gebruik-warrants-en-opties-op-bevek-aandelen-invoering-van-de-20-grens/

The law seems to change every 2 days.
2018-02-22 10:28:27 +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
Laurent Smet cdca5d4751 [IMP] account: improve the multi currency handling on register.payment.wizard
Previously, in multi-currency, the user was not allowed to register a payment on several invoices (picked in list view) and choose the currency, or to make a writeoff. This is now possible.
Also, the behavior and default amount/currency proposal is now much better in this wizard since it proposes you to register a payment in the same currency for the total amount (which is what users expect)

[FIX] account_check_printing: fix bad displayed check_amount_in_words

Was task: 34684
Was PR #20466
2018-02-22 10:19:39 +01:00
Lucas Perais (lpe) ab37094ec4 [FIX] website_quote: default require_payment instead of compute
Commit a0f8ee92c3 solved the use case where
a quotation was created through the website shop and where the default quote's
template's require payment should be transmitted to the quote.
However, this commit made the field readonly

This present commit solves both problems by assigning a default to the problematic field
rather than computing it

OPW 817510
2018-02-22 10:17:56 +01:00
Adrian Torres 8e7aaf8c82 [FIX] sale_management/account_invoicing: properly reinstall
Commit 985c224 introduced a way to properly uninstall these two modules,
however if a user were to reinstall them the views would stay inactive,
in the case of sale_management this would mean some menus were missing,
in the case of account_invoicing this meant that not even the top-level
menu would not appear, effectively misleading users into thinking the
module was not installed.

The solution is to create a post_init_hook (to ensure that all
potentially missing menus are already installed) that activates the
previously deactivated menus.

Fixes #23245
2018-02-22 09:55:59 +01:00
Romain Derie 97cae87812 [FIX] portal: use user timezone to display hours on portal chatter
Before this commit:
User timezone would be taken into account when displaying message date on
chatter. It would always display the hour in the server format (UTC).

Now, we correctly use the user timezone to format the date being sent by the
server.

This closes #22812
2018-02-22 08:55:37 +01:00