Commit Graph

1455 Commits

Author SHA1 Message Date
Ricardoalso
4524ecf75a [MIG] stock_reserve_rule: Migration to 15.0 2023-06-12 15:02:00 +02:00
Ricardoalso
5439a2c225 [IMP] stock_reserve_rule: black, isort, prettier 2023-06-12 14:42:42 +02:00
Michael Tietz
2cc7d2358a stock_reserve_rule: fix _apply_strategy_empty_bin
rule now only gets applied if no other products are allocating the location
2023-06-12 14:42:42 +02:00
Simone Orsi
91286ef9bc stock_reserve_rule: dev status -> Beta 2023-06-12 14:42:42 +02:00
Jacques-Etienne Baudoux
a8f5dc76f9 [FIX] stock_reserve_rule: rule matching
A move from "Stock/Zone1/A" must match removal rules defined for
"Stock/Zone1"
2023-06-12 14:42:42 +02:00
Sébastien Alix
854cafb93b [MIG] stock_reserve_rule: Migration to 14.0 2023-06-12 14:42:42 +02:00
Sébastien Alix
6acafc03f0 [IMP] stock_reserve_rule: black, isort, prettier 2023-06-12 14:30:47 +02:00
Juan Carreras
35d710d72d [FIX]stock_reserve_rule: fix rule because multicompany scheme change 2023-06-12 14:30:47 +02:00
OCA-git-bot
7e82259a1c stock_reserve_rule 13.0.1.3.0 2023-06-12 14:30:47 +02:00
oca-travis
ed1cd0692a [UPD] Update stock_reserve_rule.pot 2023-06-12 14:30:47 +02:00
Guewen Baconnier
a7425f500d stock_reserve_rule: add dependency on stock_helper
To remove the duplicate implementation of
StockLocation.is_sublocation_of()
2023-06-12 14:30:47 +02:00
OCA-git-bot
b109b0610f stock_reserve_rule 13.0.1.2.1 2023-06-12 14:30:47 +02:00
Guewen Baconnier
4ed18a3549 Modify packaging rule to always respect fifo, lifo, ...
The former implementation was to take as much as possible of the largest
packaging, to the smallest packacking, to have less to move.
Then, only, removal order (fifo, ...) was applied for equal quantities.
It is more important to respect removal order than limiting the
operations, so remove this "optimization".
2023-06-12 14:30:47 +02:00
Guewen Baconnier
d8673393b8 Modify empty bin rule to always respect fifo, lifo, ...
The former implementation was sorting the quants per location and trying
to take as much quantities as possible from the same locations, to limit
the number of operations to do. Then, only, removal order (fifo, ...)
was applied. It is more important to respect removal order than limiting
the operations, so remove this "optimization".
2023-06-12 14:30:47 +02:00
OCA-git-bot
0992c55e46 stock_reserve_rule 13.0.1.2.0 2023-06-12 14:30:47 +02:00
oca-travis
45a5ccf7da [UPD] Update stock_reserve_rule.pot 2023-06-12 14:30:47 +02:00
Guewen Baconnier
17de83ce18 Change picking type to many2many in reserve rules 2023-06-12 14:30:47 +02:00
OCA-git-bot
f66b53cc0e [UPD] README.rst 2023-06-12 14:30:47 +02:00
Guewen Baconnier
fe6c513043 Fix test incompatibility with stock_reserve_rule
The rules created in demo data of stock_reserve_rule make the tests of
stock_vertical_lift (and possibly other modules) fail because the
transfers can't be made available.

Deactivate the rule in stock_reserve_rule and activate it only in its
tests. Users can still activate the rule manually to test.
2023-06-12 14:30:47 +02:00
OCA-git-bot
07dfd4c4c9 [ADD] icon.png 2023-06-12 14:30:47 +02:00
OCA-git-bot
34e1499bfc [UPD] README.rst 2023-06-12 14:30:47 +02:00
oca-travis
9314f20143 [UPD] Update stock_reserve_rule.pot 2023-06-12 14:30:47 +02:00
Guewen Baconnier
d6b55521d7 Remove implicit fallback when rules are used
When rules are configured and have been applied, we should not
have an implicit fallback on the base location, as it would kind
of cancel the benefits of the rules (as it would then take whatever
it wants anywhere in all the locations).
2023-06-12 14:30:47 +02:00
Guewen Baconnier
5d57de0c00 Revert "Optimize SQL queries when searching a rule"
This reverts commit 768f186fd2.

Which is not more optimized, the optimization based on parent_path
doesn't make sense here as the ORM will read parent_path in the location
and get the parent ids by splitting the ids, it doesn't need more than
one query on stock_location which is done based on its id and can reuse
the cache, there is no lookup on parent path for parent_of.

