Commit Graph

236 Commits

Author SHA1 Message Date
Odoo Translation Bot fe3835faff [I18N] Update translation terms from Transifex 2015-07-05 01:52:32 +02:00
Josse Colpaert ce0027a6d0 [FIX] stock_account: In stock valuation report, if all products real price, don't do the product history price query 2015-07-02 14:10:03 +02:00
Denis Ledoux bdf980e4b4 [FIX] stock_account: stock valuation report without result
This is related to rev. 55b7f15ee2

Prevent crash when there is no line to display
in the stock valuation report
Reporting > Warehouse > Stock Valuation.

Like when there is not yet any data, or the filter gives no result

opw-643748
2015-07-01 15:59:51 +02:00
Denis Ledoux 279f225cf0 [IMP] mrp, stock, stock_account: compute stored fields trigger
This is a performance revision.

Some stored functions field were recomputed uselessly.

In mrp, `hour_total` and `cycle_total` were recomputed
at each write on `mrp.production`, while they should be recomputed
only when there is a change on the `workcenter_lines` field,
or when there is a change in the `hour` or `cycle` field
of these `workcenter_lines`.

In stock, `min_date`, `max_date` and `priority` of
`stock.picking` were recomputed each time a new move
was added to the picking,
wether or not the 'expected_date' of this move
was between the `stock.picking` `min_date` and `max_date`,
and the priority not greater.

In stock, `product_qty` of `stock.move` was recomputed
at each write on the `stock.move`, while it should be
recomputed only when there is a change in `product_id`,
`product_uom` or `product_uom_qty`, as the computation
method only depends on these three fields.

In stock_account, the `invoice_state` of `stock.picking`
was recomputed each time a new `stock.move` was associated
to the picking, wether or not the `invoice_state` of the move
was already the same than the `invoice_state` of the picking.

opw-643560
2015-06-30 13:12:37 +02:00
Odoo Translation Bot acc1b525fa [I18N] Update translation terms from Transifex 2015-06-29 08:42:08 +02:00
Denis Ledoux 55b7f15ee2 [FIX] stock_account: stock valuation report performances
Basically, computation of the `inventory_value` is now done
in batch instead of one by one.

In a real use case, the computation of the stock valuation
passed from 20+ minutes to less than a minute.

This revision contains an unusual SQL request:
`SELECT DISTINCT ON`
Basically, it returns the most recent line of table
product_price_history for each tuple
`(product_template_id, company_id)`
which is actually what we want, with good performances.

See postgresql doc for more information:
http://www.postgresql.org/docs/9.0/static/sql-select.html#SQL-DISTINCT

opw-641154
2015-06-15 16:28:13 +02:00
Goffin Simon 663e7bb531 [FIX] stock_account: refund
Invoices of type refund should be considered.
2015-06-11 13:16:45 +02:00
Goffin Simon fb57514cf0 [FIX]account_anglo_saxon: price unit of a move
The price unit of a move must be computed with the product_uom of
this move.

opw:640454
2015-06-09 09:30:54 +02:00
Odoo Translation Bot e2c9699cfc [I18N] Update translation terms from Transifex 2015-06-08 14:03:50 +02:00
Martin Trigaux 4528ccf148 [I18N] First sync of translations from Transifex
Translation is that which transforms everything so that nothing changes.
 -- Grass Günter
2015-05-29 21:58:20 +02:00
Olivier Dony 1cea0dc4e9 [I18N] Final sync + cleanup of Launchpad Translations, moving to Transifex
See https://github.com/odoo/odoo/wiki/Translations
2015-05-29 10:55:06 +02:00
Goffin Simon 1da3a8b353 [FIX] stock_account: description for extra moves
The extra moves must take into account the field description_sale or description_purchase and
the field default_code set on the product.

opw:640387
2015-05-28 13:59:11 +02:00
Denis Ledoux fff4215933 [FIX] stock_account: purchase and sale_refund are two different journal type
When creating an incoming shipment to be invoiced with as source location
"Transit"
and as destination location
"Stock"

Clicking on create invoice leaded to a crash.

opw-639536
2015-05-28 11:05:43 +02:00
Denis Ledoux 2ac4a3854b [FIX] stock_account: Create invoice journal type for transit.
This revision is related to 4fb497b653.

For a 'To be invoiced' delivery order with a move with
as source location 'Stock' and
as destination location 'Transit'

There is no way to know if it's a Customer invoice
that should be created or a Purchase Invoice.
Indeed, the transit could be used as an intermediate to ship
to the supplier, or to the customer

