Commit Graph
13 Commits
Author SHA1 Message Date
William Henrotin 56e7bcf0cb [REF] *{stock,mrp}*: rename reserved fields
This commit rename product_uom_qty into reserved_uom_qty and product_qty
into reserved_qty on stock move line to stop mistake them with the stock
move quantities fields.

Task: 2648449
Part-of: odoo/odoo#80434
2021-12-07 16:20:06 +00:00
William Henrotin 3a1473c75c [REF] *stock*: rename move_lines into move_ids in stock.picking
closes odoo/odoo#78732

Task: 2673000
Related: odoo/enterprise#21815
Related: odoo/upgrade#2956
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2021-10-27 15:48:51 +00:00
Arnold Moyaux d21ab73d79 [FIX] stock: prevent to copy reservation on stock.move.line
Usecase:
- Product A 10 units in stock
- Do a planned transfer of 7 units to customer
- Reserve
- Do an rpc or execute code to call copy on the stock.move.line

It will result with 2 sml that have 14 units reserve and 7 units
reserved on stock.quant

It's the same result if you create twice the stock.move.line without
updating the stock.quant at the same time. However in stable we
try to only use _update_reserved_quantity on stock.move or some
override in create/write method for 'done' stock.move.line in unlock
cases.

So we never use the copy in stable and define the basic behavior as
'we don't copy the reservation' could prevent some usecase where
the update on the stock.quant is forgotten after.

closes odoo/odoo#74489

X-original-commit: e5041ee1d9b5036cab55f4332977aeb818a3b1e1
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-07-30 11:35:05 +00:00
Rémy Voet (ryv) 48f6b350a7 [REF] stock: clean onchange of stock.move
Clean onchange of `stock.move`: make it private and move in the
right place.
Also remove the action_assign_partner unused method

task-2373638
2021-01-05 08:32:05 +00:00
Arnaud Baes 0c6488a95a [REF] stock: Set action_done on pickings private
`action_done`on pickings should be a private method,
and called only trough the picking validation process.

task-1938108

closes odoo/odoo#39174

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-23 07:43:01 +00:00
Hetashree Chauhan e7e7284b86 [IMP] stock: pass tests without demo data for file test_wise_operator.
pass all test cases without any demo data.
If a user has not installed any demo data, then also test cases must not be break.

task-2024202
closes : https://github.com/odoo/odoo/pull/34258
2019-07-11 13:12:09 +00:00
Arnold Moyaux c0d7a05730 [REF] stock: _action_done and cache invalidation
`_action_done` could unlink a quant. This happens when moving a product from a
location to another one and makes null the quantity of this product in one of
theses locations. In this case, we unlink the quant because it is now useless
and could be confusing on reports based on quants.

The unwanted side effect is that unlinking a record will invalidate the cache. In
some pathologic cases, like making an inventory adjustment of 600 products
and reseting their quantity back to 0, the time of the operation is around 15
minutes. With this patch that tries to work carefully with the cache invalidation,
the same operations takes around 15 secondes.

This commit do not unlink quant anymore, instead it use a 'garbage
collector' on quants without quantity. The garbage collector is trigger
on the scheduler and when the user open the inventory view.
2018-09-18 14:53:03 +02:00
Christophe Simonis 9c77066f34 [MERGE] forward port branch saas-11.4 up to 6c103589c1 2018-09-14 16:00:17 +02:00
Christophe Simonis 87b3ca13bf [FIX] stock: correct tests to create pickings without using new() 2018-09-12 16:15:04 +02:00
William Henrotin c0794649f3 [IMP] stock: stockable term rename
"Stockable" term is not a proper english word. We change it
to"Storable"This commit is related to task ID 38933

PR:22085
TASK:38933
2018-07-26 15:21:32 +02:00
XavierDo 6a378e3839 [IMP] product: move uom in a new addon
Moves UoM models, test and data to a new addon in
order to be able to use uom without product.
A simple example is be to be able to use UoM for
timesheets.

This commit only move code, and adapt xml ids
without chaging any feature or functionnal
behavior.
Note: 'product' module now depends on new
'uom' module.
2018-02-26 14:27:26 +01:00
Pierre Masereel 86c0045bef [REF] stock,stock_account: remove function do_transfer
We removed the function do_transfer that is deprecated since Odoo 10.0

We also remove useless call of functions with context 'debug'
2018-02-05 15:54:25 +01:00
Yannick Tivisse bdbc7a6287 [IMP] stock: Convert yml file to python and xml 2017-11-16 14:49:06 +01:00