Commit Graph
101372 Commits
Author SHA1 Message Date
javcasas c225c78a3a [CLA] signature for Javier Casas
Closes #11329
2016-04-20 08:52:24 +02:00
Cyril Gaudin 1bb2371746 [CLA] add cyrilgdn to camptocamp signature
Closes #11711
2016-04-20 08:50:20 +02:00
Cody K ae594be594 [CLA] individual signature for tesserb
Closes #11745
2016-04-20 08:48:44 +02:00
Yenthe 2a40c72ac1 [CLA] signature for Van Roey corporate agreement
This is the corporate agreement for Van Roey.

Closes #11653
2016-04-20 08:47:20 +02:00
Denis Ledoux 999b2c7e32 [FIX] mrp: expected date of the manufactured product move
This revision is related to eafebcb308

According to the `stock.move` fields definition:
`date` is the "scheduled date until move is done, then date of actual move processing"
`date_expected` is the "Scheduled date for the processing of this move"

The scheduled date of the product being produced in a
manufacturing order is the same scheduled date than written
on the manufacturing order.

opw-674237
2016-04-19 18:25:13 +02:00
Richard Mathot cd13ea9935 [FIX] mail: race condition in mail composer
When an user sends an email from the chatter then quickly switch to
another record, it may happen that this.composer is already destroyed.

We prevent to display a traceback with this fix.
2016-04-19 17:01:44 +02:00
fossoult 17d0117edc [FIX] web: expose list view Column widget
The list view Column widget should be exposed, so it can be extended.
This is required to allow the creation of other kind of list widgets.
The _format method is not extendable if we don't add this line.

(comment from ged) The file list_view.js should be split in two, and
reorganized, but this should not be done in 9.0.
2016-04-19 16:14:28 +02:00
Denis Ledoux 7bde7b9016 [FIX] mail: message_post requires record write access
By default, users are supposed to be able to write messages
in threads only if they have the write access on the record.

This behavior is the behavior defined in Odoo 8.0.

This behavior can be changed by defining
`_mail_post_access` on the model,
to allow the creation of new messages
if the user has only the read access, for instance.

This is the case on `project.issue`, for instance.

Since 9.0, @ revision 88b8cd0587,
this behavior was broken: Any users having the read
access on the record was allowed to write messages in the thread,
while this should not be the case, except if
`_mail_post_access = 'read'`
has been defined on the model.

This is because the SQL query which is performed in order
to know the thread messages the user has been notified of
was expected to return only the ids of the notified message,
while it actually always returned all the message ids of the thread,
because of the LEFT JOINS, e.g.

```
LEFT JOIN "mail_message_res_partner_rel" partner_rel
ON partner_rel.mail_message_id = m.id AND partner_rel.res_partner_id = (%%s)
```

Instead of just checking the ids of the messages returned by this
query, it must check that one of the two columns
`partner_rel.res_partner_id` or `channel_partner.partner_id`
is filled, meaning the partner has been notified of the message or
is a member of the channel the message has been posted to.

opw-668589
2016-04-19 15:16:32 +02:00
qdp-odoo 1df72cb01b [FIX] account: fixed query_get() when a domain is passed as argument (safe_eval must receive a string) 2016-04-19 14:26:44 +02:00
Joren Van Onder e18660c330 [FIX] web: fix iOS file downloading
e8a00bc50d moved the get_file function
from web.session to web.ajax. The issue is that get_file uses
session.url() for iOS devices. Also, in order to prevent an infinite
spinner options.complete() is called before actually opening up the new
window. Although this resolves the issue it still requires the user to
configure Safari to allow pop-ups, otherwise they are silently ignored.

opw-672882
2016-04-19 13:26:01 +02:00
Christophe Simonis 7c04420802 [MERGE] forward port of branch saas-6 up to 7033a97 2016-04-19 12:48:58 +02:00
Christophe Simonis 7033a97f77 Revert "[FIX] web: fix layout issue in Chrome 50"
This reverts commit f992c8ee19 which
should not be forward-ported.
2016-04-19 11:44:48 +02:00
Christophe Simonis 76d1116a25 [MERGE] forward port of branch 8.0 up to 9fa53b7 2016-04-19 11:33:17 +02:00
Nicolas Martinelli a4fbaaa776 [FIX] sale_timesheet: fix traceback in write
When calling `write` with more than one id, `_get_timesheet_cost`
generates a traceback since it uses `self.is_timesheet`.
2016-04-19 10:25:41 +02:00
Joren Van Onder 4ff34a98bc [FIX] point_of_sale: adapt to Chrome 50's new handling of cell heights
Forward-port of saas-6 77dae4c9c5.

Chrome 50 treats percent-height divs inside of auto-height cells as
auto [1]. So from now on it's important that an explicit 'height: 100%' CSS
property is set on parent tds, otherwise you'll end up with elements
with a height of 0.