>>> env["stock.reserve.rule"].search([("location_id", "parent_of", 3125)])
2020-05-27 05:36:59,938 1 DEBUG log_p odoo.sql_db: query: SELECT "stock_location"."id" as "id","stock_location"."name" as "name","stock_location"."complete_name" as "complete_name","stock_location"."active" as "active","stock_location"."usage" as "usage","stock_location"."location_id" as "location_id","stock_location"."comment" as "comment","stock_location"."parent_path" as "parent_path", <stripped>,"stock_location"."create_uid" as "create_uid","stock_location"."create_date" as "create_date","stock_location"."write_uid" as "write_uid","stock_location"."write_date" as "write_date" FROM "stock_location" WHERE "stock_location".id IN (3125)
2020-05-27 05:36:59,942 1 DEBUG log_p odoo.sql_db: query: SELECT "stock_reserve_rule".id FROM "stock_reserve_rule" WHERE (("stock_reserve_rule"."active" = true)  AND  ("stock_reserve_rule"."location_id" in (1,7,8,133,134,135,144,207,3125))) ORDER BY "stock_reserve_rule"."sequence" ,"stock_reserve_rule"."id"
2023-06-12 14:30:47 +02:00
Guewen Baconnier
8658e3fbee Remove logger that makes the tests failing
As the logger outputs an error log during tests, travis counts it as a
failure of a test.
2023-06-12 14:30:47 +02:00
Guewen Baconnier
5f405cc42c Add explicit filter on picking type 2023-06-12 14:30:47 +02:00
Guewen Baconnier
79289efe9d Improve usability 2023-06-12 14:30:47 +02:00
Guewen Baconnier
7194a21c2c Use optimized method to check if location is child 2023-06-12 14:30:47 +02:00
Guewen Baconnier
55c3302924 Remove fallback location
It could not work properly here as we need the "fallback" to apply
even if there is no quantity at all in the stock. As we hook the
reservation rules in StockMove._update_reserved_quantity(), and
this method is called only if we have at least 1 product in qty,
the fallback was not applied with zero qty.

A new module will handle this concept: https://github.com/OCA/wms/pull/28
2023-06-12 14:30:47 +02:00
Guewen Baconnier
c12e2c0c5f Optimize SQL queries when searching a rule
Searching all rules then filtering in python the parent path is
more efficient than finding all the parent locations and finding
the matching rules.
2023-06-12 14:30:47 +02:00
Guewen Baconnier
c44da136ab Fix application of removal rules too broad
Example of configuration:

Rule location: Stock
Removal rule 1: Stock/Zone1
Removal rule 2: Stock/Zone2

Reservation of a stock move with Stock/Zone2 as source location.

Previously, it would reserve in Stock/Zone1.
Now, it will never be allowed to reserve in Stock/Zone1.

A warning message was added previously to warn the user about potential
issues, which is now obsolete so I removed it.
2023-06-12 14:30:47 +02:00
Guewen Baconnier
e52c9016a2 Fix bug in fallback when no quantity could be reserved
Before the change, the implementation of the fallback goes like this:

If I reserve a move of 3000 and it finds 600 units, it splits the move
to create a new move of 2400 and pretend to the caller that 3000 was
reserved so the initial move is changed to 'assigned'.

Now, if we have a move of 2400 and finds zero, it still splits the move,
and pretend to the caller that 2400 was reserved → the initial move has
no move line but is assigned. In this case, we should not split the move
but only update the source location of the move.
2023-06-12 14:30:47 +02:00
sebalix
2c6b57f2cb [IMP] stock_reserve_rule: add constraints on fallback locations 2023-06-12 14:30:47 +02:00
Guewen Baconnier
3faba3244c Run pre-commit with xml prettier 2023-06-12 14:30:47 +02:00
Guewen Baconnier
fb54abae39 Migrate stock_reserve_rule to 13.0 2023-06-12 14:30:47 +02:00
Guewen Baconnier
28c2d0f42a Add stock_reserve_rule 2023-06-12 14:30:47 +02:00
mymage
d5035e7b0f Translated using Weblate (Italian)
Currently translated at 16.1% (27 of 167 strings)

Translation: stock-logistics-warehouse-15.0/stock-logistics-warehouse-15.0-stock_reserve
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-15-0/stock-logistics-warehouse-15-0-stock_reserve/it/
2023-06-09 12:09:47 +00:00
OCA-git-bot
c213bbacfb [UPD] addons table in README.md 2023-06-06 14:37:59 +00:00
OCA-git-bot
177357bd6c account_move_line_stock_info 15.0.1.1.0 2023-06-06 14:37:53 +00:00
OCA-git-bot
5798754196 Merge PR #1744 into 15.0
Signed-off-by LoisRForgeFlow
2023-06-06 14:17:34 +00:00
AaronHForgeFlow
18bf4f7ee6 [IMP] account_move_line_stock_info: show stock move in list view 2023-06-06 16:11:46 +02:00
Weblate
4e4e26f41c Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: stock-logistics-warehouse-15.0/stock-logistics-warehouse-15.0-stock_move_location
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-15-0/stock-logistics-warehouse-15-0-stock_move_location/
2023-06-06 11:57:51 +00:00
OCA-git-bot
73a6399ee9 [UPD] addons table in README.md 2023-06-06 11:57:32 +00:00
OCA-git-bot
c88e7b2f44 stock_move_location 15.0.1.2.0 2023-06-06 11:57:19 +00:00
OCA-git-bot
ee8c6f7b18 [UPD] README.rst 2023-06-06 11:57:19 +00:00
oca-ci
a9013bfa4f [UPD] Update stock_move_location.pot 2023-06-06 11:47:52 +00:00
OCA-git-bot
f6f87969dd Merge PR #1704 into 15.0
Signed-off-by rousseldenis
2023-06-06 11:34:21 +00:00
Abraham Anes
061c3960b4 [14.0][IMP] stock_move_location: owner support 2023-06-06 12:36:40 +02:00
Abraham Anes
5e38c9554a [14.0][IMP] stock_move_location: packages support 2023-06-06 12:36:31 +02:00
OCA-git-bot
8055fca956 [UPD] addons table in README.md 2023-06-02 06:17:12 +00:00