Commit Graph

72 Commits

Author SHA1 Message Date
Goffin Simon 1995c347b6 [FIX] stock_account: _store_average_cost_price
The function "_store_average_cost_price" doesn't have to update
the average cost price of a product if qty of the product in the move
is equal to zero.

opw:659329
2015-12-15 16:03:25 +01:00
Denis Ledoux b8f630e59f [FIX] stock_account: context could be None
In the use case of a mrp repair ending, the
context when calling `_store_average_cost_price`
is None

opw-648254
2015-09-01 16:18:10 +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
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
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
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
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
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
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
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
Olivier Dony d32d120a0a [MERGE] Forward-port of saas-5 up to 9ce08b7 2014-09-08 16:54:10 +02:00
Niels Huylebroeck 9ce08b78ce [FIX] stock_account: Preserve action_done return value
stock_account module override the action_done method of stock.move but does not return the same value
This causes problems when calling this function from xmlrpc because the resulting value is now None and that is not allowed to be marshaled by default.
2014-09-08 14:34:02 +02:00
Josse Colpaert 327c488f2b [IMP] Pass product template to template method 2014-09-03 19:19:18 +02:00
Josse Colpaert e5a9bd536d [IMP] Average price correction + Lot should be changeable in bar code interface 2014-08-12 13:37:25 +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
Christophe Matthieu 43977deb71 [IMP] product: refactoring of product variant. The main view became the view of product template and the product product (or product variant) are created with the variant values combinaison. Bom is splitted into bom and bom line and can use the variant combinaison. 2014-05-27 09:42:52 +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) 873e65edfa [IMP] stock_account: better error message
bzr revid: qdp-launchpad@openerp.com-20140424091715-xykdsi2dxacm4ybh
2014-04-24 11:17:15 +02:00
Quentin (OpenERP) c41941d978 [FIX] a lot a fixes or usability improvements. Includes a branch of jco as well with other fixes
bzr revid: qdp-launchpad@openerp.com-20140416145313-eiadz94h9wolhb9b
2014-04-16 16:53:13 +02:00
Josse Colpaert 36b12e4339 [MERGE] Merge from trunk-wms
bzr revid: jco@openerp.com-20140411095928-jnlqi15cn7zz491d
2014-04-11 11:59:28 +02:00
Quentin (OpenERP) d31e02fb3f [FIX] stock_account: valuation of quants
lp bug: https://launchpad.net/bugs/1302625 fixed