An extra difficulty is that this new height property on
subwindow-container will result in the element being as high as his
parent table. So the collapsed trick doesn't work anymore in the
customer list.

This has to be done conditionally. The proposed workaround of adding
100% height to parents of affected elements causes issues in IE/Edge
because the effect of adding a height in percent to a table-{cell,row}
element is not defined by CSS [2].

[1] https://chromium.googlesource.com/chromium/src/+/8876584335b48c99cf8df552ef4d8efebb131041
[2] http://stackoverflow.com/a/27384730
2016-04-19 09:49:54 +02:00
Joren Van Onder 77dae4c9c5 [FIX] point_of_sale: adapt to Chrome 50's new handling of cell heights
Forward-port of v8 9fa53b7ee7.

Chrome 50 treats percent-height divs inside of auto-height cells as
auto [1]. So from now on it's important that an explicit 'height: 100%' CSS
property is set on parent tds, otherwise you'll end up with elements
with a height of 0.

An extra difficulty is that this new height property on
subwindow-container will result in the element being as high as his
parent table. So the collapsed trick doesn't work anymore in the
customer list.

This has to be done conditionally. The proposed workaround of adding
100% height to parents of affected elements causes issues in IE/Edge
because the effect of adding a height in percent to a table-{cell,row}
element is not defined by CSS [2].

DO NOT FORWARD-PORT!

[1] https://chromium.googlesource.com/chromium/src/+/8876584335b48c99cf8df552ef4d8efebb131041
[2] http://stackoverflow.com/a/27384730
2016-04-19 09:01:32 +02:00
Joren Van Onder 9fa53b7ee7 [FIX] point_of_sale: adapt to Chrome 50's new handling of cell heights
Chrome 50 treats percent-height divs inside of auto-height cells as
auto [1]. So from now on it's important that an explicit 'height: 100%' CSS
property is set on parent tds, otherwise you'll end up with elements
with a height of 0.

An extra difficulty is that this new height property on
subwindow-container will result in the element being as high as his
parent table. So the collapsed trick doesn't work anymore in the
customer list.

This has to be done conditionally. The proposed workaround of adding
100% height to parents of affected elements causes issues in IE/Edge
because the effect of adding a height in percent to a table-{cell,row}
element is not defined by CSS [2].

DO NOT FORWARD-PORT!

[1] https://chromium.googlesource.com/chromium/src/+/8876584335b48c99cf8df552ef4d8efebb131041
[2] http://stackoverflow.com/a/27384730
2016-04-19 08:53:10 +02:00
Goffin Simon 6057e645d6 [FIX] purchase: Shipping exception when cancelling a PO
When canceling and clicking on "reset to draft" button a PO with
invoicing method = Based on generated draft invoice, the purchase
workflow led to a shipping exception.

To be in state done the PO must have:

All its PO lines invoiced with _set_po_lines_invoiced
All its incoming shipments done with test_moves_done

opw:673561
2016-04-19 08:47:22 +02:00
Denis Ledoux 237a0b6160 [FIX] account: translate-able label on invoices
Provide the possibility for the taxes
label on invoices to be translated.

In other words,
to give the possibility for the taxes labels
in the invoice report to be translated in the invoice
lines
(e.g. 21% VAT in English, 21% BTW in Dutch,
in the invoice lines)

opw-675038
2016-04-18 15:59:33 +02:00
Denis Ledoux 6c7a88d74c [FIX] account: translate tax description in partner lang
The tax description in the taxes lines
(e.g. in invoices) is supposed
to be translated in the customer/supplier language,
as this is what is displayed in the printed reports
sent to the customer.

This is the behavior in place in Odoo 7.0 & 8.0.
(e.g. in invoices)

opw-675038
2016-04-18 15:59:33 +02:00
Simon Lejeune f992c8ee19 [FIX] web: fix layout issue in Chrome 50
A 100% height is not distributed anymore to the children of a table-row
if they are not themselves table-cell in Chrome 50. This breaks the
indenpendent scrolling of the menu and the view manager.

However, setting the `table-cell` display breaks the layout in Internet
Explorer.

When the webclient is loaded by Chrome 50, we load a stylesheet
forcing a `table-cell` for display.

Seems to be related to https://bugs.chromium.org/p/chromium/issues/detail?id=353580
and https://chromium.googlesource.com/chromium/src.git/+/8876584335b48c99cf8df552ef4d8efebb131041

