Commit Graph
117156 Commits
Author SHA1 Message Date
Martin Trigaux 65be76829a [ADD] doc: add missing params and profiling
* Add some missing database parameters in documentation
* Explain how to profile code

Closes #22554
2018-02-27 16:51:05 +01:00
Swapnesh Shah bd0827ed23 [Fix] base_gengo: add target Inline
To open the setting in the full window

Closes #23209
Fixes second part of #23170
2018-02-27 16:07:11 +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
apesquero 4b1ed44936 [CLA] signature for apesquero
Closes #23338
2018-02-27 14:54:35 +01:00
Aaron Bohy 462c3956d9 [FIX] web: NotificationManager: warnings style
Warnings are styled a bit differently than notifications, as their
background is red (thanks to classname 'o_error' on the warning
root element). This classname isn't correctly added since rev.
920df59, which changed the root element of the 'Notification'
template, which is extended by the 'Warning' template, making
qweb.js fail to add the 'o_error' classname.
2018-02-27 14:31:02 +01:00
Nicolas Lempereur 60974227cf [FIX] product: create_variant forward-port 5c2380e
In 5c2380e9f an issue when modifying variants values was solved when an
attribute on the product variant had "create_variant" unset.

This commit forward-port what was lost of it in 11.0, that part was
probably lost because the code was previously changed when adapting to
python3.

Without the change, the added test failed creating a new variant keeping
the existing one. With this change, 'nocreate' value are ignored when
computing new variants to create.

opw-1815226
closes #23332
2018-02-27 12:06:49 +01:00
Nicolas Martinelli aff954bd63 [FIX] account: link bank to partner
Changes to a bank account should not be happening without approval and
not in an in-transparent way. In some cases, a third party can pay an
invoice for another account

opw-1817138
2018-02-27 11:31:09 +01:00
Goffin Simon d3843d7ed0 [FIX]fleet: Error when clicking on the costs of a vehicule
Steps to reproduce the bug:

- Go to Fleet
- Group by status
- Click on a vehicule
- Click on Costs

Bug: A traceback was raised because a group_by was made on the model "fleet.vehicle.cost"
for the field "state_id" and this field doesn't exist on this model.

opw:1815454
2018-02-27 09:42:40 +01:00
Hiral Bhavsar 03645bc51f [FIX] account: filters on invoices and bills
- Removed 'Invoices' and 'Credit Notes' filters.
- Removed inherited view of filters to remove the 'Not Draft' filter.
- Renamed 'Not Paid' to 'Open' filter.
- Added new filter 'Paid'.
- When click on 'Invoices/Bills' or 'Credit Notes' link of 'View'
  column from 'Customer Invoices' and 'Vendor Bills' dashboard, it
  should be open invoices with a specific domain instead of default
  filters.

Co-authored-by: Nicolas Martinelli <nim@odoo.com>
opw-1817236
2018-02-27 09:03:57 +01:00
Alexis de Lattre 1f8835568b l10n_fr: chart of accounts: use bank account type only for accounts linked to bank journals (fixes bug #23040) 2018-02-26 17:22:41 +01:00
Yannick Tivisse 6f614c3254 [FIX] payment: Be less resrictive for payment journals on acquires
Purpose
=======

It looks a little to restrictive to only allow bank journals on payment acquirers.

For example on could want to define a manual payment acquirer linked with a journal of type "cash".

Allow both journal types instead of only bank.
2018-02-26 17:17:33 +01:00
Yannick Tivisse dc6913e2e0 [FIX] payment: Avoid to reset journal_id on acquirer edition
Coming from https://github.com/odoo/odoo/pull/17067

Don't reset the journal but make it required on the form view instead.
2018-02-26 17:17:33 +01:00
Martin Trigaux a546b34f52 [FIX] mail: use correct emoji for shortcode
:) is not the shortcode for 😊
:-) is not the shotcode for 😂
source https://emojipedia.org
2018-02-26 17:14:02 +01:00
Ayman Adam Dawood e7c81ce536 [CLA] aymanadam5 signs Odoo CLA
Closes #23295
2018-02-26 16:38:10 +01:00
Patrick Tombez f435bc4fe9 [CLA] adds p-tombez to camptocamp's CLA
Closes #23329
2018-02-26 16:36:29 +01:00
Christophe Monniez 82e9cc7f97 [IMP] test_pylint: test the presence of python debuggers
From time to time, it happens that a developper forget to remove debuggers.
This commit adds a test to find such imports (pdb and pudb). The test
will fail if that kind of import is found. The Odoo runbot should run
this test and prevent developper from those small mistakes.
2018-02-26 16:12:54 +01:00
Adrian Torres d33ce2b4d1 [FIX] base_import_module: don't assume data/ exists
Before this commit, while performing a check on whether a customization
being imported was done using studio or not, we would assume that the
.zip would, at the very least, contain a data folder.

