Skip to Content
Menu
This question has been flagged

Hey Team

I'm just wondering if it is possible to update a product to track inventory after it has been previously sold as a consumable item.

We just done our stock take so we now have up-to-date numbers on all the items we have in stock.

But since we have already sold some of these products when we want to change a consumable product to a tracked product that comes up with the error that we cannot change it after a sale has been completed.

Invalid Operation

You can not change the inventory tracking of a product that was already used.

I assume the most tidy/simple method here is to duplicate the product and then archive the old one?


Thanks



Avatar
Discard

i am encountering the same can someone reply please thanks


Best Answer

hello Etter 

my suggestion is to Duplicate the Product Archive of the Old One and change the product type from Consumable to Storable Product.

Avatar
Discard
Best Answer

Hi

This is a process you can use to change product type. I got it from Thuy Ngoc, so all credits to him.

Step 1: Go to menu Settings => Technical => Actions => Server Actions.
Step 2: Create an action with the following information:
+ Name: Update product type
+ Model: Server Action
+ Action To Do: Execute Python Code
+ Python Code: env.cr.execute("""Update product_template set detailed_type = 'consu' where id = id_of_product_template """)
Step 3: Click Run

To get the ID of your product, make an export with that field. Replace "id_of_product_template" in the code with your specific number.

If you want the change product type to storable product, replace "consu" with "product".

Avatar
Discard
Best Answer

hi Stefan,

the answer you received from Rakesh is good and easy.
I f you also need to sum the sell statistics, you can try to manage them by labels on that products. Another possibility is to export all data of consumabile item, and import them in the storable one, but export/import is always more complicated option

Avatar
Discard
Best Answer

From database edit tables product template field type

Avatar
Discard
Related Posts Replies Views Activity
3
Feb 25
3549
0
Nov 24
412
2
Nov 23
1541
0
Nov 23
1018
7
Jul 24
7487