Commit Graph

61 Commits

Author SHA1 Message Date
Nicolas Seinlet 5c9897a83f [IMP] stock_account: rework on stock_history view joins
- Replace `LEFT JOIN` by simple `JOIN` for required fields
 - Use `JOIN ... ON (...)` syntax instead of implicit join `A.X = B.Y`
 - Remove of unused column quant_id

Closes #9197
opw-650598
2015-10-22 15:59:54 +02:00
Nicolas Seinlet 29bd622521 [FIX] stock_account: stock history performance
Using BIGINT id instead of Text
 - This doesn't change the behavior, just the variable type,
   while being much more efficient.
Using `UNION ALL` instead of simple `UNION`
 - This doesn't change the behavior either,
   as the ids of each sub select cannot collide

Closes #9197
opw-650598
2015-10-22 15:59:54 +02:00
Goffin Simon 8ef590bb28 [FIX] stock_account: stock inventory valuation
The function "open_table" is not called when triggering the action
window "Current Inventory Valuation". Then the 'history_date' is not
set in the context.

opw:649168
2015-09-16 14:18:40 +02:00
Lionel Sausin 4be4678d8b [FIX] stock_account: use all inbound/outbound moves when valuating
The valuation wizard is based on stock moves and currently only takes into
account the moves which have different companies in source vs destination
locations.
This is a problem because all user-created locations have a default company set
to the user's company, even the "virtual" ones. For example in the demo dataset
visible on runbot, some supplier locations have a company set and some don't.
So we have to make sure to include every move coming from/going to
outside locations based on the locations's type too.

Closes #7530
2015-07-09 11:39:14 +02:00
Lionel Sausin 5fcad55000 [FIX] stock_account: missing default filter for valuation menu
The menu entry in Warehouse > Current Inventory Valuation is a shortcut to the
same results as the wizard in Reports > Warehouse > Valuation. However when
using the "current valuation" menu entry, the list is given without grouping by
product and location, so it's basically just a glorified list of stock moves
that no Warehouse manager is going to understand.

Let's just add the same default grouping to let the results make sense.

Closes #7531
2015-07-09 09:29:18 +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 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
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
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
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
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
Josse Colpaert 327c488f2b [IMP] Pass product template to template method 2014-09-03 19:19:18 +02:00
Josse Colpaert 138011c69b [IMP] Changing the standard cost price should do the real-time valuation for all variants of the template 2014-09-03 19:19:18 +02:00
Josse Colpaert 5dea263e1b [FIX] Change two-one step wh, multi-comp wh, quantity field float, show product_uom_qty instead of product_qty in mrp production for moves 2014-08-12 13:37:27 +02:00
Josse Colpaert 7191bbfb24 [IMP] is_product_variant not needed in most views + no delete in stock valuation history 2014-08-12 13:37:26 +02:00
Raphael Collet cbe2dbb672 [MERGE] new v8 api by rco
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.

- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
2014-07-06 17:05:41 +02:00
Josse Colpaert df020d8833 [IMP] Other remarks pull request 2014-06-19 10:22:32 +02:00
Josse Colpaert 6b63d40145 [MERGE] Merge from master and resolve conflict 2014-06-17 16:23:44 +02:00
Josse Colpaert bdd8d5a937 [IMP] journal_id in onshipping should be many2one instead of selection hack 2014-06-16 12:32:17 +02:00
Josse Colpaert 8e223c8aba [IMP] Invoice_state based on delivery wizard recheck + returns and invoice_state 2014-06-13 17:44:03 +02:00
ged-odoo 74168c4e9d Merge pull request #272 from odoo-dev/master-inline-searchview-ged
[MERGP] Inline Searchview

This task split the searchview in two parts: SearchView and SearchViewDrawer. The drawer is displayed inside the main view and the searchview stays in place.  It also changes the scrolling behavior of the web client: the main view area can scroll without affecting the UI (so the various menus stays in place)

Because of this, other large changes have been made:

the drawer has been redesigned,
the Custom Filter widget has been split in two (Custom Report and SaveCurrentFilter),
the main view is now scrollable, so the UI stays in place and only the view can change
The text 'Group By...' has been changed into 'Group By' (most addons had to be modified)
bootstrap classes are used when it makes sense (for example, badge)
the left menu is also scrollable (separately from the main view)