Related to e1a99192bd
Fixes #11629
2016-04-18 14:43:50 +02:00
Martin Trigaux 60ce1bf915 [FIX] website_quote: missing terms in .pot 2016-04-18 14:37:54 +02:00
Martin Trigaux 34040e733b [IMP] doc: use _name format, not external ID in example
Not clear which format act_windows expects.
2016-04-18 11:47:44 +02:00
Martin Trigaux 171f884bdc [FIX] doc: deprecated statusbar_color
Can still be mentionned in documentation but should not be used in example.
2016-04-18 11:47:43 +02:00
Martin Trigaux fe7d5263a5 [IMP] doc: link to bootstrap alerts
Only muted class is missing
2016-04-18 11:47:43 +02:00
Martin Trigaux 9146c07900 [IMP] doc: deprecated is for reference, not tutorial 2016-04-18 11:47:42 +02:00
Martin Trigaux 451483cb61 [FIX] doc: missing closing tag
Some people love copy-paste
2016-04-18 11:47:42 +02:00
Martin Trigaux 199cd2b614 [FIX] doc: no session model so far
Implemented in the next excercice, no need to mention it here.
2016-04-18 11:47:41 +02:00
Nicolas Martinelli 6bf4dea058 [FIX] account: show due date
The "Due Date" is invisible in the tree view because in most cases, the
`journal_type` is not in the context. Since it was shown all the time in
v8, we show as well.

opw-674815
2016-04-18 10:36:33 +02:00
Nicolas Martinelli db0def38cc [FIX] account: delete attachment
When an invoice is cancelled, the attachments (including the printed
invoice) are not deleted. If the users resets the invoice to draft,
modify it, then print it again, the previously generated document will
be used instead.

opw-674678
2016-04-18 10:01:26 +02:00
qdp-odoo 9aa8a212d3 [FIX] account: pdf report of general ledger was including the first day of range in the initial balance. PR #11316 2016-04-18 09:51:25 +02:00
Odoo Translation Bot f4d79a2b8e [I18N] Update translation terms from Transifex 2016-04-17 00:31:25 +02:00
Jeremy Kersten 8aee655825 [FIX] web: don't display view metadata for new record
Close #11584
2016-04-15 17:07:29 +02:00
Denis Ledoux 37edd22b4c [FIX] account_voucher: Purchase receipt bill date twice in the view
The `account.voucher` field `date` was twice in the view
`view_purchase_receipt_form`

Besides the fact the field was twice in the view,
this prevented to set a date in the past
for the resulting journal entries,
as the second field `date` input of the view
contained the date of today, while
only the first one was visible and editable
by the user, and it was the second field
value which was took into account when
passing the form values to the server,
most-likely because this second field was set
further in the view.

opw-674712
2016-04-15 16:19:15 +02:00
Denis Ledoux cbc0dace38 [FIX] account: currency round amounts for exchange rate difference
The method `create_exchange_rate_entry` is called
either if one of the two parameter
`amount_diff` or `diff_in_currency` is not equal to 0.0
(or, near to zero, `float_is_zero`):

```
if currency and aml_to_balance \
and (float_is_zero(total_amount_currency, precision_rounding=currency.rounding) \
or float_compare(total_debit, total_credit, precision_rounding=currency.rounding) == 0):
```

Nevertheless, the method is called with the amounts not rounded,
and, therefore, one could be considered to 0.0 (if
closed to 0.0) but not be exactly equal to 0.00,
and it should therefore be rounded before the entries
creation.

opw-673854
2016-04-15 15:47:10 +02:00
qdp-odoo c538bedd53 [FIX] account: don't show amount_currency and currency_id fields in bank statement lines as it is confusing some people 2016-04-15 14:47:56 +02:00
Simon Lejeune e1a99192bd Revert "[FIX] web: fix layout issue in Chrome 50"
or how to break every internet explorer releases while
attempting to fix chrome 50
2016-04-15 12:12:26 +02:00
Olivier Dony 9a0124591b [MERGE] Forward-port 7.0 up to 605b94e64c 2016-04-15 11:54:38 +02:00
Géry Debongnie 9b54b042a0 [FIX] web_kanban: correct count for dataset size
In non grouped mode, a recent fix (fixing race condition in do_search)
introduced a new bug, the dataset size is not correctly set.

This is a quick and dirty fix, I believe that changing the dataset
internals like this commit (and other) do is really not correct.
However, the correct fix (working on the dataset API) is more dangerous
in a stable release.
2016-04-15 11:47:49 +02:00
Olivier Dony 605b94e64c [FIX] point_of_sale: do not hide transactional errors
Catching and hiding database transactional errors can
sometimes cause a POS order to be entirely lost.

When it occurs, the transaction won't be committed
into the database, and if there is only one order
in the batch, the server won't return any error to
the frontend POS which will consider the order saved.
2016-04-15 10:03:55 +02:00
Olivier Dony 1d25fe1e05 [FIX] qweb: escape alt-field properly in image widget
This is very unlikely to be exploitable because the
alt-field usually comes from master data (e.g. product
names) that can't be injected.

