Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MASTER][IMP] Inventory Adjustment Usability #32613

Open
wants to merge 6 commits into
base: master
from

Conversation

Projects
None yet
6 participants
@svs-odoo
Copy link
Contributor

commented Apr 11, 2019

Description of the feature this PR addresses:

Improve the usability of the Inventory Adjustments and allow to easily correct a product quantity without going through an Inventory Adjustment.

See commit messages for more information.

Task #1935921

@robodoo robodoo added the CI 🤖 label Apr 11, 2019

@C3POdoo C3POdoo added the RD label Apr 11, 2019

@svs-odoo svs-odoo force-pushed the odoo-dev:master-stock-stuff-sle branch from c744d52 to 2cbdf45 Apr 11, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Apr 11, 2019

@svs-odoo svs-odoo force-pushed the odoo-dev:master-stock-stuff-sle branch from 2cbdf45 to 57ea279 Apr 12, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Apr 12, 2019

@svs-odoo svs-odoo force-pushed the odoo-dev:master-stock-stuff-sle branch from 57ea279 to 08f9fcd Apr 12, 2019

@robodoo robodoo removed the CI 🤖 label Apr 12, 2019

@svs-odoo svs-odoo force-pushed the odoo-dev:master-stock-stuff-sle branch from 08f9fcd to c45caea Apr 16, 2019

@svs-odoo

This comment has been minimized.

Copy link
Contributor Author

commented Apr 16, 2019

@sle-odoo I pushed changes you asked for in the old PR. I didn't create test for performance as inventory line's field outdated is computed now.

@robodoo robodoo added the CI 🤖 label Apr 16, 2019

@svs-odoo svs-odoo force-pushed the odoo-dev:master-stock-stuff-sle branch from c45caea to 6d52e3d Apr 17, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Apr 17, 2019

@svs-odoo svs-odoo force-pushed the odoo-dev:master-stock-stuff-sle branch from 6d52e3d to 9e0fc55 Apr 17, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Apr 17, 2019

@svs-odoo svs-odoo force-pushed the odoo-dev:master-stock-stuff-sle branch from 4879a55 to d0e2fa3 Apr 18, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Apr 18, 2019

@svs-odoo svs-odoo force-pushed the odoo-dev:master-stock-stuff-sle branch from d0e2fa3 to 1ae1c9f Apr 18, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Apr 18, 2019

@svs-odoo svs-odoo force-pushed the odoo-dev:master-stock-stuff-sle branch from 31dcee5 to 4eb703b Apr 23, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Apr 23, 2019

@svs-odoo svs-odoo force-pushed the odoo-dev:master-stock-stuff-sle branch from 88e7ed6 to 1dac51e May 16, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels May 16, 2019

@svs-odoo svs-odoo force-pushed the odoo-dev:master-stock-stuff-sle branch from 1dac51e to 83c8ecd May 17, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels May 17, 2019

@svs-odoo svs-odoo force-pushed the odoo-dev:master-stock-stuff-sle branch from 83c8ecd to 3ed661a May 17, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels May 17, 2019

@svs-odoo svs-odoo force-pushed the odoo-dev:master-stock-stuff-sle branch from 3ed661a to 1517558 May 17, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels May 17, 2019

@svs-odoo svs-odoo force-pushed the odoo-dev:master-stock-stuff-sle branch from 1517558 to f4eddcd May 20, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels May 20, 2019

@svs-odoo svs-odoo force-pushed the odoo-dev:master-stock-stuff-sle branch from f4eddcd to 6cd17c6 May 21, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels May 21, 2019

svs-odoo and others added some commits Mar 12, 2019

[IMP] *: usability of Inventory Adjustment
Change the use of Inventory Adjustment, notable changes are:

    - Removed filter field: When user creates a new inventory
    adjustment, he can set one or multiple locations and/or products.
    An inventory adjustment will worry only about defined
    locations/products, but if neither product or location was set,
    it'll manage all stock.

    - Inventory Adjustment Lines have their own view instead of be
    listed on the Inventory Adjustment form view.
    Inventory adjustment lines have new color legend:
        - Red: The quantity is outdated.
        - Blue: There is difference between the on hand quantity and the
        counted quantity.
    New inventory lines created by the user are written in bold.

    - User can't modify already existing inventory lines, except for the
    counted quantity.

    - When an inventory line is outdated, the user has the possibility
    to select and update it, that'll recompute the on hand quantity.

    - When an inventory adjustment is validated, it will take in account
    only the difference between the theoretical quantity ('On Hand
    Quantity') and the counted quantity to adjust the quants.

    - When an Inventory Adjustment generates Account Moves, user can now
    find them in a stat button in the Inventory Adjustment form view.

Also, made some changes in demo data to match new requirement.

Task #1935921
[IMP] stock: remove dynamically duplicate quant
Creation of a js_class: singleton_list.
It's used in the quant list view and its purpose is to avoid duplicate
line in list editable.

When user creates a new record, if the server responses with a ID
corresponding to a record already present in the view, it'll update the
old one instead of create a duplicate line.

Task #1935921
[IMP] *: compute to display full prod lot view
Before this commit, we had two form views for production lot: one more
complete and one simplier.
The complete one was displayed when we come from the prod lot list view,
and the simplier one in any other case.

But actually, we need to display the simplier one only with "Create and
Edit" and display the complete one in any other case, but it's
impossible to do with only two distinguish views.

So, we keep only one view with all elements and we display or hide some
fields or button in function of the context or if the record is new.

Task #1935921
[FIX] base_import: Import button at last position
In List View, the Import button is placed after the Create button.

Before this commit, in a list editable in edit mode, the Create button
is hidden and the Save & Discard buttons are displayed.
But as the Create button was placed before the Save button, the Import
button will appear at the first position.

With this commit, the Create button is now placed after the Discard
button. In this way the Import button will be always the last button and
its position will not change when we switch between edit and read modes.
[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>

@svs-odoo svs-odoo force-pushed the odoo-dev:master-stock-stuff-sle branch from 6cd17c6 to 4148fd9 May 21, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels May 21, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels May 22, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.