opw-639536
2015-05-27 13:55:43 +02:00
Goffin Simon 75b9932451 [FIX] stock_account: VAT for extra moves
If an extra move contains a product which is not initially in the order,
the taxes set on this product must be considered according to the fiscal position
of this order.

opw:634305
2015-05-27 09:03:18 +02:00
Denis Ledoux 4fb497b653 [FIX] stock_account: invoice journal type for transit locations
When using locations of 'transit' type in pickings,
the invoice journal type was always set to "Sales",
while, for instance, for an incoming shipment,
with as source location a transit location, the invoice
journal should obviously be purchase

opw-639536
2015-05-26 16:30:38 +02:00
Olivier Dony ebb5ddcd65 [I18N] Sync latest translations from Launchpad (not the final one) 2015-05-21 14:42:20 +02:00
Denis Ledoux a4c7c564cf [FIX] stock_account: average cost in multi-company environment
When receiving goods with average price set as costing method,
for a move from another company than the SUPERUSER_id company,
the average price updated was the one from the SUPERUSER company
instead of the one of the move.

opw-634167
2015-05-18 11:49:55 +02:00
Nicolas Martinelli 769fc81140 [FIX] stock_account: fix dependencies
Purchase and Sale are not part of the dependencies of stock_account, so purchase_line_id
and sale_line_id might not exist.

Fixes #6619
2015-05-13 12:51:18 +02:00
Josse Colpaert cf6d7479d5 [IMP] Stock valuation: Avoid consumables with real-time valuation
When the product is a consumable, avoid to use real-time valuation, by adapting
the onchange in the views and making the valuation field invisible when the
product is a consumable / service.
2015-05-12 09:53:20 +02:00
Nicolas Martinelli 8ab987d828 [FIX] stock_account: set the same unit price for extra moves than for moves linked to SO
When extra moves are created, the unit price of the invoice line for these extra moves is now the
same than the unit price of the moves generated from the SO.

opw-634227
2015-05-11 12:23:19 +02:00
Nicolas Martinelli 61a5bbfb21 [FIX] stock_account: add taxes to invoice when creating an invoice from delivery
Generating an invoice from a delivery now add the taxes to the invoice.
This impacts a returned purchase for which the invoice is created from the delivery, and a sale
order which is set to create invoice on delivery.
opw-634565
2015-05-11 08:26:14 +02:00
Goffin Simon c884be3be9 [FIX] stock_account: Current inventory valuation
The "Current inventory valuation" report should only take the outgoing quants into account
to compute the inventory value.

opw:632358
2015-05-04 08:46:33 +02:00
Olivier Dony 622e00baa5 [I18N] Sync 8.0 translations from Launchpad 2015-04-28 09:45:53 +02:00
Denis Ledoux b28bfcdb3a [FIX] stock_account: real-time inventory valuation with free goods
For a free purchase, the valuation amount fall-backed
to the product cost price instead of the actual
cost of the purchase.

opw-63059
2015-04-17 17:33:31 +02:00
Martin Trigaux d281e7aebd [FIX] stock_account: avoid timezone periode mismatch
The `find` method will get the current accounting periode according to the
user's timezone while time do not. This means that it is possible that users
get a move with a date belongign to a different period that the one returned by
`find`.
Fixing b101808, linked to #4147, courtesy of Graeme Gellatly
2015-04-10 10:12:15 +02:00
Rucha Dave b10180887e [FIX] stock_account: set current date for accounting entries
The accounting entries generated (during confirmation of moves on real time
products) were based on the move date. This is correct but the creation of the
entries (from quants_move) is done before the change of state of the move
(which set the date of the move to now).
Instead of using the date of move that is changed a few steps laters, use
directly the current date for account move date.
Fixes #4147, opw 619902
2015-04-08 15:16:49 +02:00
Goffin Simon 79ac324ca1 [FIX] stock_account: Invoicing on incoming shipment
When an extra line is added on an incoming shipment, the resulting
invoice must consider the tax of the product.

opw:630758, 630778
2015-04-01 09:28:48 +02:00
Olivier Dony 287b293283 [FIX] stock_account: valuation entry for reconciled neg quant not always possible
Skip the creation of the corrective valuation entry
when a negative quant is reconciled with an incoming
shipment, when:
 - the cost has not changed, so the journal entry would
   be useless (credit/debit = 0)
 - or, when the accounting period for the move causing
   the negative quant is already closed, and must not be
   updated (presumably the valuation was manually
   set before closing that period)
