Commit Graph

196 Commits

Author SHA1 Message Date
Lois Rilo
13b87e87d8 [12.0][UPD] stock_available_unreserved:
* update author's name after recent rebranding of Eficent to ForgeFlow.
* change license to lgpl as agreed by the authors.
* update readme to new format.
2021-12-21 11:57:25 +01:00
Galoperd
a8e96ae9ed Translated using Weblate (Spanish)
Currently translated at 100.0% (13 of 13 strings)

Translation: stock-logistics-warehouse-12.0/stock-logistics-warehouse-12.0-stock_available_unreserved
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_available_unreserved/es/
2021-12-21 11:57:25 +01:00
黎伟杰
cb567a54e8 Translated using Weblate (Chinese (Simplified))
Currently translated at 38.5% (5 of 13 strings)

Translation: stock-logistics-warehouse-12.0/stock-logistics-warehouse-12.0-stock_available_unreserved
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_available_unreserved/zh_CN/
2021-12-21 11:57:25 +01:00
OCA Transbot
95ab18ca93 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: stock-logistics-warehouse-12.0/stock-logistics-warehouse-12.0-stock_available_unreserved
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_available_unreserved/
2021-12-21 11:57:25 +01:00
oca-travis
1cc220caef [UPD] Update stock_available_unreserved.pot 2021-12-21 11:57:25 +01:00
ougc27
f9aed0287b [ADD][stock_available_unreserved] - Missing depends on qty_available_not_reserved compute method in order to update the quantity. 2021-12-21 11:57:25 +01:00
ougc27
51e6026882 [MIG] stock_available_unreserved: Migration to V12 2021-12-21 11:57:25 +01:00
Osoul
ee793b879a Added translation using Weblate (Arabic) 2021-12-21 11:57:25 +01:00
oca-travis
89088e33c2 [UPD] Update stock_available_unreserved.pot 2021-12-21 11:57:25 +01:00
Atte Isopuro
9fcc183062 stock_available_unreserved: allow searching by unreserved quantities 2021-12-21 11:57:25 +01:00
Guewen Baconnier
3b3861a194 Fix computation of stock available unreserved
The computation of the unreserved available amount using the
StockQuant._get_available_quantity was wrong as soon as more than one
quant was found for the same product. It can easily happen when you have
sublocations and a quant in each location.

The reason is that the algorithm was:

1. searching for all the quants for a given product
2. calling StockQuant._get_available_quantity for each quant
3. _get_available_quantity is an @api.model method, which itself will
search for all quants for the product and the given location and
children

Which means that if you have these locations:

Stock
Stock > Bin A
Stock > Bin B

And these quants:

1. Product: Product A
   Location: Bin A
   Quantity: 60
   Reserved: 0

2. Product: Product A
   Location: Bin B
   Quantity: 10
   Reserved: 0

Instead of 70, the result was 140. (One loop for each quant, each loop
recomputing the total quantity in _get_available_quantity, all summed
togethed, for each new quant, an additional sum would be added).

Ultimately, the _get_available_quantity method does the sum of (quantity
- quantity reserved). This commit uses the same logic than the 10.0
branch, it finds the quants contextually using
ProductProduct._get_domain_locations and get the available quantity as
the sum of (quantity - quantity reserved).

We can't really use StockQuant._get_available_quantity because this one
expects a location, while here we don't necessarily know it.