Courtesy of Naglis Jonaitis
2016-04-15 09:51:19 +02:00
Goffin Simon dc3f1e2211 [FIX] account_analytic_analysis: comment field in account.invoice
When creating an invoice from a contract with button "create invoices",
the description linked to the contract has to written in the comment field
of the invoice.

opw:671660
2016-04-14 16:32:24 +02:00
Simon Lejeune 00ead29c7c [FIX] web: fix layout issue in Chrome 50
The height was not distributed anymore to the children of a `table-row`
element if they are not themselves `table-cell` elements.

Fixes #11629
2016-04-14 14:31:12 +02:00
Raphael Collet 053a4ab444 [FIX] doc: fix rst indentation 2016-04-14 14:20:19 +02:00
Nicolas Martinelli 7ab2d0e647 [FIX] sale_stock: unit price rounding
Rounding the unit price at that moment is a bad idea. Here is the use
case:
- Set the product 'Costing Method' to 'Real Price'
- Set the product 'Inventory Valuation' to 'Perpetual'
- Receive through a PO 9 products for a unit price of 115.80
- Receive through a PO 35 products for a unit price of 116.80
- Sell these 44 products thanks to a SO, generate and validate the
  invoice

On the Stock Output Account, the following entries will be generated:
- First PO --> 1042.20  = 9  * 115.80
- Second PO --> 4088.00 = 35 * 116.80
- Invoice --> 5130.22   = 44 * 116.596

116.596 is the average price of the two POs, but rounded. The issue is
that there are 2 cents of difference... Nice ;-)

The fix is to avoid the rounding of the unit price, since we don't even
store it on the account move line anyway.

opw-673976
2016-04-14 13:37:15 +02:00
Joren Van Onder 967629f8ac [IMP] point_of_sale: release POSBox image v14
Marks official support for the Raspberry Pi 3.
2016-04-14 11:24:48 +02:00
Joren Van Onder f5a527fb0a [IMP] point_of_sale: move POSBox AP to a less used subnet
When the POSBox boots without a network cable attached it will
automatically launch a wireless AP that people can connect to. This
allows them to configure what wireless network the POSBox should connect
to.

This wireless AP was configured to use the 10.10.0.0/24 subnet. The AP
itself was on 10.10.0.1. Although this is fine if used as intended it is
a quick way to take down an existing network if you where to plug in an
ethernet cable after the wireless AP has started. 10.10.0.1 is commonly
used by routers all over the world and plugging in a booted POSBox into
their networks will cause serious issues because the POSBox will share
the same IP as the router.

This moves the POSBox AP to the 10.11.12.0/24 subnet, with the AP on
10.11.12.1.

This also makes the DHCP server listen only on wlan0 because otherwise
you can end up with two DHCP servers on the same network which would
still break stuff.
2016-04-14 11:24:48 +02:00
Joren Van Onder fd43faac16 [IMP] point_of_sale: redirect POSBox image init script output to file
Useful when updates to the initialization scripts don't go as
planned. This leaves something to inspect.

The initialization script already automatically stops (because of 'set
-o errexit') but it was a bit tricky to actually see what went wrong
because scrollback in QEMU isn't great.
2016-04-14 11:24:48 +02:00
Joren Van Onder 5af1c085bf [IMP] point_of_sale: migrate POSBox to Raspbian Jessie
The main reason for doing this is supporting the new Raspberry Pi 3. No
functional changes where made.

For Raspbian Wheezy we used to download the full image and strip it as
best we could to obtain a reasonable image size for people to
download. Since Raspbian Jessie the Raspberry Pi Foundation has started
releasing an official minimal image (Raspbian Jessie Lite) which we will
use from now on to build our image. One downside of this is that the
minimal image is a 1.3 GiB image which is too small for our
purposes so it has to be resized.

Because Raspbian Jessie migrated to systemd we cannot rely on
/etc/init.d/rcS to set up the ramdisks anymore. Jessie provides a
compatibility layer so old SysVinit scripts still work but rcS does not
block like it does in a SysVinit system, it is run in parallel with
other startup services. In our case this is a bad thing as setting up
the ramdisks has to be done before any other services are started. To
accomplish this the rcS hack has been migrated to a systemd service
running before basic.target and with DefaultDependencies=no. This has a
similar effect as the rcS hack because normal systemd services (with
DefaultDependencies=yes) all require basic.target by default.
2016-04-14 11:24:48 +02:00
Nicolas Martinelli 3705a868d1 [FIX] web: consistency between list and export
Following commit 8276fb585, the data exported should match the data
displayed on the list view. Therefore, we need to make sure that the
context used match the context of the list view.

When a filter is applied in the list view, the context is evaluated
thanks to pyeval (see the call to `/web/dataset/search_read`). The fix
is to evaluate the context in a similar way.

opw-674473
2016-04-14 10:44:25 +02:00