Commit Graph
101401 Commits
Author SHA1 Message Date
Goffin Simon 0287c1e1b3 [FIX] account_asset: deferred_revenue_category_id and asset_category_id
When creating an customer invoice with a product linked to a deferred revenue
category, the account used in the invoice line must be the account_asset_id.

When creating an vendor bill with a product linked to an asset
category, the account used in the invoice line must be the account_depreciation_id.

opw:22157
2016-04-21 10:21:27 +02:00
Nicolas Lempereur 8388b12b1e [FIX] l10n_fr_fec: fix unwanted NULL values
An account.move.line could be not linked to a partner.

opw-675586
2016-04-21 09:35:12 +02:00
Nicolas Martinelli c486d9973d [FIX] account: partner in compute_all
The method `compute_all` in new api expects a browse record, not an id.

opw-675428
2016-04-21 08:23:33 +02:00
Nicolas Martinelli 6a473e4565 [FIX] stock_landed_costs: fix the fix of the tests
Commit 6339bae87 fixes the tests, but now the tests are not testing
what should be tested ;-)
2016-04-20 20:02:35 +02:00
Christophe Simonis 6339bae875 [FIX] stock_landed_costs: correct rounding tests
Previous forward-port (17b6191a02) includes
new tests (added by eb26694e0f) which are
now broken because quants with a cost of zero are forbidden.

Force a standard_price on created product to avoid this situation.
Adapt quants cost values.

Also change references of accounts and journals on records.
2016-04-20 19:17:34 +02:00
Géry Debongnie ab8a93c852 [FIX] web: fix dataset to avoid race conditions
The read_slice method in dataset is problematic, because it alters the
dataset ids.  So, if 2 consecutive read_slice are started, but the first
one ends after the second one, we don't have the correct ids in the
dataset.

This commit just make sure that previous read_slice do not alter the ids
of the next read_slice.
2016-04-20 17:20:25 +02:00
Géry Debongnie b893342007 [REV] web_kanban: reverts 9b54b04 and 6859c8da
These 2 commits in kanban view fixed 1 bug by introducing a few other
severe bugs. The tradeoff is not worth it, especially when it is
balanced again deleting some contacts in your database.
2016-04-20 17:20:25 +02:00
Denis Ledoux d57623023b [FIX] website_form: handle date & datetime
Adding date & datetime inputs in the website
form builder couldn't work, because
the posted values for these input
types were not treated at all,
and they were not in the format
the date/datetime were stored in database.

opw-672674
2016-04-20 16:19:25 +02:00
Christophe Simonis 17b6191a02 [MERGE] forward port of branch saas-6 up to ff3a731 2016-04-20 16:06:57 +02:00
Christophe Simonis ff3a73195e [MERGE] forward port of branch 8.0 up to b112631 2016-04-20 15:17:55 +02:00
Christophe Simonis a255a6f6a4 [MERGE] forward port of branch 8.0 up to eb26694 2016-04-20 15:15:47 +02:00
Nicolas Martinelli b112631bef [FIX] stock_landed_costs: precision
Oversight of commit bd025cda.
I'm an idiot, I should have checked that another solution was applied
from 9.0 with accounting refactoring. We apply it here as well.
2016-04-20 14:05:32 +02:00
Nicolas Martinelli eb26694e0f [FIX] stock_landed_costs: account/valuation inconsistencies
When stock landed costs are divided per product unit, inconsistencies
may arise between the real stock valuation and the stock valuation
account. This is likely to happen when several products are bought, but
these products leave the stock one at a time.

A numerical example is the following: a landed cost of 15.00 is applied
to a purchase of 13 units. An amount of 15.00 is recorded when the
products enter the stock. If the product leave the stock one at a time,
13 entries of 1.15 are recorded (15.00/13 = 1.153846... ≈ 1.15), which
is then equal to 13 * 1.15 = 14.95. In this case, All the products have
left the stock (stock valuation is zero), but 5 cents remain on the
account.

This is of course even worse the higher the ratio is. For example, a
landed cost of 4.00 split into 1000 units sold piece by piece will never
be recorded when a product leaves the stock.

The fix is to record the rounding difference on a specific quant. In the
previous example, instead of adding 1.153846... on the unit cost of the
13 units, we do the following:
- 12 units to which we add 1.15 on unit cost
- 1 unit to which we add 1.20 on unit cost

opw-675222
2016-04-20 13:09:25 +02:00
Nicolas Martinelli 262d98bb69 [FIX] stock_account: account/valuation inconsistencies
When the product price is divided per product unit, inconsistencies
may arise between the real stock valuation and the stock valuation
account. This is likely to happen when a product is bought in a UoM
different from the standard UoM of the product.

A numerical example is the following: a box of 13 is bought for 15.00.
An amount of 15.00 is recorded when the products enter the stock. If the
product leave the stock one at a time, 13 entries of 1.15 are recorded
(15.00/13 = 1.153846... ≈ 1.15), which is then equal to
13 * 1.15 = 14.95. In this case, All the products have left the stock
(stock valuation is zero), but 5 cents remain on the account.