It is likely that some stupid bugs have been introduced.  Please don't hurt me.
2014-06-12 16:27:11 +02:00
Fabien Meghazi faa09da325 Removed version="7.0" from form views 2014-06-12 09:09:59 +02:00
Josse Colpaert c1cab32402 [FIX] Correction of stock valuation report 2014-06-10 17:11:18 +02:00
Géry Debongnie 555677f14d [IMP] replace all 'Group By...' by 'Group By'
in all searchview, the 'Group By...' looks weird, next to the Custom
Reports and Filters.  This change was requested by the upper management
2014-05-22 11:44:35 +02:00
Quentin (OpenERP) 78a7ae966f [REF] product: get_price_history refactored and moved in product.template object
bzr revid: qdp-launchpad@openerp.com-20140505120743-zjviksa7o1mpawuf
2014-05-05 14:07:43 +02:00
Quentin (OpenERP) 7ed26f1e07 [REF] product refactoring: prices.history model renamed into product.price.history + passed 'date' as real parameter instead of contextual one in get_history_price() because it makes more sense.
bzr revid: qdp-launchpad@openerp.com-20140428153355-vbuam1hfnah7m4wp
2014-04-28 17:33:55 +02:00
Quentin (OpenERP) b96b904b2c [REF] stock_account: refactoring of do_change_standard_price() + removal of TODO statements
bzr revid: qdp-launchpad@openerp.com-20140425121810-tp2caagu1rnzpgcg
2014-04-25 14:18:10 +02:00
Quentin (OpenERP) 2d205bfa81 [FIX] stock: lazy parameter of read_group added. stock_account: valuation history fixed/improved
bzr revid: qdp-launchpad@openerp.com-20140417095547-3vsz20v0x95iy02t
2014-04-17 11:55:47 +02:00
Josse Colpaert b1f3a496c6 [IMP] Correct for new way of stock valuation, add source
bzr revid: jco@openerp.com-20140416151825-et2m2syyt7duaffi
2014-04-16 17:18:25 +02:00
Josse Colpaert 2d1d25b005 [WIP] Correct stock valuation report
bzr revid: jco@openerp.com-20140416084849-kr0c2h8xqf1bw9vn
2014-04-16 10:48:49 +02:00
Josse Colpaert 888e13d22e [FIX] Add parameter in readgroup
bzr revid: jco@openerp.com-20140415091923-r5ipe0bevxrutxxh
2014-04-15 11:19:23 +02:00
Quentin (OpenERP) 522f87f03f [MERGE] stock reports in Qweb
bzr revid: qdp-launchpad@openerp.com-20140327174228-6beohyphca58nb00
2014-03-27 18:42:28 +01:00
Josse Colpaert 56af6792b5 [MERGE] Merge from trunk-wms-loconopreport-jco
bzr revid: jco@openerp.com-20140326155041-rryzcotazkzjcq8j
2014-03-26 16:50:41 +01:00
Josse Colpaert 6dbb3a86db [IMP] Picking wave report controller for calling report for pickings
bzr revid: jco@openerp.com-20140314151320-0e33my2ux3mfj1p2
2014-03-14 16:13:20 +01:00
Josse Colpaert 0645597438 [IMP] Optimize stock valuation report more
bzr revid: jco@openerp.com-20140314111632-59lzfrboz6kpd94y
2014-03-14 12:16:32 +01:00
Josse Colpaert 13566b866e [IMP] Fasten up stock valuation report
bzr revid: jco@openerp.com-20140313174244-c7dg2thz6r7d5fek
2014-03-13 18:42:44 +01:00
Josse Colpaert dcb12c7db8 [MERGE] Merge from trunk-wms-loconopmerge2 + only keep good optims
bzr revid: jco@openerp.com-20140313170620-fq25a32fdlo3xrxy
2014-03-13 18:06:20 +01:00
Josse Colpaert fd5f6e7ccd [IMP] Testing report
bzr revid: jco@openerp.com-20140313081904-jzf1oiixe0nz7v2g
2014-03-13 09:19:04 +01:00
Josse Colpaert 04115a42d3 [WIP] Inventory value in stock valuation report
bzr revid: jco@openerp.com-20140312204125-qolc6yisb0rw6zfr
2014-03-12 21:41:25 +01:00
Josse Colpaert 146f04cff0 [FIX] Match reserved package should be correct
bzr revid: jco@openerp.com-20140307092953-zg05xusw9xctol8b
2014-03-07 10:29:53 +01:00
Josse Colpaert 428d5e1af1 [FIX] Take case product in ops exist, but not in move
bzr revid: jco@openerp.com-20140306160106-ydz47uoh66d1nbip
2014-03-06 17:01:06 +01:00
Quentin (OpenERP) 9550c32409 [MERGE] usability improvements among several modules/screens
bzr revid: qdp-launchpad@openerp.com-20140214145712-j8dmf06wy49x9l50
2014-02-14 15:57:12 +01:00
Cedric Snauwaert fdf9fc34dc [FIX]replace stock by location menu with stock valuation manu
bzr revid: csn@openerp.com-20140212131937-wkxij6dmk32vd4ue
2014-02-12 14:19:37 +01:00
Cedric Snauwaert b8826aaa30 [FIX]various usability thing
bzr revid: csn@openerp.com-20140212124646-301rfsr1712cdy18
2014-02-12 13:46:46 +01:00
Quentin (OpenERP) 06bd943846 [IMP] wms: useability
bzr revid: qdp-launchpad@openerp.com-20131209094835-podqlz6a01hmtty2
2013-12-09 10:48:35 +01:00
Quentin (OpenERP) 1e4d89bf79 [IMP] stock_account: usability of stock value at date report
bzr revid: qdp-launchpad@openerp.com-20131206165956-75u2srxtb7mbusyq
2013-12-06 17:59:56 +01:00
Quentin (OpenERP) 823e945477 [FIX] stock_account: fixed the stock valuation at date report
bzr revid: qdp-launchpad@openerp.com-20131206165006-47db8kyuxjm8s0bo
2013-12-06 17:50:06 +01:00