Commit Graph

16 Commits

Author SHA1 Message Date
Florian da Costa
22d3c6ba95 Make stock_available_mrp compatible with other modules like stock_available_immediately 2019-08-31 09:26:35 +02:00
Sergio Teruel
d893726123 [MIG] stock_available: Migration to v12.0 2019-07-05 12:31:47 +02:00
Cédric Pigeon
9afb7105c2 [10.0][CHG]stock_available...: improve stock methods computation 2019-07-05 12:31:29 +02:00
Alexandre Saunier
e53c07decf [FIX] Improve migration to 11.0 2019-07-05 12:31:29 +02:00
Kiko Peiro
a2ba407e07 [MIG] stock_available: Migration to 11.0 2019-07-05 12:31:10 +02:00
François Honoré
2d73596ab9 [ADD] Add search function for immediately_usable_qty computed field + related unit test
Increase version number of the module
2019-07-05 12:31:10 +02:00
Denis Roussel
cc9df312ae [FIX] stock_available: Some affectations 2019-07-05 12:31:10 +02:00
David Vidal
73e91abf5a [MIG] stock_available_sale: Migration to 10.0 2019-07-05 12:31:10 +02:00
Cédric Pigeon
04479483de [10.0]stock_available: improve computation performance
[CHG] improve code regarding code review

[ADD] add test

[CHG] optimize stock computation by avoiding to call useless compute
2019-07-05 12:31:10 +02:00
SodexisTeam
6f82b8f548 [10.0][MIG] stock_available & stock_available_immediately (#219) 2019-07-05 12:31:10 +02:00
Cyril Gaudin
fa04fb532f bom stock: small improvements and add test for field choice 2019-07-05 12:30:59 +02:00
Laetitia Gangloff
1b494822e2 stock_available / stock_available_mrp : add possibility to choose which field use to compute potential 2019-07-05 12:30:59 +02:00
Lionel Sausin
9020363693 [IMP] Decouple the quantity for templates and variants
There are cases where we dot NOT want to simply sum the quantities of all the
variants. For example when dealing with manufacturing capacities, we may have
to chose between variants because we can't make ALL of them with the same
components.

So instead of a simple non-modular implementation, we'll let each module define
his own implementation of how to compute the product template's quantity
available for sale.

Conflicts:
	stock_available/__openerp__.py
	stock_available_immediately/__openerp__.py
2019-07-05 12:30:59 +02:00
Alexandre Fayolle
9f31835728 product_available improvements
* fix the dependencies for the computed field

* use api.multi instead of api.one to avoid calling
  super()._immediately_usable_qty in a loop (this improves perfs on a tree view
  display)
2019-07-05 12:30:59 +02:00
Atchuthan, Sodexis
46adfc06a8 [9.0][PORT] Stock available 2019-07-05 12:30:59 +02:00
Lionel Sausin
36d6557e24 Revert changes to computation of _immediately_usable_qty
Commit 6c16913 changed the way we compute the immediately_usable_qty: instead of using the virtual stock, we used the sum of quants without reservations. But a quant may actually be reserved and still be available (for example it may be reserved for an internal move).
Fixes https://github.com/OCA/stock-logistics-warehouse/issues/79

Remove loop and use correct decorator

Restore the features of stock_available_immediately

The previous fix restored stock_available but then there was no way to exclude the incomming moves from the count. This belongs in stock_available_immediately, restoring it cleanly.
This commit also takes care to respect the distinction between templates and variants, so it should fix https://github.com/OCA/stock-logistics-warehouse/issues/73 too.

Restore the qty avail. to promise on variant treeview

PEP8
2019-07-05 12:30:51 +02:00