Files
odoo_source/addons/stock/tests/__init__.py
T
svs-odooandsle-odoo da33eb36b8 [IMP] stock: editable quants
Made some changes in stock.quant model to allow user to modify product
quantity easier.

To allow the edition of quant without opening more permissions on the
model, we switch to sudo in create mode and write if the conditions are
met (special key in context + access rights on the current user + write
on a specific field).
Also, we have two list views for the quant:
    - The old list view who still readonly.
    - A new list view where user can create new quant or edit quantity
    of existing ones

We display the second one if user is a stock manager.
For existing quants, user can modify counted quantity (which will modify
product quantity). User can also create new quant, in this case:
    - The quant is really a new one (ex.: new product/location
    association) so will simply create a new quant.
    - A corresponding quant already exist, so will modify the existing
    quant instead of create a new one.

When an user creates a new quant, the model will check each time a
non-quantity field (product, location, SN/LN, package or owner) is
modified to see if corresponding quant exists. In this case, it'll get
the quant ID and will update reserved and on hand quantities.
If user didn't change the inventory quantity, it'll be updated too.

On product form view, the 'Update quantity' button was removed as user
can now simply modify quant with 'On Hand' stat button.

Task #1935921

Co-authored-by: sle-odoo <sle@odoo.com>
2019-05-29 13:59:01 +00:00

21 lines
573 B
Python

# -*- coding: utf-8 -*-
from . import test_stock_flow
from . import test_product
from . import test_warehouse
from . import test_stock_location_search
from . import test_quant
from . import test_quant_inventory_mode
from . import test_inventory
from . import test_move
from . import test_move2
from . import test_robustness
from . import test_packing
from . import test_packing_neg
from . import test_proc_rule
from . import test_wise_operator
from . import test_report
# TODO enable this test: error on runbot to create asset and open the iframe
# from . import test_ui