Duplicate active product location relationship

Hi,

I thought things were going sweet but I am now getting the following error message if I try to enter new products. It wont let me complete the entry without throwing up the error message :

Failed to validate Products of Stock Location:Duplicate active product location relationship

when I hit Apply or OK.

I have tried resetting up Openvpms with Archload base and restoring to it
but inspite of all my data (900 products and the 200 clients Ive put in so far) appearing to be OK it still throws the same error if I now try to add products.

Thanks Geoff

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Duplicate active product location relationship

Hi Geoff,

It is definitely complaining about trying to add two relationships between the product and stock location but I cannot understand how this can happen in the User Interface.

Are you adding the new product in the Product Information Workspace or somewhere else ?

Cheers Tony

On 27/05/09 7:54 PM, "Geoffsim@Yahoo. Au" :

> Hi, > > I thought things were going sweet but I am now getting the following error > message if I try to enter new products. It wont let me complete the entry > without throwing up the error message : > > Failed to validate Products of Stock Location:Duplicate active product > location relationship > > when I hit Apply or OK. > > I have tried resetting up Openvpms with Archload base and restoring to it > but inspite of all my data (900 products and the 200 clients Ive put in so > far) appearing to be OK it still throws the same error if I now try to add > products. > > > Thanks Geoff > _______________________________________________ > OpenVPMS User Mailing List > users@lists.openvpms.org > To unsubscribe or change your subscription visit: > http://lists.openvpms.org/listinfo/users > Posts from this mailing list can be viewed online and replied to in the > OpenVPMS User's forum- http://tinyurl.com/openvfu

_______________________________________________ OpenVPMS User Mailing List users@lists.openvpms.org To unsubscribe or change your subscription visit: http://lists.openvpms.org/listinfo/users Posts from this mailing list can be viewed online and replied to in the OpenVPMS User's forum- http://tinyurl.com/openvfu

Duplicate active product

Hi Tony,

Yes I am trying to enter products in the Product Information Workspace.

Openvpms itself appears to be working OK in other respects. There is only the one stock location visible under administration. and I have not been trying to setup two.

Of note is that last week I noticed when printing out the Stock List there were a number of items (6 to 10) with duplicate entries - same Id number. If I looked at them under Product Info they had the same stock location listed twice and sometimes the Supplier info was listed twice(identical fields).

When entering delivered items under the Supplier Workspace these items would spit the dummy and would throw up a duplicate error. The only way to

sort it was to deactivate the stock item(couldnt delete due to relationships) and then think of another name for said item and enter it again from scratch.

I think that these items may have been generated if I tried to enter a delivery if a stock location had not been previously recorded against a product. This I think was generating the double entries under the one Id number. I thought I was able to work around it but obviously not as it seems I have stumbled on a bug.

 

Hopefully theres a way to sort it or at least salvage the data I have entered.

Much Thanks

Geoff

 

Re: Duplicate active product

Hi Geoff,

All a bit strange but we should be able to get to the bottom of it.

I am a bit perplexed though. Adding a new product should not cause any issues as there would be no stock location relationship by default unless you try and add one. This is typically unnecessary as these are added automatically when you do deliveries, sales etc in that stock location. ?

Also with the products that have had the duplicate stock locations added can you edit the product and delete the duplicate and save. ?

I think the issue may occur in deliveries as you state. If a product has a delivery and it has no current stock location relationship it will create one and set the current stock quantity to the delivered quantity. Now if you have the same product being delivered on multiple times in the same delivery (strange but could happen if you are receiving two different orders in the one delivery) then the delivery processing may try and create the relationship twice and hence the error. Could this be the case ?

Cheers Tony

On 28/05/09 9:49 AM, "Geoffsim@Yahoo. Au" :

> Hi Tony, Yes I am trying to enter products in the Product Information

> Workspace. Openvpms itself appears to be working OK in other respects. There

> is only the one stock location visible under administration. and I have not > been trying to setup two. Of note is that last week I noticed when printing

> out the Stock List there were a number of items (6 to 10) with duplicate > entries - same Id number. If I looked at them under Product Info they had the > same stock location listed twice and sometimes the Supplier info was listed > twice(identical fields). When entering delivered items under the Supplier

