Commit Graph
117156 Commits
Author SHA1 Message Date
Nicolas Lempereur bae7e32e4b [FIX] website: see versionning changes
Website Versioning module (website_version) is applied when displaying
views by interfering when doing the "render the view of this `key`" and
showing the view with the same `key` but of the currently displayed
version.

The website.page model when directly rendering a page would directly
specify its `id`, thus website version was bypassed and just the master
page was displayed.

With this commit website.page has a "get_view_identifier" that can be
overrided in website_version and has the same previous behavior
otherwise.

This changeset also solves a conflict (`website().get_current_website`
also modify `request.context`) when modifying the context which also
disabled versions.

opw-1824957
closes #23847
2018-03-26 10:53:23 +02:00
Nicolas Martinelli 927a133769 [FIX] purchase: hide PO when not necessary
Partial backport of 1d515fcdac

Closes #20274
opw-1829893
2018-03-26 09:07:22 +02:00
Nicolas Martinelli cafc6c3ae0 [FIX] web: incorrect date in calendar
- Set the OS timezone to GMT-6
- Create a project task with a date deadline on D day
- The tasks appears at D-1 in the calendar

This was supposed to be fixed with 0c0fb63b0d, but actually no.

opw-1815446
opw-1828130
2018-03-26 09:02:36 +02:00
Odoo Translation Bot 14e69ca5f1 [I18N] Update translation terms from Transifex 2018-03-25 04:15:17 +02:00
Odoo Translation Bot 751ed01524 [I18N] Update translation terms from Transifex 2018-03-25 00:29:04 +01:00
Christophe Simonis f36f1ceccf [FIX] base: avoid duplicated translations when possible
When modifying a translatable record, we try to keep close translations
However, we do not need to do it if there is already a translation for
the matched term.
2018-03-23 15:40:49 +01:00
Simon Lejeune 132c7e75e5 [FIX] stock: date field on move line after _action_done
We make the date field behaves similarly to the date field on the stock
move line: before `_action_done` is called, it is the created date,
after, it is the date done.

Note that this field is only used in a report of the stock move lines.

Fixes #23725
2018-03-23 13:28:36 +01:00
Sébastien BEAU 2445f9e3c2 [FIX] base: remove BCC header from outgoing emails to avoid leaking information
When sending emails SMTP server only requires an author, recipients and the
email to send. It does not make any modification of what is sent. It is
therefore possible that BCC content is sent.

BCC mean 'Blind Carbon Copy', the address in this field should be not send
in the header of the mail and must be removed, if not the address are visible
for all recipients.

Closes #21965 .
2018-03-23 11:34:09 +01:00
Kinjal Mehta e3a0d926d6 [FIX] stock : rounding in the traceability report
- Call to float_round(3.570, precision_rounding=0.001) returns 3.5700000000000003 instead of returning 3.570 (in the _compute_quantity method).
- This report is all prepared server side so directly called value_to_html method to set the value of quantity with appropriate decimal precision to get proper value in Upstream Traceability report

Fixes #22815
Task #1817420
2018-03-23 10:36:22 +01:00
Priyanka Kakadiya 8e564993fc [FIX] stock: display of the traceability report in a picking
When nothing is tracked in the picking, there's no need to display the traceability report stat button.

task 1815243
2018-03-23 10:35:10 +01:00
Romain Derie 8097769146 [FIX] website_sale: xpath on class do not work with t-attf-class
With commit 6d25671, the `oe_website_sale` class was set in `t-attf-class` and
not `class` anymore.
By doing so, xpath like `//div[hasclass('oe_website_sale')]` won't work
anymore.

This was done for an enterprise commit adding test to (website_)sale_coupon:
https://github.com/odoo/enterprise/commit/9795452f7a30d760901ca9f637e8b082c91b2c91

The tour `website_sale_coupon` that need that class will be changed to trigger
on something else.

Note: this class is only xpath in themes

Fixes https://github.com/odoo/design-themes/pull/89
2018-03-22 18:11:06 +01:00
jem-odoo 39d9c362c5 [FIX] hr_timesheet: usability issue
To correctly fill timesheet from a list
view, an onchange was missing. Indeed, we
want the task to be in the project of the
timesheet, so adding a domain definitely
help the user selecting the task when
setting project first.
2018-03-22 16:46:04 +01:00
Romain Derie f5912cbcb3 [IMP] website: make it more noticeable when a page is unpublished
Before this commit, 2 usability issues were reported:
1. Some people would get stuck with unpublished content without even knowing it
   since they would not understand the page is unpublished.
2. People would have a hard time finding the publish button (small toggle on
   the navbar).

Now:
1. We now display a red ribbon on the top right corner specifying the page is
   unpublished. Hopefully it can't be missed.
2. This publish button will be more visible for unpublished content since it
   will be red (danger) color. Hopefully people will notice it at first look.
   Note: It is implemented in a generic way so any 'o_switch' can be turned
   into this version by simply adding the 'o_switch_danger' class to it.

task-44005
Closes #23282
2018-03-22 16:32:51 +01:00
Toufik Benjaa 4787bc7553 [FIX] reports: Remove dead code for non qweb reports 2018-03-22 15:33:18 +01:00
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