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

How to create custom crm_lead field based on next available sequence for each customer?

Subscribe

Get notified when there's activity on this post

This question has been flagged
developmentcrm_lead
2 Replies
4830 Views
Avatar
Rogério

Hello all,

 

I need to create a custom field for the Opportunities on “crm_lead” on Odoo V7

 

ABB.CC.DD

 

Where:

A = Company Id from res_partner.

BB = year last two digits.

CC = Customer Id from res_partner.

DD = Sequence Opportunities for the specific Customer.

 

Example :

 

A

1 My-Company New York

2 My-Company Los Angeles

3 My-Company Boston

 

BB

13 Year 2013

14 Year 2014

15 Year 2015

 

CC

43 Customer-A

44 Customer-B

45 Customer-C

 

Lets say we Have a data base with the entries:

 

114.43.01

114.43.02

114.44.01

114.45.01

 

Now I will create a new Opportunity entry, when I click “Save” it will check the next number available for the Customer.

 

For the Customer-A it will be: 114.43.03

For the Customer-B it will be: 114.44.02

For the Customer-C it will be: 114.45.02

 

Then, the new data base will be:

 

114.43.01

114.43.02

114.44.01

114.45.01

114.43.03

114.44.02

114.45.02

 

If I create new entries for “My-Company Boston” it will create the numbers:

 

For the Customer-A it will be: 314.43.01

For the Customer-B it will be: 314.44.01

For the Customer-C it will be: 314.45.01

 

Then, the new data base will be:

 

114.43.01

114.43.02

114.44.01

114.45.01

114.43.03

114.44.02

114.45.02

314.43.01

314.44.01

314.45.01

 

Thanks for any help!

0
Avatar
Discard
Avatar
Nhomar Hernandez
Best Answer

Leads don't have this by default, you should overwrite with a custom module + an special sequence.

0
Avatar
Discard
Rogério
Author

Thanks for answer. I understand that I have to write the code, but I d on't know the best way to do it. Should I create a new table with the entries or use the existing table and just filter and count the entries. If someboy has an similar example it will help me alot. Thanks

Mariano Rodrigo

Nhomar, Perdoneme, y perdone tambien por escribir en castellano, pero es que me es mas sencillo. Usted sabe si campos personalizados que son creados en el formulario de Leads, cuando este se convierte en Customer, ¿se pueden llevar esos datos de forma automatica revisando alguna característica de Odoo o bien hay que progrmar?

OdooBot

Hay que programas

On Nov 25, 2014 2:43 PM, "Mariano Rodrigo" <mariano1800@gmail.com> wrote:

Nhomar, Perdoneme, y perdone tambien por escribir en castellano, pero es que me es mas sencillo. Usted sabe si campos personalizados que son creados en el formulario de Leads, cuando este se convierte en Customer, ¿se pueden llevar esos datos de forma automatica revisando alguna característica de Odoo o bien hay que progrmar?

--
Mariano Rodrigo
Sent by Odoo S.A. using Odoo about Forum Post False
Avatar
Rogério
Author Best Answer

Thanks for answer. I understand that I have to write the code, but I d

on't know the best way to do it. Should I create a new table with the entries or use the existing table and just filter and count the entries.

If someboy has an similar example it will help me alot.

Thanks

0
Avatar
Discard
Yogesh

you don't have to create a new table, you need to overwrite "create" method of 'crm.lead' class.

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
Oddo Integration with Intune
development
Avatar
0
Dec 25
1558
@guia@¿Cómo hablar con una persona en Air France?
development
Avatar
0
Dec 25
2
How do I change the name of the module, or rather the name assigned to the module, after I created it in Odoo Studio?
development
Avatar
Avatar
1
Dec 25
445
Feature Request: Native “Dialog Filters” in Search Panel
development
Avatar
0
Nov 25
184
Solution to the Getting Started tutorial from the official Odoo 16 documentation
development
Avatar
Avatar
Avatar
2
Nov 25
1574
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