> Workspace these items would spit the dummy and would throw up a duplicate > error. The only way to sort it was to deactivate the stock item(couldnt delete

> due to relationships) and then think of another name for said item and enter > it again from scratch. I think that these items may have been generated if I

> tried to enter a delivery if a stock location had not been previously recorded > against a product. This I think was generating the double entries under the > one Id number. I thought I was able to work around it but obviously not as > it seems I have stumbled on a bug.

 

Hopefully theres a way to sort it or at

> least salvage the data I have entered. Much

> Thanks

Geoff   _______________________________________________

OpenVPMS User

> Mailing List

users@lists.openvpms.org

To unsubscribe or change your

> subscription visit:

http://lists.openvpms.org/listinfo/users

Posts from this

> mailing list can be viewed online and replied to in the OpenVPMS User's forum- > http://tinyurl.com/openvfu

_______________________________________________ OpenVPMS User Mailing List users@lists.openvpms.org To unsubscribe or change your subscription visit: http://lists.openvpms.org/listinfo/users Posts from this mailing list can be viewed online and replied to in the OpenVPMS User's forum- http://tinyurl.com/openvfu

Re :duplicate active product

Hi Tony,

No I couldnt edit the product and delete the duplicate it gave me error messages and closed that input screen. If I zeroed the stock removed the supplier only then (from memory) I think I could delete it but then the remaining item kept throwing up errors and all I could do was inactivate and rename.

The new name couldnt be too close either - had to shuffle the words - or it didnt

like it -couldnt understand that?.

As for double deliveries at the same time. Yes I suppose that could be possible. I entered deliveries (the order system had not been used) retrospectively dating them according to arrival date. It maybe that some items appeared twice as Pet foods seemed to often be the culprits. Is it possible that having a list of deliveries for different dates (Entered as separate deliveries) but then posting them all at once has compounded this issue? We do order Royal Canin/Hills foods every couple of days as demand can be quite high though variable so we will need to watch the entries if this is the problem.

 

Thanks Geoff

 

Re: Re :duplicate active product

Hi Geoff,

Can you send the openvpms log file to my email address. The log file can be found in the apache tomcat folder and is called openvpms-full.log if you are using 1.3 or openvpms.log if using 1.2

Yes, can have the same product name in new product as gives it a unique id ... Very strange !

Cheers Tony

On 28/05/09 11:24 AM, "Geoffsim@Yahoo. Au" :

> Hi Tony, No I couldnt edit the product and delete the duplicate it gave me

> error messages and closed that input screen. If I zeroed the stock removed the > supplier only then (from memory) I think I could delete it but then the > remaining item kept throwing up errors and all I could do was inactivate and > rename. The new name couldnt be too close either - had to shuffle the words -

> or it didnt

like it -couldnt understand that?.

As for double deliveries at the

> same time. Yes I suppose that could be possible. I entered deliveries (the > order system had not been used) retrospectively dating them according to > arrival date. It maybe that some items appeared twice as Pet foods seemed to > often be the culprits. Is it possible that having a list of deliveries for > different dates (Entered as separate deliveries) but then posting them all at > once has compounded this issue? We do order Royal Canin/Hills foods every > couple of days as demand can be quite high though variable so we will need to > watch the entries if this is the problem.

 

Thanks

> Geoff

  _______________________________________________

OpenVPMS User Mailing

> List

users@lists.openvpms.org

To unsubscribe or change your subscription

> visit:

http://lists.openvpms.org/listinfo/users

Posts from this mailing list

> can be viewed online and replied to in the OpenVPMS User's forum- > http://tinyurl.com/openvfu

_______________________________________________ OpenVPMS User Mailing List users@lists.openvpms.org To unsubscribe or change your subscription visit: http://lists.openvpms.org/listinfo/users Posts from this mailing list can be viewed online and replied to in the OpenVPMS User's forum- http://tinyurl.com/openvfu

Duplicate active product

Hi Geoff,

Thanks for sending your log files and database so we could analyse the issue.  I think we have been able to isolate what is happening.

We found 15 products that had duplicate stock location relationships.  I noticed that the duplicate relationships current stock quantities where the negative of each other so my first thought was something was amiss in the stock returns area.   I noted you had been doing delivery reversals so I concentrated there.  Unfortunately standard reversals tested fine.

