Odoo Help


How to create unique parts serial number

Arjun Khode
on 1/19/15, 6:03 AM 1,099 views

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.

Demirel yakito
On 1/19/15, 7:46 AM

import random

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

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

        print "B"+str(s)


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

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 1/19/15, 6:03 AM
Seen: 1099 times
Last updated: 3/16/15, 8:10 AM