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

[17.0][MIG] product_quantity_update_force_inventory #2042

Conversation

AnaisLForgeFlow
Copy link

Migration to v17.0:

The stock.inventory model and related inventory form views have been deprecated and are no longer available. This migration adapts the module by redirecting to the inventory adjustment view 'view_stock_quant_tree_inventory_editable' while filtering by the specific product.

@ForgeFlow

@rousseldenis
Copy link
Contributor

/ocabot migration product_quantity_update_force_inventory



class TestStockQuantEditableViewBlock(TransactionCase):
def setUp(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you change this to class method?

for this product, instead of driving the user to update the quantities
in the stock quants.

By doing this users will be able to have full traceability on the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering what is the difference with standard flow as:

  • If you update the quantity through quants, you'll get the move name with 'Quantity updated'-like message
  • If you use the Action, you can add a reason:
    image

image

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it is stated in this pull request #846, this module was created to force users to create inventory adjustments instead of directly updating quantities on the product card but since the stock.inventory is no longer available, now it is not possible to start inventory adjustments without updating quantities. Given these changes, I adapted the module to redirect users to the inventory adjustment view filtered by the product when they initiate a quantity update. However, I recognize that this adaptation does not fully replicate the original functionality of the module.
Since the module has lost its original purpose, what do you think it would be appropiate to do with it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I know the drawback of not using inventory lines anymore.

But, IMHO, we should try not duplicating existing functionalities as it can add confusion for users, add an additional entry point to do the same thing.

I would say, something has to be done on the actions visible on stock quant view (in inventory mode):

image

For that 'Apply' action, something should be done to display the reason popup too if needed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact your functionality is not needed anymore. Odoo has managed that well. If you don't have 'Storage Locations' enabled on settings, the popup will be launched as there is only 1 location (Stock). That popup is launched if you click on the magic button 'On Hand' in the product form.

If you enable 'Storage Locations' setting, you are both redirected to the stock quant view.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, i agree with you. I will be closing this PR as it is not needed anymore.
Thank you for your cooperation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AnaisLForgeFlow The only missing feature is to be able to add a reason for one line (the Apply button on the line)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the feature that you mean is what is being added in the stock_change_qty_reason module, right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants