تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
4939 أدوات العرض

I am working on a module for real estate builder. The builder has multiple sites, and each site has many flats of type 1BHK, 2BHK, etc. Each of these flats are to be sold individually. Now I have to track transactions against each flat. 

My approach is, I've created a product for each type of flat, i.e 1BHK, 2BHK, etc and entered quantity for these.  For example, 10 flats of 1BHK are to be sold.

Now my problem is that I have to create a unique identification for each flat like flat no. B607 and I have to track all the transactions for this specific flat. I'm finding it difficult to create identification for each instance of a product. Can anyone help me with the approach?

I have already tried the following but it did not help

-Creating serial numbers from Traceability in Warehouses, for each product. The serial number can be used again for other instances of the same product but I don't want this. The serial no. needs to be exhaustable. Only one flat can have one serial number. For ex. One flat once sold, can not be made available again, so the serial no. needs to get exhausted.

الصورة الرمزية
إهمال
أفضل إجابة

import random

for x in xrange(0,1500,1):
    s=int(random.random()*1000)
    if(s < 10):
        print "B"+str(s*100)

    elif(s < 100):
        print "B"+str(s*10)

    else:
        print "B"+str(s)

 

refer this eg: i created 1500 block no. with three digits.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
3
يونيو 25
1355
1
سبتمبر 23
2576
5
مارس 15
21168
2
مارس 15
11929
0
مارس 15
4459