← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 802526] Re: update button in new product page->real stock value creates directly a product which cannot be deleted

 

hello Sikiwawa,

I have checked your problem and found there is something missing/wrong,
I followed the steps (in webclient):
1. Created a new stockable product and saved it
2. Click of "Update" button and created inventory (this opens a new tab for inventory)
3. I go back to the tab of product and save it
4. I click on delete,
it gives me warning same as your screenshot (https://bugs.launchpad.net/openobject-addons/+bug/802526/+attachment/2182583/+files/warning-on-product-delete.JPG)

this seems a totally correct behaviour,
Creating inventory will create a stock move of that new product from inventory loss to location you specified in the update wizard,
and in stock move product_id is required field, so you can not delete that product, If you try to delete that product, it will give the warning, (I really don't understand why you want to delete a product which you just created)

Can you please provide more steps if I am missing something,

Thanks


** Changed in: openobject-addons
       Status: Fix Committed => Incomplete

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/802526

Title:
  update button in new product page->real stock value creates directly a
  product which cannot be deleted

Status in OpenERP Modules (addons):
  Incomplete

Bug description:
  I tried to create a new product of type stockable
  The real stock was set by clicking on the update button next to it
  however, the apply button opens a new webpage where it shows that the product was directly edited
  problem is that this unwanted and still-yet-to-be-edited instance cannot be deleted giving the following error:

  ERROR:db.cursor:bad query: delete from product_template where id IN (4)
  Traceback (most recent call last):
    File "/usr/local/openerp-server-6.0.2/bin/sql_db.py", line 131, in execute
      res = self._obj.execute(query, params)
  IntegrityError: null value in column "product_id" violates not-null constraint
  CONTEXT:  SQL statement "UPDATE ONLY "public"."stock_move" SET "product_id" = NULL WHERE $1 OPERATOR(pg_catalog.=) "product_id""

  Kindly note that the inventory entry corresponding to this undesired
  product instance can be successfully deleted

  platform: ubuntu
  version used: 6.0.2

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/802526/+subscriptions


References