Commit Graph
127612 Commits
Author SHA1 Message Date
Odoo Translation Bot 917ad03026 [I18N] Update translation terms from Transifex 2019-02-24 01:37:50 +01:00
Jeremy Kersten 96dc825c8c [FIX] website: reset template
fix retro compatibilty

Old qweb template http_error_debug was wrong, but we never entry in the if.
Now that we fixed to enter in the if, we need to make retrocompatible code to
be able to display the QWebException from v9 with the old view from v8.

odoo.exceptions.QWebException
  vs
odoo.addons.base.models.qweb.QWebException

closes odoo/odoo#31383
2019-02-14 13:39:55 +00:00
Nathan de Pryck 9434ee850f [FIX] sale: Correct fiscal position access right
The issue happened when a user which does not have access to some fiscal
position try to print a sale order. In this case a traceback is generated.
In order to avoid the traceback and to be able to print the report
the access rights are bypass thanks to a sudo() in the report.

OPW-1943727

closes odoo/odoo#31357
2019-02-22 10:55:56 +00:00
Jorge Pinna Puissant a1e6a0f0c5 [FIX] account: price_unit report decimal precision
Before this commit, the unit price in the invoice's reports, had the
same decimal precision as the currency and not the one specified for the
unit prices.

Now, the reports shows the unit prices with their specific decimal
precision.

opw-1940406

closes odoo/odoo#31314
2019-02-21 08:35:09 +00:00
Aaron Bohy 7ffe3ce5c6 [FIX] web: kanban: rendering of async widgets
This rev. fixes 3 issues with async (field) widgets in the kanban
view.

From rev. 5faec34a, widget'$el doesn't exist before start. This
means that for async widgets, one can't interact with the widget's
$el right after calling appentTo. In KanbanRecord, this is exactly
what we did for both field widgets (<field name=.../>) and widgets
(<widget name=.../>).

Moreover, when the kanban view was updated (e.g. when the user
refined the search using the search view), and the rendering was
async (because of the presence of an async widget), the renderer
didn't wait at all for the widget to be ready before updating the
view. This caused flickering, mostly, but also a crash in
accounting with the JournalDashboardGraph widget (because
on_attach_callabck was called before the widget was ready). To
reproduce this particular issue, go to accounting, add a filter
that doesn't match any record and save it as favorite (default),
press F5 (no record is displayed), remove the filter.

opw-1925079
opw-1925479

Fixes #30087
Closes #31254

closes odoo/odoo#31327
2019-02-21 13:54:47 +00:00
Lucas Perais (lpe) 6fc08a88ae [FIX] web_unsplash: save image for res_model
Go on the website, create a new product from there
Click on the image to change it, select an unsplash image

Save your product.

Beforer this commit, the image wasn't saved because the qweb field image
did not know what to do with /unsplash/ urls

After this commit, the image is saved on the product (or any object...)

OPW 1936191

closes odoo/odoo#31328
2019-02-22 08:14:10 +00:00
Nicolas Martinelli 27f8bb8913 [FIX] stock: inventory on category
- Create a product category A
- Create a product category A1
- Add a product in A1
- Launch an inventory adjustment on A, and select 'Exhausted Products'

All products (even from other categories) are included.

Since there is no product found in the category `products_to_filter`
and `quant_products` are empty. Therefore, we fall back on
`[('id', 'not in', [])]`, which selects everything.

The root cause is that we don't include child categories. There is no
real point of doing so.

opw-1932192

closes odoo/odoo#31322
2019-02-21 10:41:45 +00:00
Andreas Perhab eb11b465dc [FIX] odoo: fix addons paths on windows with use of normcase
This is necessary to get --dev=xml working on windows, because the xml
import uses normcase in file_open and the case normalized filename is
then used to find the addon path (which was not found before on windows)
With this fix arch_fs is now correctly filled in windows and --dev=xml
works.

closes odoo/odoo#28331
2018-11-01 10:41:58 +00:00
Jorge Pinna Puissant c5a3b607e6 [FIX] website_sale: empty error message
opw-1918450

Before this commit, the error message wasn't shown when a field was
empty.

Now, the error message shows correctly.

closes odoo/odoo#29993
2019-01-07 13:13:47 +00:00
Arnold Moyaux df7953f303 [FIX] stock: unreserve drop all the processed work
Usecase to reproduce(or any other way to lower initial demand on move):
- Build a MO with 5 products to do
- Produce 3
- Update the quantity on the mo to 3
-> All the consumed quantity on move lines is dropped.