I removed _product_available_not_res_hook which seems to have no
purpose, it does not receive the result of the computation and its own
result is unused.
2021-12-21 11:57:25 +01:00
mpanarin
49d1974557 [MIG] stock_available_unreserved: migrate Odoo 11 2021-12-21 11:57:25 +01:00
Denis Roussel
949b1b8f6b [FIX] stock_available: Some affectations 2021-12-21 11:57:25 +01:00
Laurent Mignon (ACSONE)
c7bd9cfa46 [IMP] stock_available_unreserved: Improve perf in stock computation;
Read quants without lang into the context to avoid sql join on ir.translations
Iter on product with prefetch_fields=False and lang='' to avoid reading useless column ad join on ir.translations
2021-12-21 11:57:25 +01:00
Cédric Pigeon
e885d9ddc3 [CHG] optimize stock computation by avoiding to call useless compute 2021-12-21 11:57:25 +01:00
mreficent
63140e978d [IMP] fast compute
_product_available() method is computed only once by location
2021-12-21 11:57:25 +01:00
Stefan Rijnhart
ddfc39aded [MIG] stock_available_unreserved 2021-12-21 11:57:25 +01:00
OCA Transbot
30c955146e OCA Transbot updated translations from Transifex 2021-12-21 11:57:25 +01:00
Jordi Ballester Alomar
a346654cda new module 'stock_available_unreserved' (#206)
* [ADD] new module 'stock_available_unreserved'
2021-12-21 11:57:25 +01:00
OCA-git-bot
9fe586837c [ADD] setup.py 2021-12-20 07:59:09 +00:00
OCA-git-bot
efdea3ac2e [UPD] README.rst 2021-12-20 07:59:08 +00:00
OCA-git-bot
1b13151fa1 [UPD] addons table in README.md 2021-12-20 07:59:07 +00:00
oca-ci
f5dcdab5d5 [UPD] Update stock_helper.pot 2021-12-20 07:55:48 +00:00
OCA-git-bot
65260b5c3b Merge PR #1324 into 15.0
Signed-off-by LoisRForgeFlow
2021-12-20 07:53:33 +00:00
Christopher Ormaza
ef561dc58b [15.0][MIG] stock_helper 2021-12-10 11:23:00 -05:00
Christopher Ormaza
09d6270cbf [IMP] stock_helper: black, isort, prettier 2021-12-10 11:22:14 -05:00
OCA-git-bot
9dd0f88583 [UPD] README.rst 2021-12-10 11:21:57 -05:00
oca-travis
fe42e02652 [UPD] Update stock_helper.pot 2021-12-10 11:21:57 -05:00
davidborromeo
daa5a504ac [MIG] stock_helper: Migration to 14.0 2021-12-10 11:21:57 -05:00
OCA-git-bot
742f390f15 stock_helper 13.0.1.1.0 2021-12-10 11:21:57 -05:00
OCA-git-bot
1f7fd27667 [ADD] icon.png 2021-12-10 11:21:57 -05:00
OCA-git-bot
56a8a449d1 [UPD] README.rst 2021-12-10 11:21:57 -05:00
oca-travis
b3f3382da8 [UPD] Update stock_helper.pot 2021-12-10 11:21:57 -05:00
Guewen Baconnier
3a0bdb2d55 Apply suggestions from code review
Co-authored-by: Simone Orsi <simahawk@users.noreply.github.com>
2021-12-10 11:21:57 -05:00
Guewen Baconnier
a197cf0553 Add stock_helper: share common code used by stock modules
The first method is: StockLocation.is_sublocation_of()

This method is currently used in:

* wms/stock_dynamic_routing
* wms/shopfloor
* wms/stock_move_source_relocate
* stock-logistics-warehouse/stock_reserve_rule
* ddmrp/ddmrp

The goal will be to use this module as dependency instead of
reimplementing the method in each.

Other methods should follow in "stock_helper".

Note: I opened https://github.com/odoo/odoo/pull/53866 to propose a
generic version of this method, expecting odoo's opinion, but got no
answer.
2021-12-10 11:21:57 -05:00
OCA-git-bot
9b0e056344 [ADD] setup.py 2021-11-11 10:29:20 +00:00
OCA-git-bot
f7d8798691 [UPD] README.rst 2021-11-11 10:29:19 +00:00
OCA-git-bot
a93a8ae5c4 [UPD] addons table in README.md 2021-11-11 10:29:18 +00:00
oca-ci
38fe2b7467 [UPD] Update procurement_auto_create_group.pot 2021-11-11 10:26:20 +00:00
OCA-git-bot
829b132e50 Merge PR #1300 into 15.0
Signed-off-by LoisRForgeFlow
2021-11-11 10:23:08 +00:00
oca-git-bot
948cbbb1fb [IMP] update dotfiles [ci skip] 2021-11-10 22:44:32 +01:00
Bernat Puig Font
b0cb4f4b4e [IMP] procurement_auto_create_group: auto_create_group for push rules 2021-11-08 09:37:10 +01:00
Bernat Puig Font
5cd8202c57 [MIG] procurement_auto_create_rule: Migration to 15.0 2021-11-04 13:10:08 +01:00
Bernat Puig Font
90633c8416 [IMP] procurement_auto_create_group: black, isort, prettier 2021-11-04 09:01:56 +01:00
OCA Transbot
8125eed254 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: stock-logistics-warehouse-14.0/stock-logistics-warehouse-14.0-procurement_auto_create_group
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-14-0/stock-logistics-warehouse-14-0-procurement_auto_create_group/
2021-11-04 09:01:05 +01:00
OCA-git-bot
2c69241a71 [UPD] README.rst 2021-11-04 09:01:05 +01:00
oca-travis
0139d02501 [UPD] Update procurement_auto_create_group.pot 2021-11-04 09:01:05 +01:00
Jacques-Etienne Baudoux
824f0f33b2 procurement_auto_create_group: Set partner on created procurement group 2021-11-04 09:01:05 +01:00
OCA-git-bot
fbab31d1ac [UPD] README.rst 2021-11-04 09:01:05 +01:00
oca-travis
793c28d9b2 [UPD] Update procurement_auto_create_group.pot 2021-11-04 09:01:05 +01:00