This is not the case as loose files can be imported and the data folder
is only generated by studio customizations.

To solve this, we walk over the whole zip instead of walking over the
data/ folder only (which may be non-existant), so loose files, files
inside the data folder and potentially files in other folders can be
parsed without raising unexpected errors.
2018-02-26 15:33:37 +01:00
qdp-odoo 25b49fe624 [FIX] account: don't _post_validate() an account.move after a reconciliation
Previously, trying to register a payment on today towards an invoice posted with a date prior to the FY lock date, was raising an error... which was completely wrong.
2018-02-26 15:30:16 +01:00
Adrian Torres 30db4cdd75 [FIX] stock: remove existing demo data on reinstall
Previous to this rev.:
    *Install stock w/ demo data
    *Uninstall stock
    *Reinstall stock

Result: Boom! Installation crashes.

Reason: The demo data installed with stock is not properly deleted after
the module is uninstalled, which causes issues/conflicts upon
reinstallation of the same demo data.

Solution: Remove any demo data of stock models upon installation if any
exist through a pre_init_hook, ideally this would be done by overriding
the unlink() of the affected models / setting some ondelete='cascade',
or even a uninstall_hook, however these solutions prove insufficient for
databases that are currently affected by the problem.

Fixes #22243
2018-02-26 15:12:25 +01:00
qsm-odoo c254c4c684 [FIX] web_editor: stop crashing on applying fonts with standalone summernote
Commit https://github.com/odoo/odoo/commit/137c4f5d76b55c3dd3c4f593de484aadfcf5e6da?w=1#diff-6a334b274d95fb88a4fbc29b910fbb59R2120
introduced a bug as it is using a function which is defined in another
asset. This is fine for connected users but not for summernote-only
users like public users on the forum.

The reason the line was introduced is unsure so it is simply removed for
now. The bug it was supposed to fix will be fixed later if it ever needs
to be.
2018-02-26 12:58:28 +01:00
Aaron Bohy 034c075e7e [FIX] web: default_get returning unknown field
Before this rev., it crashed when trying to create records of the
res.users model. This is due to commit ad1cceb.

The 'default_get' of 'res.users' always returns a value for field
'groups_id', whereas the docstring of 'default_get' states that it
only returns default values for fields given in arguments.

Rev. ad1cceb changed a bit the way the result of 'default_get' was
processed, by iterating over the values instead of over the fields
in the view. So, before ad1cceb, 'groups_id' was simply ignored,
and after, the BasicModel tried to process it and it crashed when it
attempted to retrieve its fieldsInfo, as this field isn't in the
view.

This rev. restores the previous behavior.

Fixes #23303
Fixes #23305
2018-02-26 12:45:10 +01:00
Laurent Smet 5450c5c3f7 [IMP] account: allow partial reconciliation with write-off
Suppose you have an invoice of 3000. You want to pay with paypal
    3 x 1000 but having of fee of 10 in each transaction. So, you attempt
    to reconcile 3000 with 3 x (990 + 10) that is not possible with the
    reconciliation widget.

