Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

Give numbers to Leads

Subscribe

Get notified when there's activity on this post

This question has been flagged
Leads
3 Replies
4823 Views
Avatar
Luis Beires Fernandes

Hello community, Happy 2021


At our company, we would like to give numbers to leads - Lead #1, #2 and so on, automatically. Can Odoo do that?


Thanking you in advance,


LB

0
Avatar
Discard
Luis Beires Fernandes
Author

Thank you everybody for your help with this question. Amazing the power of this community! Happy 2021!

Avatar
Manish Bohra
Best Answer

Hello, 


You can add integer filed with name of id like below:


id = fields.Integer(string="ID")


I hope it's working.


Thanks

0
Avatar
Discard
Avatar
Jack Dane
Best Answer

Hello Luis,

You would first need to create a new ID field as Manish said but for what you want to achieve there is a bit more to this. 

You would also need to create a sequence which can be seen here. The fields are pretty obvious to understand, in your case you would want a sequence size if 0 as for no padding, step of 1 and the next number would be 1 (starting number for now). Keep note of the "Sequence Code", this will be used later. This can be found in Settings->Technical->Sequences, here is my example. 

You would then need to create an automated action which will get this new number and assign it to the new field that you have created. For this, you would need to go to Settings->Technical->Automated Actions. Create a new one with the relevant fields: Model->Lead/Opportunity, Action To Do->Update the record, Trigger->On creation. Then in the One2Many select your new field set it as a Python Expression and write the value:

record.env["ir.sequence"].next_by_code("")

Now when creating a record you should be good to go. 

Hope this helps, 

Thanks, 

0
Avatar
Discard
Samuel Afonso

Hi there, can this be done in a Standard subscription database? If not, is there any workaround?

Chris TRINGHAM

Hi Samuel - this should be possible with the Standard subscription on Odoo Online (it does *not* need Studio). You need to be in Developer Mode. There's a full description here: https://odootricks.tips/sequence-document-numbering/

Samuel Afonso

I've tried it but I guess there is the need to create a new field and that won't be possible in Standard. But if you know how to do it without the creation of a field, explain it please :)

Chris TRINGHAM

My mistake, I hadn't read the answer in full. However...

It should be possible without Studio but it is more difficult. You should be able to create a field from the Technical menu and even create an Extension View to display it (I'd probably do it in a demo database using Studio and then copy the XML).

Avatar
Niyas Raphy (Walnut Software Solutions)
Best Answer

Hi,

If you need to set the sequence for the lead without any custom modules, ie from the user interface itself, you can add a new field using the developer mode and also assign a sequential value using the Automated action in Odoo.

To add a field to hold the sequence in the lead, we can do like this:  How to Add Custom Field From User Interface In Odoo

Once the field is added to the view, we need to set the auto incremental sequential value, for that you can create a automated action, for that Settings -> Technical -> Automation -> Automated Action.


See: Assign Sequential Value For Field Using Automated Action And Sequence


If yo don't want to do from ui itself, you can do it from the custom module, for that see how sequential value can be set from code in odoo: How to Add New Sequence in odoo12


Thanks

0
Avatar
Discard
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
Labels on columns in Leads listing
Leads
Avatar
Avatar
1
Nov 18
3753
"Integrating Artificial Intelligence in Odoo for Automatic Responses and CRM Opportunity Generation." Solved
integration Leads
Avatar
Avatar
Avatar
Avatar
3
Jul 25
6217
Lead/Opportunity "Source" field Solved
opportunities Leads
Avatar
Avatar
Avatar
Avatar
4
Aug 24
2627
See activities dashboard
crm Leads
Avatar
Avatar
1
Jun 24
2558
How do I convert a Mailing Contact to a Lead?
Leads MarketingAutomation
Avatar
Avatar
1
Jan 24
2743
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now