It happens because lowering the initial demand on a move
will call unlink on its move lines. (increase it will
update the move's state and reassign if it comes from a supplier)

Instead of dropping and reassign the move in order to change
the reservation, it is possible to directly write the new
reserved quantity on the move lines and that will update the
reservation on qaunt directly. Also we don't want move lines
without reserved quantity and quantity done thus we drop them.

closes odoo/odoo#29941
2019-01-04 13:57:49 +00:00
Odoo Translation Bot e2afb0755d [I18N] Update translation terms from Transifex 2018-11-01 02:44:41 +01:00
Christophe Simonis f6ca72b3ce [MERGE] forward port branch saas-11.3 up to 21eb31d804 2018-10-31 20:43:03 +01:00
Christophe Simonis 21eb31d804 [MERGE] forward port branch 11.0 up to a587325ca7 2018-10-31 19:22:21 +01:00
Christophe Simonis a587325ca7 [MERGE] forward port branch saas-15 up to 00829a0beb 2018-10-31 18:31:53 +01:00
Christophe Simonis 00829a0beb [MERGE] forward port branch saas-14 up to c552e368b3 2018-10-31 17:58:05 +01:00
Christophe Simonis c552e368b3 [MERGE] forward port branch 10.0 up to 93d69933ac 2018-10-31 17:23:32 +01:00
Antoine Prieels (ANP) 96a795f177 [FIX] partner_autocomplete : Do not crash other tests when partner_autocomplete server fails
Add a check to see if we're in test mode that returns an InsufficientCreditError to avoid failing other tests if partner_autocomplete server fails

closes odoo/odoo#28324
2018-10-31 16:11:31 +00:00
Romain Derie 7aa2136938 [FIX] website: avoid using self if not an existing view
web_editor dirty elements are saved by calling the ir.ui.view `save()` method.
As this method is called through call_kw _rpc on the ir.ui.view model, self
is binded to the view which has the `id` sent in the request.

In some cases, when editing a field for example, the id sent is the id of the
field's record (eg: product.template for price field).

In that case, the view binded on self will be the view with the id of the
field's record being edited.

If there is no ir.ui.view with the same ID as the field's record, self won't
exists.
This misbehavior resulted in no error luckily since we only use self to call
ir.ui.view methods without ever using self properties.

Since multi-website 47b00c5d53 overrided the `save()` method and used self.key
it was crashing when the self record did not exists.

This commit will fix that by doing the multi-website check only when it is a
view and not a field that is being edited. (We know that if xpath is set)

opw-1904637

Step to reproduce:
  - Go to a product on ecommerce, eg product.template 13013
  - Edit the product price field, the oe-id attribut is 13013
  - Delete the ir.ui.view that has the same ID than the product (13013)
  - Save -> It will crash since self is binded to "ir.ui.view(13013,)" but it
    does not exists and we try to access key

closes odoo/odoo#28469
2018-11-08 10:52:44 +00:00
Goffin Simon 47959438b6 [FIX] sale_stock: Impossible to ship a kit with different uoms
Steps to reproduce the bug:

- Let's consider three products P1(in Unit), P2(in kg), P3(in Unit)
- Create a BOM kit for P1 whit 1kg of P2 and 1 Unit of P3 as components
- Create a SO with P1 and validate it
- Go to the shipment and validate

Bug:

An error was raised saying:

The unit of measure kg defined on the order line doesn't belong to the same
category than the unit of measure Unit defined on the product. Please
correct the unit of measure defined on the order line or on the product,
they should belong to the same category.

PS: The quantity delivered on a SO line must only be computed for the product
defined on the SO line. Otherwise with a BOM kit, the sum of all its components
was done instead.

opw:1905223

closes odoo/odoo#28460
2018-11-07 08:12:38 +00:00
Julien (juc) Castiaux 60d519b890 [FIX] web: format function missing in percentage widget
The format function was missing for the percentage widget type, so
`field_utils.parse[this.formatType]` (see [1]) resolved as
`undefined` which is not a function and so raised an error when
the user was trying to update the field.

This PR add that parsing function. Both `xx%` and `0.xx` are
understood by the parser and resolve to the correct float value.

opw-1895979

[1] https://github.com/odoo/odoo/blob/e220721a8ee80c02fe5aba5ed8c9f3f4ae54ea97/addons/web/static/src/js/fields/abstract_field.js#L399

closes odoo/odoo#28431
2018-11-08 09:51:38 +00:00
qsm-odoo 566cece592 [FIX] website, *: review auto light and dark colors
* web, web_editor

The logic which chose if the user text color was supposed to be used as
bootstrap "dark" text color or bootstrap "light" text color
(https://github.com/odoo/odoo/commit/8b2dbd1441d6713d9072db03e8d3cb6c2246410f)
was fine when using the default theme with default bootstrap but was not
working as intended in some themes.

This commit also introduces a more accurate and complex method to
determine the correct contrasted color in most cases.

closes odoo/odoo#28468
2018-11-07 17:41:08 +00:00
Julien (juc) Castiaux 8108a60dc3 [FIX] purchase: access forbidden for product image on order line
When a user accesses a PO through the portal thanks to an access token
(without being connected), the product image on each order line is
rendered using the image placeholder with a size of 48x48.

This raises a 403 Forbidden at image retrieval since the access token is
not passed as a parameter. This commit corrects that behavior by sending
the resized image along with the rendering of the template instead of an
url.

Another solution could be to generalize the access token check to any
model in:
https://github.com/odoo/odoo/blob/12.0/odoo/addons/base/models/ir_http.py#L303-L311

But this seems overkill regarding this specific error.

opw-1902741

closes odoo/odoo#28479
2018-11-08 07:37:23 +00:00
Nicolas Martinelli 99a7b44a06 [FIX] sale: reference for Wired Transfer
- Configure custom payment instructions
- Create a SO, send it by email to the client (do not validate)
- As the client, open the link received by email and 'Accept & Sign'
- Click on 'Pay Now', choose 'Wire Transfer'

The page reloads and shows the message:
> Pending... The order will be validated after the payment.

along with the custom payment instructions. However, no communication is
provided for the payment.

First, the `reference` is never set when calling the
`payment_confirmation_status` template, as it is done in
`portal_invoice_page_inherit_payment`. Moreover, in this workflow, the
reference is never set on the SO because of an incorrect filtering in
`_set_transaction_pending`.

opw-1906464

closes odoo/odoo#28466
2018-11-07 10:37:49 +00:00
Sébastien Theys 45dec698ee [FIX] product: pricelist item deterministic order
Following commit b43151c11c

The order of the pricelist items on the interface was made deterministic, but
there was still a problem with the actual computation because the SQL was
created manually and used a different order than the _order of the model.

Moreover, it is better to use id DESC instead of ASC to make sure the
automatically created default rule matching everything is actually applied last.

PR: #28476
2018-11-07 14:30:06 +00:00
qsm-odoo 0662a1948b [FIX] website: recompute carousel item heights on image loading
Some code is in charge of setting the same min-height for all items of
a carousel to the natural height of the tallest item, once the page is
loaded. This code was not working correctly in the case the natural
height of this tallest item depends on the height of one of its inner
image, as we have to wait for the image to be loaded in that case.

closes odoo/odoo#28159
2018-11-07 09:43:22 +00:00
Nicolas Lempereur 81b6adcda7 [FIX] mail: traceback reply button typo cd34f6de72
There was a typo with msgID at one part called messageID in another.

opw-1904029
closes #28465
2018-11-07 10:38:14 +00:00
Nicolas Lempereur 233bae7de9 [FIX] translate.py: fallback on base lang if noterm
When there is a language and its base language translation files in a
module, in 12.0 an empty translation in the language translation file
will not fallback on the base language.

eg.

 fr.po : {'one': 'un', 'seventy': 'soixante-dix'}
 fr_BE.po: {'one': '', 'seventy': 'septante'}

 => the translation in fr_BE will be {'one': '', 'seventy': 'septante'}

 but before 7288b477 it would have been {'one': 'un', 'seventy': 'septante'}

With this commit, an empty translation is no longer created so does not
override base language.

Also the intention of d84b795b0a that was also lost is restored by
upserting only noupdate==false translation, and inserting the other
ones.

opw-1904638
closes #28297
2018-11-07 09:07:02 +00:00
David Beguin d63e72853b [FIX] mass_mailing : restore import mass_mailing.contact into mass_mailing.list
Since the opt out per mailing list, the intermediate model was used
to list all the recipient of a mailing list. The side effect was that
importing new contacts into mailing list was not possible anymore.
Also, creation of a new contact into a mailing list was made indirectly
by creating a new many2many record between contaxct and list, which was
not really user friendly.

This commit restores the mailing contact model as the view of the mailing
list recipients. In other terms, the contact import is restored.
An opt-out computed field as been added to be able to filter on opted out
contact inside the mailing list recipients view.
This opt_out field SHOULD NOT be used in a form view as it need the active
mailing list id in the context in order to be computable and searchable.
This field has no sense without this active mailing list id context.

Task ID 1891228
Linked with blacklist and opt out per mailing task (ID 33224)
Closes PR #27632
2018-11-05 15:15:43 +00:00
Christophe Simonis d226f8b4ff [FIX] hr_holidays: set leave types as noupdate
They should not be updated using current year.
2018-11-06 20:02:06 +01:00
Nicolas Martinelli 3a74a56b0b [FIX] account: invoice paid at reconciliation
Move the option to `account_accountant`, since there is no way to do it
in `account`, leaving unpaid invoices.

opw-1906544

closes odoo/odoo#28440
2018-11-06 14:24:56 +00:00
Antoine Prieels (ANP) c4270135ef [FIX] snailmail_account: fix error when sending invoice
A compute function was removed in c2b55f3e0c
thus breaking the modal. A test will follow.

closes odoo/odoo#28439
2018-11-06 14:54:24 +00:00
Nicolas Martinelli 0f2e3ab711 [FIX] snailmail_account: do not send by default
Since most of clients don't have any credit, deactivate this by default.

opw-1906566

closes odoo/odoo#28438
2018-11-06 14:01:07 +00:00
Sylvain Van Hoof e07ec6cdb5 [CLA] sign CLA for Okia SPRL
closes odoo/odoo#28415
2018-11-05 15:20:56 +00:00
Pierre Paridans dd70c68426 [FIX] mail: content override toolbar in mobile landscape
On mobile (specifically in landscape orientation as the height of the
viewport is narrower), the content appear over the bottom toolbar
instead of going below.
Solution is in 2 parts:
* raise the toolbar way above the content
* make the toolbar opaque

closes odoo/odoo#28429
2018-11-06 13:06:16 +00:00
Christophe Simonis 3b3a65bef0 [MERGE] forward port branch saas-11.4 up to dc35de9d30 2018-11-06 14:12:51 +01:00
Robot Odoo e220721a8e [FIX] web: accept field name as a groupby descriptor
In some cases, and for historical reasons, the groupby property can be
expressed as a string (for example, 'stage_id') instead of a list of
strings (for example, ['stage_id']).

However, the support was not complete. A crash could happen in some
cases. For example, if there is a group_by: 'stage_id' property in the
context of an action, it works in list view, but adding that view to the
dashboard would result in a crash, without this commit.

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#28408
2018-11-06 12:51:37 +01:00
Andrey Troitskiy 764bd645fc [FIX] hw_scale: added field 'disable' to namedtuple 'ScaleProtocol'
Introduced at bb015818ea
Getting error
TypeError: __new__() got an unexpected keyword argument 'disable'

closes odoo/odoo#28202
2018-11-06 10:12:50 +00:00
Géry Debongnie 6e9c1d92d7 [FIX] board: use correct context in sub board views
Before commit 60f143c8e7, the dashboard
parameters did not use the parameters from the action, so some important
information could be lost.

However, in this same commit, the action context overrides the context
from the user defined views, which means that some information is lost.
For example, customized group bys are ignored.

This commit fixes the issue with some careful context manipulation.
Some special care was done to remove the groupby from the action context
if it is not empty, because that same logic is used in views.
2018-11-06 09:17:05 +00:00
Goffin Simon 7f5180578f [FIX] sale: Changement of behavior from 11.0
Introduced by: 3d46887d38

Before this commit, creating an invoice from a SO always chose
the payment_method=all when the number of invoice linked to the SO >0
OR all the lines of the SO were with invoice_policy = 'order'

After this commit, creating an invoice from a SO just choose the payment_method=all
when the number of not canceled invoice linked to the SO > 0 AND when there are at
least one downpayment in the SO

SO:

Steps to reproduce the changement of behavior:

- Create a SO for 10 units (invoicing policy based on ordered quantities)

- Create the invoice for 10 units (from SO) and validate it

- Change ordered quantities to 5 units

- Click on create invoice on the SO

The payment method chosen was delivery instead of all. So choosing the default option
lead to a user error saying: there are no invoicable line instead of creating a credit note.

opw:1904258

closes odoo/odoo#28426
2018-11-06 09:15:53 +00:00
Géry Debongnie baeb1a1938 [FIX] web: accept field name as a groupby descriptor
In some cases, and for historical reasons, the groupby property can be
expressed as a string (for example, 'stage_id') instead of a list of
strings (for example, ['stage_id']).

However, the support was not complete. A crash could happen in some
cases. For example, if there is a group_by: 'stage_id' property in the
context of an action, it works in list view, but adding that view to the
dashboard would result in a crash, without this commit.
2018-11-06 08:53:21 +00:00
Romain Derie f9e34d98f1 [FIX] web_unsplash: do not fetch app_id if no Unsplash images
As empty arrays are considered truthy, the call to `/web_unsplash/get_app_id`
would always be performed even if no Unsplash images.

closes odoo/odoo#28421
2018-11-05 17:02:34 +00:00
Jigar Vaghela 4f8ed012c4 [FIX] stock: Hide Reserved column in done stage.
Before this commit:
    Reserved column appeared with 0 qty when Delivery Order goes to done Stage
After this commit:
     Hide Reserved column when Delivery Order goes to done stage.

This task is related to #1888361
Closes: #27223

closes odoo/odoo#28409
2018-11-05 13:33:14 +00:00
Nicolas Martinelli 656c1123d3 [FIX] sale: 'My Quotations' default filter
The filter should not filter on the state.

opw-1906405

closes odoo/odoo#28406
2018-11-05 13:36:38 +00:00
Moises Lopez 8f36b246d0 [I18N] clean es_MX old translations
Only keep the useful ones

closes odoo/odoo#28351
2018-11-02 09:38:23 +00:00
jem-odoo 2aa87253d1 [FIX] sale_purchase: disable PO stat button on SO
Creating a service and stockable that create a PO on SO confirmation
(with different suppliers) will indeed work, but the status button
will only display 1 PO. The problem is that stock is not linking
the SO line with the PO line.
Thus, we prefer desactivated the button displaying the wrong value, as
it brings confusion to the user.
A proper bugfix should be done in master, to correctly link SO line with
PO line making the PO count correct.

opw-1905189

closes odoo/odoo#28410
2018-11-05 12:58:29 +00:00
Martin Trigaux 00626905af [FIX] sale: use name_search on product search
Before 762adedece the search was done on the related field product_id
This was equivalent to make a search on the records order_line.product_id
and to use the name_search of product to find it.

With the filter order_line.product_id.name, it was explicitly searching on the
name of the template

Fixes odoo/odoo#28344

closes odoo/odoo#28390
2018-11-05 10:07:17 +00:00
Goffin Simon f7aa7cebf9 [FIX] stock: Cannot add company to push/pull rules
When creating a rule, the company of the route must be taken when
the route has a company.

opw:1903996

closes odoo/odoo#28387
2018-11-05 08:52:11 +00:00
RomainLibert 536c65bc7c [FIX] l10n_fr_hr_payroll: update data
Since commit https://github.com/odoo/odoo/commit/bd5b2c9466eabe56bbb1e91d29a7e422e957550f we removed
the field limit, replacing it by allocation_type.

closes odoo/odoo#28398
2018-11-05 12:13:44 +00:00
Nicolas Martinelli cf35835b8b [FIX] account: no account in manual move creation
- Activate multi-currency
- Create an Journal Entry manually
- Create a line
  Do not fill Account
  Fill in Amount Currency
  Fill in Currency

A traceback occurs because `line.company_currency_id`.

An extra condition `and line.company_currency_id` is not sufficient to
have the onchange working properly. Indeed, the related field
`company_currency_id` goes through another related field (`company_id`),
leading to an empty value in some cases.

opw-1904854

closes odoo/odoo#28389
2018-11-05 09:59:02 +00:00
Nicolas Seinlet 672bc57c1d [FIX] mail: access error when reading a channel
When a record inaccessible by the user is linked
to a message in a channel accessible to the user,
Avoid to raise an access error due to this linked record.

Also need an aditional query in test query_count.

closes odoo/odoo#28312
2018-11-02 08:32:50 +00:00