2015-03-25 12:38:17 +01:00
Olivier Dony 91d4b947f6 [I18N] Update translations from Launchpad 8.0 branches 2015-02-18 11:51:07 +01:00
Martin Trigaux e6d869b493 [FIX] stock_account: inconsistency in invoice line origin
The origin of the invoice lines was the same as the invoice (both using variable 'origin').
2015-02-03 17:11:38 +01:00
Olivier Dony 8e03852fd4 [I18N] Update translations from Launchpad 8.0 branches 2015-01-26 16:36:51 +01:00
Olivier Dony 495ec92251 [I18N] Update translations from Launchpad 8.0 branches 2015-01-21 15:36:54 +01:00
Olivier Dony 39f00b3637 [I18N] Update translation templates with latest terms
Total new terms: 270
Total deleted terms: 82
Total identical terms: 19653
Old total number of terms: 19735
New total number of terms: 19923
2015-01-21 15:31:22 +01:00
David Monjoie 2d215db686 [FIX] stock_account: compute total inventory_value when no product is specified
Without this fix, the 'Total' line of the pivot view does not display any inventory value, because there is no __domain as we are not asking the inventory value for any specific product.
2015-01-13 15:04:46 +01:00
Pavel Tysliatski 2b59888a24 FIX] stock: search by location on history
Searching by location in stock.history failed as field name does not exists
Fixes #4650
2015-01-12 17:28:01 +01:00
Denis Ledoux 3335e79652 [FIX] stock_acount: an invoice origin can be False
Therefore:
 - we avoid to split an a bool, as this isn't possible
 - we avoid to concatenate False with strings
2015-01-07 15:10:29 +01:00
Denis Ledoux 31468888a1 [FIX] stock_account: avoid duplicate document origin in invoice
This fix is related to 8de7be6219

opw-621962
2015-01-07 15:00:23 +01:00
Aaron Bohy ba37ae3cf3 [DEL] Cleaning: key 'images' removed from all __openerp__.py 2015-01-06 14:20:38 +01:00
Martin Trigaux 39748abf8c Revert "[FIX] stock_account: return product at purchased price"
This reverts commit 1fd13fbe2b.
For FIFO it was not needed as the cost is already set to the returned quant.
For standard price, this is wrong as the stock is reevaluated when the product
price is changed.
2015-01-05 17:32:40 +01:00
Xavier ALT 8de7be6219 [FIX] stock_account: keep all picking origins when creating a grouped invoice 2014-12-24 15:23:36 +01:00
Martin Trigaux 1fd13fbe2b [FIX] stock_account: return product at purchased price
For FIFO and standard price, return product at the purchased price instead of
the cost or current standard price.
Not applied for average as returning a purchased product do not recompute
the average price and would lead to an inconsistency in the stock value.
opw 615263
2014-12-24 11:23:51 +01:00
Josse Colpaert fd1f165f18 [IMP] Put default_invoice_state in context of move_lines of picking. 2014-12-18 10:13:37 +01:00
Martin Trigaux c3de121988 [FIX] stock_account: avoid getting 'stock.picking()' as reference
In the new api an empty recordset converted to string is the name its class
while previously it was converted to an empty string.

The valid v7 condition sould have probably been
    move.picking_id and move.picking_id.name or False
but in v8, simply move.picking_id.name is enough and avoids getting these
accounting entries strangly named when there is no picking.
2014-12-11 17:01:05 +01:00
Alexis de Lattre 31a01ea772 Fixes #3851 Create invoice from picking copies some parameters from the order to the invoice 2014-12-03 17:53:25 +01:00
Josse Colpaert 8c8056d95f [IMP] Query should pass through orm and as such the refreshes can be removed in the code, which will go faster as it is done automatically by the new api 2014-12-02 16:38:36 +01:00
Olivier Dony a6d24db305 [I18N] Update translations from Launchpad 8.0 branches 2014-11-19 17:49:12 +01:00
Josse Colpaert 2f5ca4380a Revert "[IMP] Remove unnecessary refresh statements because of new api"
This reverts commit b213438176.
2014-11-17 09:44:10 +01:00
Josse Colpaert b213438176 [IMP] Remove unnecessary refresh statements because of new api 2014-11-17 09:24:06 +01:00
Josse Colpaert 518b2f6a3f [FIX] super of scheduler / delivery method and phantom boms / average price
[FIX] super of scheduler should have same params + use_new_cursor should be passed to procure orderpoint confirm

[IMP] Make sure the delivery works when doing phantom boms

[FIX] This should update the average price properly when having multiple moves with the same product

[FIX] Average price should take into account the quantities of all variants

[FIX] Make sure purchase picking type in other company works

[IMP] Views of quants and destination locations of moves
2014-11-13 11:50:01 +01:00