Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
4974 Ansichten

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.

Avatar
Verwerfen
Beste Antwort

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.

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
3
Juni 25
1404
1
Sept. 23
2641
5
März 15
21197
2
März 15
11964
0
März 15
4476