bzr revid: qdp-launchpad@openerp.com-20140410143347-chn34o1w0pzn5y2t
2014-04-10 16:33:47 +02:00
Josse Colpaert e55ac5a9de [WIP] In case the warehouse operator chooses other quants than foreseen that were reserved on another move
bzr revid: jco@openerp.com-20140408162717-khax5gied2atr7gd
2014-04-08 18:27:17 +02:00
Quentin (OpenERP) c788088617 [REF] stock, inventory: post moves at the inventory closing date + removal of the constraints because it's not needed anymore now
bzr revid: qdp-launchpad@openerp.com-20140408160144-nb5b7rjxygbblud3
2014-04-08 18:01:44 +02:00
Quentin (OpenERP) bde6b6d6e5 [REF] refactoring made during code review. Some optimization patches have been rewritten more clearly, others abandonned or kept. WIP
bzr revid: qdp-launchpad@openerp.com-20140319163359-2ea7tjn5ba1ggein
2014-03-19 17:33:59 +01:00
Quentin (OpenERP) 5b8bbb161b [MERGE] trunk-wms up to revision 9598
bzr revid: qdp-launchpad@openerp.com-20140317105915-7gl53kvduilf3fup
2014-03-17 11:59:15 +01:00
Quentin (OpenERP) cb17a2dc94 [IMP] stock: restrict to make stock operations when conflicting with running inventories + mark moves as done at the inventory date (to have a correct virtual stock and accounting entries created in the good period)
bzr revid: qdp-launchpad@openerp.com-20140314135938-4n4o83mzeov4fcjk
2014-03-14 14:59:38 +01:00
Josse Colpaert c5a8943ebb [IMP] At quants creation it should do accounting entries also
bzr revid: jco@openerp.com-20140312112925-o2dvsqg2urfnu2sr
2014-03-12 12:29:25 +01:00
Josse Colpaert ee7024820e [IMP] Improve process packaging: processed when moving quants except for entire packages
bzr revid: jco@openerp.com-20140312094544-3xg5ar6wr2o39pyn
2014-03-12 10:45:44 +01:00
Josse Colpaert 9c17f269a1 [IMP] Improve account entries grouping
bzr revid: jco@openerp.com-20140311165747-okk437oyeq7e2q8g
2014-03-11 17:57:47 +01:00
Josse Colpaert 886812e4d0 [FIX] Fix and clean from multiple quants move
bzr revid: jco@openerp.com-20140311152904-k1qrofmayeatymxc
2014-03-11 16:29:04 +01:00
Josse Colpaert 782181aba6 [WIP] Group accounting lines of same cost and correct move_single_quant_tuple
bzr revid: jco@openerp.com-20140311112047-xx1p2i92bzcq0l2y
2014-03-11 12:20:47 +01:00
Josse Colpaert 1a5e98ad6b [WIP] Move multiple quants at once
bzr revid: jco@openerp.com-20140310175445-qza0jpc3tx724vks
2014-03-10 18:54:45 +01:00
Josse Colpaert 63763ef224 [IMP] Create accounting entries to pass runbot
bzr revid: jco@openerp.com-20140306181001-cnna3jojs91fm1d5
2014-03-06 19:10:01 +01:00
Josse Colpaert b6bde4c458 [IMP] Only create extra moves or rereserve quants when necessary
bzr revid: jco@openerp.com-20140305140739-ciiyt2eiu0w435kj
2014-03-05 15:07:39 +01:00
Quentin (OpenERP) f8470c94ee [REF] stock: put some order in inventory psql reports (on quants) in labels, files and code
bzr revid: qdp-launchpad@openerp.com-20131205181052-gsnlps6ifvm016az
2013-12-05 19:10:52 +01:00
Quentin (OpenERP) 9a0a04c809 [FIX] stock_account: give a list of ids to write()
bzr revid: qdp-launchpad@openerp.com-20131205100516-298sillxikfkhr9r
2013-12-05 11:05:16 +01:00
Quentin (OpenERP) 436b46bf77 [WIP] stock: partial transfer and rereserve reimplementation
bzr revid: qdp-launchpad@openerp.com-20131118133650-gd5jx6tkjjrzha05
2013-11-18 14:36:50 +01:00
Quentin (OpenERP) a4f38da847 [WIP] stock: partial transfer and rereserve reimplementation
bzr revid: qdp-launchpad@openerp.com-20131118095021-b0mze9fuz30sanrg
2013-11-18 10:50:21 +01:00
Quentin (OpenERP) b5645d2386 [FIX] stock_account, purchase: the standard price of a product may not be compatible with the decimal precision 'Account' or the coinage of the main currency, so we need to take care of that when creating the stock valuation entries
bzr revid: qdp-launchpad@openerp.com-20131104164939-jupkxy1zrqqq3lpq
2013-11-04 17:49:39 +01:00
Quentin (OpenERP) 94faa4ae11 [FIX] stock, stock_account: access rights
bzr revid: qdp-launchpad@openerp.com-20131015123028-ku9u0fopcb1wgfii
2013-10-15 14:30:28 +02:00
Josse Colpaert f90c341a24 [WIP] Negative quants and packing operations
bzr revid: jco@openerp.com-20130924143220-dcm9u876tfbxzayz
2013-09-24 16:32:20 +02:00
Quentin (OpenERP) 434838b9a5 [FIX] stock: fixing product cost price updates in case of negative quants
bzr revid: qdp-launchpad@openerp.com-20130924124906-gdmnzv85hnjrtqgb
2013-09-24 14:49:06 +02:00
Quentin (OpenERP) 856b4a284e [FIX] stock, stock_account: update of product cost price
bzr revid: qdp-launchpad@openerp.com-20130924082804-654jv5dkywfooivu
2013-09-24 10:28:04 +02:00
Quentin (OpenERP) f49e0dd3b2 [FIX] stock_account: update cost price of product when it needs it
bzr revid: qdp-launchpad@openerp.com-20130923194234-36iekv6z92a9pp4g
2013-09-23 21:42:34 +02:00
Quentin (OpenERP) 8b4584f18d [FIX] stock_account: negative quant stock valuation
bzr revid: qdp-launchpad@openerp.com-20130923153512-x9vbi601akzm5cv9
2013-09-23 17:35:12 +02:00
Quentin (OpenERP) 4bea4bc1f3 [FIX] negative quants fixing
bzr revid: qdp-launchpad@openerp.com-20130923143309-42mo2trr8jy6m5qk
2013-09-23 16:33:09 +02:00