Problem with address mandatory fields

Hi,
I observe a strange problem i can't solve by my self:
 
When I add an address to a customer this works great for the first time.
Then i enter a second address and this has the same city and pincode as
the first. No i can't save this second address. The frontend keeps telling me that pincode and city are mandatory.
It seems as if the system wants pincode and city to be unique: when i chnage the data in the fields to something that i haven't entered before
saving the address works.
I can also save the second address (with same pincode and city as first) after clearing the Cache.
After saving the first address i have to clear Cache, call the customer again and then enter the second address.
Now it saves the second address with same pincode and city as the first.
 
How may i solve this?
 
Thanks!
Sören
 



You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Soren,

This is a bug with the mandatory system when you use "Copy" -- it does not recognise mandatory fields.

Its fixed in the upcoming release (responsive branch).

best,
Rushabh



T: @rushabh_mehta

On 17-Jun-2013, at 1:17 PM, Sören H. Biere <Ko...@SHB-Technologie.de> wrote:

Hi,
I observe a strange problem i can't solve by my self:
 
When I add an address to a customer this works great for the first time.
Then i enter a second address and this has the same city and pincode as
the first. No i can't save this second address. The frontend keeps telling me that pincode and city are mandatory.
It seems as if the system wants pincode and city to be unique: when i chnage the data in the fields to something that i haven't entered before
saving the address works.
I can also save the second address (with same pincode and city as first) after clearing the Cache.
After saving the first address i have to clear Cache, call the customer again and then enter the second address.
Now it saves the second address with same pincode and city as the first.
 
How may i solve this?
 
Thanks!
Sören
 



You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 




You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Hi Rushabh,
 
thanks for fast reply! Just to understand you right:
 
- It should be possible to have addresses with the same city and pincode. (only should be assured to differ.)
- same city and pincode in different addresses should also be possible if pincode and city are mandatory.
- I haven't made a copy of an address during tests (alsways started with blank records).
 
Best regards,
Sören
 



You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Soren,

Are you sure you did not use copy? Yes there is no validation not to allow addresses with same pincode and city.!

https://github.com/webnotes/erpnext/blob/master/utilities/doctype/address/address.py

best,
Rushabh


T: @rushabh_mehta

On 17-Jun-2013, at 2:58 PM, Sören H. Biere <Ko...@SHB-Technologie.de> wrote:

Hi Rushabh,
 
thanks for fast reply! Just to understand you right:
 
- It should be possible to have addresses with the same city and pincode. (only should be assured to differ.)
- same city and pincode in different addresses should also be possible if pincode and city are mandatory.
- I haven't made a copy of an address during tests (alsways started with blank records).
 
Best regards,
Sören
 



You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 




You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

I always went back to the 'New Address'-Button.
To assure that ist not depending to my custom script i tried the same on your demo system
and although there different mandatory field i ran into the same problem.
 
I attached a small screencast to show what i tried.
 
I think i observed the same problem on various forms but can't remember where to repeat at the moment.
 
 
Thanks,Sören



You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Soren,

Thanks for the screencast!

The error is that the change event is not fired because the values are the same as the previous form. This is a known bug (unfortunately not recorded and works strangely)... We have fixed this in the upcoming branch - which we are testing on our own and is working mostly fine and we hope to release soon.

We were not planning to fix the current branch as the code related to form controls is very archaic and complex, so we don't want to break it. But seems like a serious bug not to fix.

Will post an update soon.

best,
Rushabh


T: @rushabh_mehta

On 17-Jun-2013, at 3:38 PM, Sören H. Biere <Ko...@SHB-Technologie.de> wrote:

I always went back to the 'New Address'-Button.
To assure that ist not depending to my custom script i tried the same on your demo system
and although there different mandatory field i ran into the same problem.
 
I attached a small screencast to show what i tried.
 
I think i observed the same problem on various forms but can't remember where to repeat at the moment.
 
 
Thanks,Sören



You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

<screen2_x264.mp4>




You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Ok,
when i remove the mandatory-flag the problem is gone.
 
 
When i add records in sequence with the same value in mandatory it throws the 'mandatory error'.
Expect for example for the address_type field: although it is mandatory it doesn't throw the mandatory error on same values.
It throws: 'Address "LKS-Test1" already exists'



You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Hi Soren,

Unfortunately this won't solve the problem. It just won't save into the database.

We have made some changes. Please update at your end and check. It should work after this.

Thanks,
Anand.

PS. You can change it back to mandatory

On 17-Jun-2013, at 3:50 PM, Sören H. Biere <Ko...@SHB-Technologie.de> wrote:

Ok,
when i remove the mandatory-flag the problem is gone.
 
 
When i add records in sequence with the same value in mandatory it throws the 'mandatory error'.
Expect for example for the address_type field: although it is mandatory it doesn't throw the mandatory error on same values.
It throws: 'Address "LKS-Test1" already exists'



You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 




You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Hey Anand,
 
Great! Thank you very much!
The failure is gone.
 
Best regards,
Sören

On Monday, June 17, 2013 12:31:26 PM UTC+2, Anand Doshi wrote:
Hi Soren,

Unfortunately this won't solve the problem. It just won't save into the database.

We have made some changes. Please update at your end and check. It should work after this.

Thanks,
Anand.

PS. You can change it back to mandatory

On 17-Jun-2013, at 3:50 PM, Sören H. Biere <Ko...@SHB-Technologie.de> wrote:

Ok,
when i remove the mandatory-flag the problem is gone.
 
 
When i add records in sequence with the same value in mandatory it throws the 'mandatory error'.
Expect for example for the address_type field: although it is mandatory it doesn't throw the mandatory error on same values.
It throws: 'Address "LKS-Test1" already exists'



You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 




You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Ah, now I remember where I saw the same problem:
i wasn't abled to make custom_fields with the same name so i transfered contents with custom script
until, one day i saw a post telling that fields with the same names on different docs should do.
Lucky this point is also fixed through your update.



You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.