Commit Graph
103218 Commits
Author SHA1 Message Date
Nicolas Martinelli e9ed86c177 [FIX] account: terminology
'Write-Off' is not an appropriate label when the payment is reconciled.
A write off (aka. bad debt) is when I emitted an invoice, delivered a
service, and never got paid for it entirely.

opw-672716
2016-04-22 08:18:28 +02:00
Denis Ledoux 28e0a1771c [FIX] ir_qweb: regression of 8395f0d217
This revision corrects a regression introduced by
8395f0d217:
the possibility to call
`ir.qweb.field.datetime`.`value_to_html` with
a datetime string directly, instead of calling
`ir.qweb.field.datetime`.`record_to_html`
(which call `value_to_html` as well).

opw-675427
2016-04-21 18:35:25 +02:00
Denis Ledoux 8395f0d217 [FIX] website_event: event dates within event timezone
The dates of an event on the website was always
within the user timezone. If not signed in,
it was within the public user timezone
(which is quite not user-friendly to change)

For this purpose, we weed get the context
from the record (the context used when using
`record.with_context`), and therefore
the QWeb field
`ir.qweb.field.datetime` is slightly altered,
to use the context from the record.

opw-675427
2016-04-21 17:52:36 +02:00
Olivier Dony 74d8cbc190 [FIX] mail: fix bounce email addressing
- The "From" should not be the administrator user but
  the postmaster/system, and should be an address that
  ignores double-bounces. Using the default bounce
  email accomplishes both.

- The "To" recipient should be the "envelope from"
  sender when available, usually as provided by
  the "Return-Path" header set by the upstream MTA.
  If not present, fall back to the "From" of
  the original email.

- adapt tests to verify the behavior wrt Return-Path
2016-04-21 17:26:45 +02:00
Fabien Pinckaers 3f43d3056b [FIX] hr_expense: expenses paid by the company should be posted on bank journal
opw-674409
2016-04-21 16:31:25 +02:00
Raphael Collet 9fba75bd54 [FIX] web_editor: save translation values as HTML or XML fragment
The translation value is given as an HTML fragment.  It is converted to a valid
XML fragment if the translation's field requires it.
2016-04-21 16:14:34 +02:00
Goffin Simon 7f05692cb9 [FIX] account_asset: compute depreciation board
From af61494
Allow to compute the depreciation when the asset is in state: draft
2016-04-21 16:12:32 +02:00
Nicolas Martinelli 3b19fa426b [FIX] web_kanban: long names un header
When the stage name is too long, the column header is messed up: the
'Settings' and the 'Quick Add' icons are located outside of the column.

The fix is to truncate stage names when they are too long.

opw-672710
2016-04-21 15:38:16 +02:00
Denis Ledoux 70494d894e [FIX] account: Dashboard invoices refunds link
When clicking on the "Refunds" link of a
Sale / Purchase invoices journal,
creating a new invoice did not create
a new refund invoice, but a normal invoice.

opw-675408
2016-04-21 15:28:54 +02:00
Denis Ledoux db699e86b4 [FIX] mail: Missing translation Send a message to the group
The above string was not translated, when creating a new
discussion group, in the group message input placeholder.

opw-673712
2016-04-21 14:16:40 +02:00
Nicolas Martinelli d951a7d5ee [FIX] stock_account: stock history view
The stock history doesn't take into account internal moves. For example,
in the following situation:
- Receive 1000 products to Internal Warehouse 1
- Move these 1000 products to Internal Warehouse 2

The 1000 products are still recorded on the Internal Warehouse 1.

opw-672277
2016-04-21 11:24:49 +02:00
Denis Ledoux 9dd373d132 [FIX] calendar: Partial revert of b7e393a71a
The above revision allow to edit an event with a start date
greater than the stop date.

This issue was solved by the revision
6c78541978
that the above revision reverts.

The reason why the constraint on
`event.start` and `event.stop` was replaced
by a constraint on
`event.start_datetime` and `event.stop_datetime`
and
`event.start_date` and `event.stop_date` are explained
in 6c78541978:
Basically, `start` and `stop` are computed fields,
that are not recomputed in time, before the constraint is checked.

Besides, the revision b7e393a71a
re-set the constraint on `start` and `stop`, but forget
to replace the fields in the constraint definition:
```
(_check_closing_date, 'Error ! End date cannot be set before start date.',
['start_datetime', 'stop_datetime', 'start_date', 'stop_date'])
```

opw-673297
2016-04-21 11:06:46 +02:00
pvy a3a8bfb060 [ADD] l10n_fr: added tags to differentiate Salaires from Charges Sociales 2016-04-21 10:39:11 +02:00
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 e21de5013d [FIX] membership: update membership state daily
This is a complement to commit 6d4a78a2a. The 'invoiced' status should
be removed automatically once the membership is expired.

opw-672259
2016-04-21 08:29:58 +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
oihane 630f3d566f [FIX] hr_timesheet_invoice: fully qualify grouped fields in SQL view
Avoids name collisions when custom columns are involved.

Closes #11743
2016-04-20 16:13:13 +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
Denis Ledoux e1a17b433d [FIX] audittrail: prevent loop between models having *2m between each other
When setting rules on models having o2m/m2m relationship
between each other
e.g.
- `res.partner`:
  o2m `sale_order_ids` to `sale.order`
- `sale.order`
  o2m `message_follower_ids` to `res.partner`

an infinite loop could occur if records
of these models referenced records of the
other models in their o2m relationships
e.g.
 - `res.partner` ID 68:
   `sale.order` ID 9 in its `sale_order_ids`
 - `sale.order` ID 9:
   `res.partner` ID 68 in its `message_partner_ids`

This revision solves this use case, by passing the already
treated records in the context and checking that the records
haven't yet be treated before making the recursive call.

This revision makes sure to not break the API of methods
`get_data_context` and `prepare_audittrail_log_line`
(a new parameter had to be introduced for the above purpose)

opw-670904
2016-04-19 16:56:20 +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