Commit Graph
115438 Commits
Author SHA1 Message Date
Christophe Simonis 2a9d3812a6 [MERGE] forward port branch saas-15 up to 3fce2b769e 2018-03-22 15:02:58 +01:00
Romain Derie 744af2db60 [FIX] web_editor: correctly set image on double click
Commit 321486851a fixed double click on media dialog when multiple selection is
allowed.
Still, it needs a deeper fix to ensure that the image is/remains selected when
double clicking no matter it's state (selected or not) before the clicks.
Double click should always force the image to be selected before saving.

Step to reproduce:
  - Drop the Image Gallery snippet
  - Open new images manager (Customize > Add images or Add Images directly if no
    images set yet
  - Select an image (simple click)
  - Now double click on it

It won't set the image since when double clicking, it:
1. Unselected the image on the first click (click event)
2. Selected the image on the second click (click event)
3. Unselected the image and saved (dblclick event)
2018-03-22 14:38:17 +01:00
Christophe Simonis 3fce2b769e [MERGE] forward port branch saas-14 up to d8c6e56975 2018-03-22 14:13:59 +01:00
Christophe Simonis d8c6e56975 [MERGE] forward port branch 10.0 up to fb2df13ea8 2018-03-22 14:01:07 +01:00
Toufik Benjaa 3c2876f689 [FIX] website_quote: Fix '/my/orders' route inheritance
- The module 'website_quote' inherit the CustomerPortal class defined in 'portal/controllers/portal.py'.
It does this to override a single method, namely 'portal_order_page'.
The issue here is that 'portal_order_page' is not defined in the module portal, but in sale.
This causes random issues where the inheritance was not done in the correct order.
Which means the original portal_order_page was sometimes called before its child.
Calling the original portal_order_page first means the child is never called.

This commit change the imported CustomerPortal class to the one defined in the module sale.
2018-03-22 13:51:53 +01:00
Lucas Perais (lpe) 8df055b584 [FIX] web: don't loose focus when editing cell in list
Have a list with readonly modifiers on at least one column.
Have the first record of the list be readonly as computed by the modifier
Create and edit a second record
Enter a value in the cell and hit TAB

Before this commit:
The focus on the targetted cell was lost and the rendering of the cell was in mode readonly
This was because the baseMode of the modifier dict was applied to one and only one node (== one column) and hence to *all* the records

After this commit:
The rendering and keyboard TAB navigation works as expected in the list editable
The baseMode concept has been sharpened and each cell now has one

OPW-1816569
OPW-1824979
closes #23809
closes #22859
closes #23436
2018-03-22 22:51:57 -08:00
Hetashree Chauhan fb2df13ea8 [FIX] stock: picking button in valuation report
When hitting the picking button in the valuation report, there was a
"form view could not be loaded" error. This is because we try to
open a picking with a stock move id.

master bug 1817491
Fixes #17226
2018-03-22 13:36:52 +01:00
Nicolas Martinelli 048539732d [FIX] stock_account: compute price if no product
- Activate anglo-saxon accounting
- Create an invoice with a line without product but a UOM
- Validate

A traceback arises since `_compute_price` is called on an empty
recorset.

opw-1830042
2018-03-22 12:39:16 +01:00
Luis González ef540eb006 [FIX] web: Make accessible with keyboard the delete button on o2m fields (#23719)
* [FIX] web: Make accessible with keyboard the delete button on o2m fields

Currently, the delete button in one2many fields (trash icon) is not
reachable when using the keyboard, because it's neither a link, nor a
button or any other interactable HTML element, but a `<span>`.

This change causes that button to be an actual HTML button keeping the
same appearance, so it may be reached when using the keyboard.

* [FIX] web: Modify test to expect button instead of span as o2m trash icon

Since buttons to delete records in o2m fields (the trash icon) were
changed from `<span>` to `<button>` to be able to access them with the
keyboard, the test need to be modified so it expect the new element
type and doesn't break.
2018-03-22 12:18:35 +01:00
Martin Trigaux ac76a6b40c [FIX] stock: translate stock traceability report
Missing user language in the context

Fixes #21332
2018-03-22 11:48:49 +01:00
Christophe Simonis f16a6c90d3 [MERGE] forward port branch 10.0 up to 9aa1b7ba12 2018-03-22 11:41:27 +01:00
Toufik Benjaa 9aa1b7ba12 [FIX] web: Access issue for non qweb reports
- With the removal of the password field on the sessions (https://github.com/odoo/odoo/commit/da1f153d61d747d9357694382fe04f96c0ca886a) the non qweb reports going through the route '/web/report' were not able to be generated.
We address this issue by avoiding to call dispatch_rpc and by using the functions to generate the report directly.
This doesn't cause any security issue because the route '/web/report' is callable only by logged in user.
Meaning that the session is already validated.
2018-03-22 11:29:01 +01:00
Jeremy Kersten 38e339258c [FIX] base: settings view match on label.text
Before this commit, search was broken because containsLike was searching on
the innerHtml. (3dd93ed129)

Settings use _wordHighlighter to change the background of the matching text
into the label, so the label was not only text, but html.

<label><span class="highlighter">Mul</span>ti-company</label>
    : looking for (mul)

After this commit, the match is based on the text content and not on the html.
2018-03-22 11:22:33 +01:00
Martin Trigaux a8230853e8 [FIX] *: correct bad %s translations
Continue work of 6292600b85 for languages not published on Transifex too
Remove en_GB file that was containing too many errors (e.g. 'PoS Order'
translated 'Sale Order')

Fixes #19661
2018-03-22 11:12:17 +01:00
Goffin Simon dcf77ee9f9 [FIX] web: Modify existing sales order lines
Steps to reproduce:

- Create a sale order and add sale order lines(Not Inline) without saving the sale order.
- Edit any of the existing sale order line and hit on "Save & New" on the sale order line.
- Add another sale order line and hit on "Save & Close"

Bug:

A validation error was raised.

opw:1829723
2018-03-22 10:56:31 +01:00
Nicolas Martinelli 6b07bce0ec [FIX] mail: strip comments when inlining
When an unread message contains conditional html statements, clicking on
the discuss tray icon produces a JS traceback. This is due to
`node.tagName` being undefined.

When inlining, there is no need for these comments.

opw-1829641
2018-03-22 10:52:45 +01:00
Martin Trigaux 88170774a7 [FIX] *: correct bad %s translation
Global search and replace badly formated %s
2018-03-22 10:52:01 +01:00
Martin Trigaux c5891effa6 [I18N] Update translation terms from Transifex
With automatic corrections of bad %s
2018-03-22 10:25:01 +01:00
rco-odoo 875f849018 [FIX] models: backport of 5f660cd
This fix avoids wild prefetching when serializing
onchange results.

We fell on a strange situation in method `onchange`, where
some data was missing from cache when serializing the
result. In that case, the prefetching overwrites so
many stuff in cache that the results of the onchanges
are lost.
Don't let that happen.

This is a backport of 5f660cd, with rco-odoo's blessing.
A use case this commit solve is
  - Install the sale app.
  - Create new quotation and assign new partner
  - From inline editable listview add a new order line
  (created the product inline) then directly save.
  - Click on the order line (NOT IN EDIT MODE). This opens
  the order line in a popup.
  - Close the popup.
  - Click edit again.
  - Now change the order line description.
When unfocusing order line field, the description is reset
to previous one.

Closes #23276
Closes #23277
2018-03-22 09:59:47 +01:00
Christophe Simonis e8f630e44d [MERGE] forward port branch saas-15 up to 7a45296cf1 2018-03-21 18:20:22 +01:00
Christophe Simonis 7a45296cf1 [MERGE] forward port branch saas-14 up to 78dced6bc2 2018-03-21 16:49:15 +01:00
Christophe Simonis 78dced6bc2 [MERGE] forward port branch 10.0 up to c2b3ad1899 2018-03-21 15:55:26 +01:00
Arnaud Baes 3c468b0185 [FIX] stock: run scheduler
the "company_id" value wasn't declared explicitly in the "_prepare_procurement_values" method, wich caused the procurement "run" method to set a company by default regardless of the company associated to the orderpoint.

this caused issues in a multi-company config. ( see #23764 )
2018-03-21 15:52:41 +01:00
Nicolas Martinelli aed8e199ce [FIX] base_import: import empty date/datetime
When a user imports a file with a datetime field set to a blank space,
the value is computed as 1900-01-01 00:00:00. However, when converted in
the user's TZ, this can lead to a value < 1900-01-01, which is not
recognized at the JS level as a valid value.

This makes the access to the record impossible, and possibly makes the
access to an app impossible. It is for example the case with Purchase,
where the order date is displayed on the default's action view (list
view).

We strip the value before testing if the value exists to avoid this
case.

opw-1826344
2018-03-21 14:43:45 +01:00
Goffin Simon c2b3ad1899 [FIX] stock_account: Cannot validate some invoices
Steps to reproduce the bug:

- create an invoice
- add one line without product but with a uom
- validate it

Bug:

A traceback was raised because no product was set on the invoice line.

opw:1825464
2018-03-21 14:19:09 +01:00
Romain Derie 321486851a [FIX] web_editor: correctly set image on double click
Commit e011d58bee add the possibility to unselect images on the media dialog.
But it introduced a collateral bug preventing double click to set the image.
Indeed, double click event triggers not only the double click event but also
twice the single click event.

Before commit e011d58bee, it would work fine and as intented on double click:
1. It would trigger twice the single click, selecting twice the image.
2. Then, it would trigger the double click that would save the selected image.

But after the commit:
1. It triggers twice the single click, selecting and then deselecting the image.
2. Then, it triggers the double click that saves nothing since the image got
   unselected on second single click event.

Now, before saving on double click event, we select the image.

task-1815165
2018-03-21 14:18:45 +01:00
Adrian Torres d9869de690 Revert "[FIX] base: use khmer language"
This reverts commit 3401e95ec3.

Updating language code is forbidden, see commit 8628cef
2018-03-21 13:20:02 +01:00
Swapnesh Shah a842cd9022 [FIX] base: use decoration-muted instead of deprecated color in lang tree view 2018-03-21 12:59:42 +01:00
Florent de Labarre 0166b3ddbc [FIX] maintenance: give equipment same activities filters as other models
Commit 34da40a44d improved all activities filters used through various
apps. However in maintenance model maintenance equipment model was forgotten.
This commits fixes that in order to have same filters on all models using
activities.
2018-03-21 12:54:47 +01:00
William Henrotin 3401e95ec3 [FIX] base: use khmer language
The language territory code for Cambodia is KH not KM
2018-03-21 12:35:49 +01:00
Jeremy Kersten c17170b9c1 [FIX] web: all routes should have **kw to support utm/extra params
Without this commit, a valid route /web/content with an extra
params eg utm or adwords will return a 500 with:
TypeError: content_common() got an unexpected keyword argument 'extra_param_name'

This commit closes #21221

Task-32836 should fix for all routes in a future version
2018-03-21 12:20:33 +01:00
Jairo Llopis 9e981f6535 [FIX] website_project_issue: No buttons for portal, customers
Customers without an user account can do nothing with the button
in the notification, so it's better they don't have it.

partial backport of #4732a1

This commit closes #22487
2018-03-21 12:20:33 +01:00
Highcooley b3b0c02d8f [I18N] l10n_ch: add German translations
German (CH) Translations Chart of Accounts

Closes #23785
2018-03-21 11:45:26 +01:00
Highcooley 916dad8050 [CLA] signature for Highcooley
Done at #23785
2018-03-21 11:45:26 +01:00
Christophe Simonis 0cefaad370 [MERGE] forward port branch 9.0 up to 2c5fe07fc7 2018-03-21 11:35:58 +01:00
Ward Marissen 2c5fe07fc7 [FIX] website_portal: Keep country changes
When a portal user changes his account details and presses the 'Save' button
when a mandatory field is not set, the selected country will be reset even when
the user did change the country in the form. This fix prevents this from
happening and leads to an improvement for the end user.

This commit closes #22439
2018-03-21 11:31:27 +01:00
hpr-odoo ce05f3b2e0 [FIX] base: iterate on each report
If tries to compute the report_rml value on multiple reports at the same time

Closes #21116
2018-03-21 11:01:16 +01:00
Nicolas Martinelli 65bad81b2c [FIX] stock: Delivery Slip
- Create a picking to deliver 10 units, save
- Edit and change to 12 units
- Print the Delivery Slip => the qty is 10
- Validate the picking with 12 units
- Print the Delivery Slip => the qty is still 10

The use of `ordered_qty` is misleading, since it corresponds to the qty
ordered at creation.

Backport of 0a2999cdd9

opw-1825396
2018-03-21 11:00:36 +01:00
Nicolas Martinelli b200f020ea [FIX] crm: create opportunity from kanban
- Create a customer, set an address
- Create an opportunity from the kanban view

The address fields are not filled in in the opportunity.

We add all fields filled in by `_onchange_partner_id_values`

Complement of commit e2bbee6df5

opw-1816438
opw-1826859
2018-03-21 10:46:03 +01:00
Rohan Patel 57e457c524 [IMP] hr: check employees only alias restriction independently of record existence
Commit 78ac6de52d refactored methods checking alias security on the
routing found for a given destination address. Indeed if a routing is found
linked to an alias a security check is performed according to the restriction
defined on the alias itself.

HR module adds the 'employees only' restriction. A bug has been introduced
in the mentioned commit concerning employees-based aliases. Indeed a condition
on having a recordset has been added (self.ids, changed to record.ids at
20d8025036). This condition is actually not necessary as checking the
email author is linked to an existing employee has nothing to do with the
alias being linked to a record or creating new record.

This may causes issues notably using employees-restricted aliases in
expense application. Indeed you could use aliases to create new expenses
for employees and you could have issues with this condition.

This commit is linked to task ID 1829860 and ID 35093. Closes #22960 .
2018-03-21 10:44:20 +01:00
Goffin Simon 60793a8a48 [FIX] stock_account: Cannot validate a Customer Credit
Steps to reproduce the bug:

- Create a customer credit note
- Add a new item
- Don't input Product, input Description and Unit of Measure
- Click on Validate

Bug:

A traceback was raised because no product was set on the invoice line.

opw:1825972
2018-03-21 09:30:04 +01:00
Nicolas Martinelli 6d195ee603 [FIX] account: unreconcile payment
- Create a SO for a customer of 100 $
- Create Invoice for the Sales Order and Register the payment
- Create a Refund Invoice, Validate it and keep it in "Open" state
- Create a second SO for 5 $
- Create an invoice for this order and validate it
- It will show you outstanding payments
- Apply the credit and the invoice will be fulfilled => Now you have a
  credit left for 95 $
- Create a third Sales order for the same customer for 5 $
- Create an Invoice for it
- It will show you outstanding credit (95 $)
- Apply the credits
- Now 90 $ are left
- In the same invoice, the credit which you applied, Unreconcile it
- It should have shown you 95 $, but it shows you 100 $ which means it
  removed the credit which we applied to second SO

The unreconcile process does not filter the partial reconciliations of
the selected invoice. All partial reconciliations on the AML are
removed instead.

opw-1819602
2018-03-21 08:37:23 +01:00
Adrien Dieudonne 3a74afd21e [FIX] barcodes: barcode scanning on Chrome mobile
Before this commit, the barcode value wasn't triggered on
some Android devices with Google Chrome and using the Odoo app.

In fact, the keypress event may not trigger with some devices.
This is probably due to the fact that this event is marked as
'Legacy'.
See: https://www.w3.org/TR/uievents/#legacy-keyboardevent-event-types

To fix this, we can use 'keydown' event but we have to handle an
other issue: there is no way to know which key is typed.
The auto-suggest feature on Android invalidate all the following
properties: Keycode, charCode, key, which, keyIdentifier, code.
This is a well-known issue:
https://bugs.chromium.org/p/chromium/issues/detail?id=118639

For more infos, please read this blog:
https://www.outsystems.com/blog/javascript-events-unmasked-how-to-create-input-mask-for-mobile.html

As a work around, we create a temporary input field that stores
the barcode value.
The focus is set on this input when a keydown is detected.
Note that when an input has the focus, the android virtual keyboard
will be opened. We can't avoid this behavior.
The only thing we can do is to automatically close it after 800 ms.
See: https://bugs.chromium.org/p/chromium/issues/detail?id=662386

As this fix is specific for Chrome only, it's not possible
to test it easily. Some tests will be added in master.
2018-03-20 16:21:20 +01:00
Adrien Dieudonne 5bc29744c9 [FIX] barcodes: skip undefined keys in barcode value
This fixes an issue occurring with Firefox.
Some events was buffered with an undefined value and it wasn't
possible to build the barcode value from these events.
See 'handle_buffered_keys' function.

So now, we simply skip this kind of event.
We consider this as 'special keys'.
2018-03-20 16:21:12 +01:00
Nikunj Ladava cbd395ec36 [IMP] payment, sale_payment: set invoice id in payment transaction form after payment being done from sale order.
Until now invoice_id is filled on the transaction only when we make
payments through invoice. However if we make payments through sale order
then invoice_id is not filled.

This commit fixes that issue. As there is no common point between
sale_payment and account_payment except payment, a void method is added
in payment and an override done in account_payment. That was when both
modules are installed code is correctly triggered.

This commit is related to task ID 1813602. Closes #22746 .
2018-03-20 16:16:27 +01:00
Christophe Simonis b6e0f1ad59 [FIX] sale,sale_payment: remove implicit dependency of sale on payment module
This worked by accident only because `payment` module is auto-installed
when `account` is installed.

opw-1829812
2018-03-20 15:28:24 +01:00
Romain Derie b77ff40e93 [FIX] website_sale(_delivery): show prices according to B2B/B2C mode
Before this commit:
1. The delivery price on checkout would always be shown without the taxes.
   This would make the cart total unclear since it is not indicated that this
   price is tax excluded. You could only assume that this was the price the
   delivery would cost you (and not just the untaxed delivery cost which you
   can't even find the full price anyway since taxes in subtotal is the sum of
   all products taxes).

2. The sale order line in payment step of checkout are always displayed with
   taxes.

Now:
We ensure that both 1. and 2. show the delivery price with or without taxes
according to which mode (B2C or B2B) is enabled.

This fixes #12872, closes #13592 and closes #23746
2018-03-20 14:29:59 +01:00
Martin Geubelle 75d9a2b4db [FIX] web: correctly display statusbar
Some status were shown in the statusbar even though they were not specified in
the `statusbar_visible` attribute. This happened when the value was a substring
of one specified value.

Example:
```
hello = fields.Selection([('hello', 'Hello'), ('hello_world', 'Hello World')])
<field name='hello' widget='statusbar' statusbar_visible='hello_world'/>
```
In this case, both status were shown ('hello' is a substring of 'hello_world').

Fixes #20034
2018-03-20 13:49:32 +01:00
Jairo Llopis 6bd3bae04e [FIX] mass_mailing: domain translation
As Admin:
- Set up 2 languages for the installation, e.g. English and French
- Admin language is English, Demo language is French
- Create a `res.partner.category` named 'Test English'
- Assign the category to a newly created partner
- Create a French translation for 'Test English', e.g. 'Test Francais'

As Demo:
- Create a Mass Mailing
- Select a custom domain: ('category_id', '=', 'Test Francais') => it
  should match one partner
- Save and validate

Now either:
- manually run the scheduled action "Process Mass Mailing Queue" as
  Admin
- wait for the cron to process the mass mailing

No mail will be sent since the domain will be evaluated in the Admin
language, i.e. English. Indeed, the domain
`('category_id', '=', 'Test Francais')` does not match any record in
English.

The solution/workaround is to use the language of the last user who wrote
on the mass mailing.

Closes #20906, Closes #15467, Closes #15445

opw-778922
2018-03-20 13:48:49 +01:00
Nicolas Lempereur 3f5663e995 [FIX] l10n_ch: ignore stylistic background
If user choose custom report type with background, we don't want the
background on the ISR report that is intended to be printed on
preprinted paper.

opw-1820123
closes #23743
2018-03-20 13:47:15 +01:00