We also noticed that the stock location with the -ve quantity had a start date (every relationship has a start and end date so we can maintain historical information  on them) earlier than the one with the +ve indicating it was created by reversal or return but done on an earlier date.  Tim then had the brilliant idea that we should try doing a delivery and then back dating the system clock and then doing the reversal.  Bingo .. duplicate relationships.

This is a very starnge scenario and typically you dont see system clocks being changed in this way.  Could this have happened in your case ?

Now once a duplicate relationshop has been created everytime you try and process a delivery or even create a product and manually add a stock location the system will find the duplicate and complain.  You can readily add new products (even with same name) as long as you did not add a stock location entry.

Fixing the duplicates cannot be acheived by deleting the existing duplicates on each product in the product information workspace as every duplicate has to be deleted in one go.  You can edit the relationships through the stock location products tab but this is very tedious.  The best way to rectify it is by running a sql script to delete them.  I have emailed you a script that will do this for you.

Hopefully this explains the mystery  ..

Cheers

Tony

Duplicate active product solved - system clock.

Hi Tony,

Thanks for your efforts and those of Tim . It is possible the system clocks were awry as I was having problems with my better (brought for the purpose) workstation running xp pro doing all sorts of weird things. I assembled another upspeced system from scratch and run things under win 2000. Things probably got stuffed up then.

Not sure if theres a way of warning the system clock has been changed. I recall other software that did.

I can envisage others using date/time properties to check a date or count back a puppies age and inadvertently hitting apply. Otherwise its probably worth me seeing if can prevent users from altering time settings in the system setup. Perhaps you could advise this in the setup instructions.

The auto update features of xp pro also seems to cause issues and I will disable them in future.

Once I get time I will try to get it up and running under Ubuntu or a similar linux distro as I suspect they will prove more stable/ quicker as my database grows? Obviously I use the linux versions but do I use the same version numbers as windows for mysql/tomcat.

Geoff

Re: Duplicate active product solved - system clock.

Hi Geoff,

I must admit this is the first issue of this type we have experienced so a little unusual. Despite this we will look into some defensive coding the make sure we circumvent the issue where we can.

Also typically the main database and tomcat reside on a server in the practice which tends to be more stable if managed well. Although we do have people running it on PC's and laptops as well.

I think the main benefit of Linux based installs is typically people play with them less. Mysql and Tomcat are generally the same no matter what the operating system and given you have resourced the server correctly performance is also similar.

Tomcat and Mysql versions will be similar but depends on how you download and install. Some of the automated install utilities such as yum may install different versions but typically OpenVPMS is compatible with these.

Cheers Tony

On 30/05/09 11:09 AM, "Geoffsim@Yahoo. Au" :

> Hi Tony, > Thanks for your efforts and those of Tim . It is possible the system clocks > were awry as I was having problems with my better (brought for the purpose) > workstation running xp pro doing all sorts of weird things. I assembled > another upspeced system from scratch and run things under win 2000. Things > probably got stuffed up then. > Not sure if theres a way of warning the system clock has been changed. I > recall other software that did. > I can envisage others using date/time properties to check a date or count back > a puppies age and inadvertently hitting apply. Otherwise its probably worth me > seeing if can prevent users from altering time settings in the system setup. > Perhaps you could advise this in the setup instructions. > The auto update features of xp pro also seems to cause issues and I will > disable them in future. > Once I get time I will try to get it up and running under Ubuntu or a similar > linux distro as I suspect they will prove more stable/ quicker as my database > grows? Obviously I use the linux versions but do I use the same version > numbers as windows for mysql/tomcat. > Geoff > _______________________________________________ > OpenVPMS User Mailing List > users@lists.openvpms.org > To unsubscribe or change your subscription visit: > http://lists.openvpms.org/listinfo/users > Posts from this mailing list can be viewed online and replied to in the > OpenVPMS User's forum- http://tinyurl.com/openvfu

_______________________________________________ OpenVPMS User Mailing List users@lists.openvpms.org To unsubscribe or change your subscription visit: http://lists.openvpms.org/listinfo/users Posts from this mailing list can be viewed online and replied to in the OpenVPMS User's forum- http://tinyurl.com/openvfu

Syndicate content