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!