This is of course even worse the higher the ratio is. For example, a
box of 4.00 split into 1000 units sold piece by piece will never be
recorded when a product leaves the stock.

The fix is to record the rounding difference on a specific quant. In the
previous example, instead of adding 1.153846... on the unit cost of the
13 units, we do the following:
- 12 units to which we add 1.15 on unit cost
- 1 unit to which we add 1.20 on unit cost

opw-675222
2016-04-20 13:09:25 +02:00
Nicolas Martinelli bd025cda6a [FIX] stock_landed_costs: former_cost_per_unit precision
The precision of `former_cost_per_unit` should not be set. Indeed, a
stock move can contain several quants with different unit prices.
Therefore, we should not round the field when stored, otherwise the
difference per unit will not be calculated correctly.

This is a workaround since we cannot change the DB structure in stable.

opw-675222
2016-04-20 13:09:24 +02:00
Nicolas Martinelli 85fd972149 [FIX] stock_landed_costs: use correct UoM
Use the normalized quantity, otherwise the amount per unit is wrongly
calculated.
2016-04-20 13:09:24 +02:00
Goffin Simon 6f5acf6001 [FIX] account, l10n_generic_coa, l10n_th: U.S. CoA Misconfigured
Translation.

opw:674632
2016-04-20 12:08:04 +02:00
Goffin Simon b8e73c248e [FIX] l10n_generic_coa:
The Cost of Good Sold should be of type "Direct Costs

opw:674632
2016-04-20 12:08:03 +02:00
Olivier Dony fc2aa73606 [FIX] web: fix db manager layout in Chrome 50
Complement of f992c8ee19,
to be reverted in saas-6+ and in 8.0 when Chrome's
fix reaches the stable Chrome channel.

Fixes #11629

See https://bugs.chromium.org/p/chromium/issues/detail?id=603507
2016-04-20 11:42:03 +02:00
Joren Van Onder d043fd03ce [FIX] point_of_sale: display correct uom on weighable products
Everything's displayed fine on orderlines with weighable products, this
only affected the small blue labels on the products.

opw-674264
2016-04-20 11:09:07 +02:00
Denis Ledoux 5c47651306 [FIX] sale: allow to import quotations without lines description
When importing a quotation,
if the lines `name`, `price_unit`, `product_uom` or `tax_id`
are not specified, but the product is,
retrieve them from the product `on_change`

This was the case in Odoo 8.0,
it was done as well in the override `create` method
of `sale.order.line`

opw-675434
2016-04-20 11:03:00 +02:00
Denis Ledoux 21ccf2fe1c [FIX] stock: remove spaces surrounding the / in locations complete name
The location name get is computed as:
`parent.name + '/' + child.name`

While, the complete was computed as:
`parent.name + ' / ' + child.name`

This leaded to an obvious inconsistency.

Besides, this prevented to use the `location`
filter in the search of the products list to
know the quantity available of products for
a specifc location, as the domain used
to retrieve the locations is set as
`[('complete_name','ilike',context['location'])]`

`context['location']` containing the content of the `name_get`
(No spaces surrounding `/`)
and
`complete_name` surrounding `/` with spaces.

opw-674378
2016-04-20 10:12:45 +02:00
Stephen Medina 92f1cbeb6f [FIX] server: support psutils >= 4.0
In version 3, process.memory_info() returns only rss and vms
In version 4, it now returns rss, vms, shared, text, lib, data and dirty
Automatic unpacking is no longer possible in 4.0

Fixes #11052, Closes #11459
2016-04-20 09:13:27 +02:00
Stephen Medina 58d99909ec [CLA] signature for stephen144
signature #11459
2016-04-20 09:13:27 +02:00
Eduardo Rodríguez Crespo 364e80f718 [CLA] signature for erocre
Closes #11639
2016-04-20 09:13:27 +02:00
Rubén bdfc75e613 [CLA] coprorate signature by bisneSmart
Closes #11312
2016-04-20 08:53:08 +02:00
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
Olivier Dony 7f6bd2dc66 [FIX] web: fix layout issue in Chrome 50 (again)
Makes the fix in f992c8ee19
specific to the view manager of the main oe_application
container, in order to avoid disrupting other view manager
occurrences (such as the ones in modal windows or x2many
list views).

Fixes #11629 (again)

Note: Hopefully the Blink team will fix Chrome so we can
get rid of this hack in the future:
  https://bugs.chromium.org/p/chromium/issues/detail?id=603507
2016-04-19 17:44:24 +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
Stefan Rijnhart 04765d4917 [FIX] hw_escpos: RBG images do not necessarily have an alpha channel 2016-04-19 15:34:45 +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
Goffin Simon cb5d41da3b [FIX] account_asset: asset_create
When creating assets from invoice lines, the system must check
that assets have not already been created for the related invoice.
If assets already exist then these assets have to be removed.

Used case:

- In the purchase journal, tick "allow canceling entries"
- On a supplier invoice line, set an asset category
- validate the invoice
- cancel the invoice
- set to draft
- validate the invoice

Before the fix: the asset was created twice.
After the fix: A warning is raised if an asset already exists for the invoice.

opw:674674
2016-04-19 11:27:34 +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