OK.
I know the reason:
The reason is the function is use for update but also for first
creation (if line still not exist). So delete/insert solve both
situation.
But it is possible to fix this to do "if not exist, create, else
update". It will be better.
Are you hot to develop/submit such a patch ?
Le 20/04/2012 10:33, Christophe Battarel a écrit :
I work on 3.11 but it seems to be the same in 3.2 : function
update_buyprice in fourn/class/fournisseur.product.class.php
Le 20/04/2012 10:31, Laurent Destailleur (eldy) a écrit :
There was some changes into 3.2 for supplier prices management (one
useless table less).
Do you speak about 3.2 or previous version ?
Le 20/04/2012 10:07, Christophe Battarel a écrit :
Hello,
I dont understand when you want to update a supplier price, you
delete it then recreate it in the database.
I'm developing a module for commercial margins and i wanted to
memorize the rowid of the supplier price in case it change between
propale and order;
but if the rowid change when you update a supplier price, my code
is useless.
So my question is : do you have a reason for delete and recreate
the supplier price instead of update it ?
Regards,
Christophe