Commit Graph
117975 Commits
Author SHA1 Message Date
Olivier Colson ee281168e3 [FIX] account: substract total amount of credit notes in the counts reported on dashboard
The refactoring made for v11 at commit 414ea47fd5 summed the amounts of every invoice, credit note or not. This lead to wrong amounts in dashboard, as credit notes have positive total amounts, just like regular invoices.

(Fixes this ticket: https://www.odoo.com/web#id=1828003&view_type=form&model=project.task&action=333&active_id=49&menu_id=4720)
2018-03-26 13:32:52 +02:00
Christophe Simonis b07edf605b [MERGE] forward port branch 9.0 up to f36f1ceccf 2018-03-26 12:21:57 +02:00
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
Thibault Delavallée f2e4ef741b [FIX] test_mail: update counter due to random additional query sometimes appearing 2018-03-23 17:33:48 +01:00
Romain Derie 1f5c61477f [IMP] website_sale: make it more clear when a product is unpublished
This commit attempts to make it more obvious when a product is not published.

task-44005
Closes #23741
2018-03-23 17:03:56 +01:00
Romain Derie b98b5e4d8b [FIX] sale: dead code (order state) from v8
Commit 94716a3 refactored 'sale.order' state selection in Odoo 9.0 but
the portal still used some deleted state values.

Closes #11164
2018-03-23 16:11:47 +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
Romain Derie f8b05f52f5 [FIX] website_portal(_sale), base: prevent VAT edition if user has SO/invoices
This commit prevent VAT and company name edition if an user has already at
least one document (SO or invoice) for his partner or his related company
partner.
Any module can override this feature to add their own condition to prevent
campany name/VAT edition.

task-33088
Closes #23420
2018-03-23 14:47:16 +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
David Arnold 26dafadf77 [REF] base: remove localhost mailserver data
localhost mailserver effectively blocks the server wide smtp setting and
almost never is a sensible default in any kind of deployment.

If you just deploy an instance with smtp setting, so that you can start
inviting users without caring about mail integration so far, then this
setting does produce unexpected and awkward results.

Closes #22790 and task ID 1830779.
2018-03-23 11:26:50 +01:00
dip-odoo 82d5bb4504 [FIX] point_of_sale: fix the problem when download the invoice.
- In pos payment page when we select invoice download option and validate payment that moment traceback occured.
     because in _match_payment_to_invoice method when we find account_precision do not find pricelist recored.
2018-03-23 10:41:10 +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
Christophe Simonis 845f4ef7d3 [MERGE] forward port branch saas-11.2 up to 8a7b845353 2018-03-23 10:31:00 +01:00
Christophe Simonis 8a7b845353 [FIX] web: correct forward-port of ef540eb006
Adapt tests and classes
2018-03-23 09:46:46 +01:00
Aaron Bohy 2a6ff8f8e4 [IMP] web: ActionManager: load window actions without id
Actions can be loaded from the state of the url (e.g. when pressing
F5). For window actions, it was working properly if the action id
or a record id (i.e. for form views) was given. In other words,
states like 'model=res.partner&view_type=kanban' couldn't be
loaded.

This can be explained by the fact that without an action id, the
context and domain of the action couldn't be obtained.

This rev. solves this problem by storing the current action into
the sessionStorage, so that important information like context,
domain and name can be retrieved if this action has to be restored
(i.e. if the user refreshes the page).
2018-03-23 09:02:49 +01:00
Aaron Bohy ee0605f405 [IMP] web: add sessionStorage service
This rev. adds the 'sessionStorage' service, allowing to write and
read stuff in/from the sessionStorage (with a compatibility layer
to handle the case where the sessionStorage can't be used, e.g.
private browsing in Safari, like it is already done for the
localStorage).

This new service is necessary for the ActionManager to store the
current action, so that it can be fully restored on F5 (this comes
with the next commit).
2018-03-23 09:02:03 +01:00
Christophe Simonis cdbee48888 [MERGE] forward port branch 11.0 up to 39d9c362c5 2018-03-22 20:05:14 +01:00
Toufik Benjaa 2a53338649 [FIX] test_mail: Update query count 2018-03-22 18:46:34 +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
Toufik Benjaa aeeb21128a [FIX] test_mail: Update query count 2018-03-22 17:52:39 +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
Martin Trigaux 7d86bdca21 [I18N] *: export source terms of saas-11.2 2018-03-22 15:19:07 +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
Jaykishan Solanki 55a7ac412b [FIX] purchase_requisition: multicurrency
When creating the supplier info record from a blanket order, do pass
the `currency_id` field.

task 1814507
2018-03-22 14:21:31 +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
Olivier Colson 13899ca39d [FIX] account: correct signature of reconciliation method
This bug had been introduced by the last refactoring of the reconciliation widget, it's just a renaming error.
2018-03-22 13:03:43 +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
Laurent Smet 7859dee4fc [FIX] account: fix payment_difference computation
Bug introduced by https://github.com/odoo/odoo/commit/cdca5d4751a979f6b694f02d88160843f81a77f5

There is two problems:
- The payment difference is the difference between what you need to pay and what you pay.
=> The compute does the opposite.
- When the payment type is outbound, the payment amount is never negative.
=> Need to inverse the payment amount in the compute in this case.

E.G.

Suppose A a customer invoice of 25 and B a vendor bill of 50:

Payment on A will compute:
payment_type = 'inbound'
amount = 25

If you pay 20, the payment_difference computed was 20 - 25 = -5
It should be 25 - 20 = 5 instead.

Payment on B will compute:
payment_type = 'outbound'
amount = 50 (not -50!)

If you pay 40, the payment difference computed was 40 - (-50) = 10
It should be -50 - (-40) = -10 instead.
2018-03-22 11:01:20 +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