Was PR #17489. Was task: https://www.odoo.com/web#id=23384&view_type=form&model=project.task&action=333&active_id=967&menu_id=4720
opw-815421
2018-02-26 10:37:39 +01:00
Olivier Dony 12b15cb554 [FIX] website_mail_channel: fix P3 compatibility of comparison
`msg_more_count` can be undefined, and therefore evaluates to None, which
makes the comparison with 0 invalid in Python 3.
2018-02-26 09:23:44 +01:00
Nicolas Martinelli e2c2a2fc69 [FIX] mail: rotate image in preview
When uploading an image as attachment, the document viewer doesn't
support the EXIF data. Therefore, a picture taken with a non-zero angle
will not appear with the right orientation (preview or full-size image).

Unfortunately, supporting EXIF data is not trivial in Python or
JavaScript without external libraries. Therefore, we add a rotate button
which allows the user to rotate the image by 90°. Moreover, we add the
`image-orientation: from-image` CSS property, which is only supported by
Firefox.

opw-1814407
2018-02-26 08:24:08 +01:00
Aaron Bohy a16013be66 [FIX] web: multi pages ordered o2m with onchange
Let's assume a one2many displayed over several pages with a default
order such that a record, say R, that would normally be on page 1
is actually on another page. Moreover, there is an onchange on that
one2many which converts all commands 4 (LINK_TO) into commands 1
(UPDATE), which is standard in the ORM.

When the first line of the one2many was edited, the record R was
fully loaded, whereas it shouldn't have been (as it is not on the
current page). So basically, a useless read was performed.
Moreover, if there was an x2many field in the one2many list, a
crash occurred because relational data of R that shouldn't have
been read wasn't postprocessed by the BasicModel.

The useless read occurred because the one2many subrecords weren't
correctly sorted before checking if some of them/some of their
fields should be read. This is not the case anymore.

OPW-1816800
2018-02-26 08:14:08 +01:00
Joren Van Onder 5b769650d6 [FIX] point_of_sale: allow refunds on non-cash journals
A customer can pay an order with a non-cash journal (e.g. a credit
card through a stand-alone terminal).

When this order has to be refunded later it should be possible to do
so on that same journal.

Some code prevented this from happening, notably a check in
order_is_valid which explicitly prevented this for an unknown
reason. There is no explanation in the
commit (4647f896a4) introducing that.

This commit allows the following:

1. input what you want to refund with a negative qty
2. click 'Payment'
3. click the Credit Card (type Bank) journal
4. (amount is auto-populated)
5. click 'Validate'

opw-805302
2018-02-25 19:35:11 -08:00
Odoo Translation Bot 141a2acdd8 [I18N] Update translation terms from Transifex 2018-02-25 04:54:25 +01:00
Odoo Translation Bot 3535904bce [I18N] Update translation terms from Transifex 2018-02-25 01:38:10 +01:00
Romain Derie 6d25671bb3 [FIX] website_sale_coupon: new class for product results
For the tests on coupon on enterprise, there is a need of a new class to wait
search results to be loaded, or it would click on the /shop product instead of
waiting, resulting in a conccurent update error.

This closes #22263
2018-02-23 18:35:20 +01:00
Christophe Simonis 9a1d71ce95 [MERGE] forward port branch saas-14 up to d8e45489cd 2018-02-23 18:25:03 +01:00
Christophe Simonis d8e45489cd [MERGE] forward port branch 10.0 up to ab60d773eb 2018-02-23 18:24:26 +01:00
Adrian Torres 517b1d1faf [FIX] sale: re-init account.invoice.report view (#23286)
* Install sale_management, contacts
* Uninstall sale (not sale_management)
* Try to access any partner via contacts
    -> BOOM, traceback: relation account_invoice_report does not exist

For some reason, uninstalling `sale` drops the SQL view for
account.invoice.report which in turn means that anything that requires
the view will break, this was the case for accessing the res_partner
form view.

Fixes #23270 by forcing account.invoice.report.init() upon
uninstallation of the `sale` module.
2018-02-23 16:06:03 +01:00
Yannick Tivisse 3ac58d44c7 [FIX] l10n_be_hr_payroll: Use the warrant costs on wage_with_holidays
Purpose
=======

The warrant cost formulae has been modified at 5d22170.

Instead of using the (remaining) warrant costs formulae, use the corresponding field instead.
2018-02-23 15:23:07 +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
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