Skip to Content
Menu
v 16.0 Third Party 3321
Download for v 16.0 Deploy on Odoo.sh
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Sales (sale_management)
Discuss (mail)
Invoicing (account)
Lines of code 66
Technical Name customer_sequence
LicenseAGPL-3
Websitehttps://cybrosys.com/
Versions 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0 18.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Sales (sale_management)
Discuss (mail)
Invoicing (account)
Lines of code 66
Technical Name customer_sequence
LicenseAGPL-3
Websitehttps://cybrosys.com/
Versions 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0 18.0
Community
Enterprise
Odoo.sh

Customer Sequence

Give unique code to each customer.

Explore This Module

Overview

Now it is very easy to identify your customers with unique code. This module gives coding to the customers as well as to the supplier.

Features

Community & Enterprise Support.

Available in Odoo 14.0 Community and Enterprise.

Unique code for customers

Unique code can be given to customers and suppliers based on company.

Screenshots

Give the starting number of code.

You can give separate starting for each company if it is a multi company.

Unique code on customer

Create a customer and the code will generate automatically as defined in the company form.

Related Products

Our Services

Odoo Customization
Odoo Implementation
Odoo Support
Hire Odoo Developer
Odoo Integration
Odoo Migration
Odoo Consultancy
Odoo Implementation
Odoo Licensing Consultancy

Our Industries

Trading

Easily procure and sell your products

POS

Easy configuration and convivial experience

Education

A platform for educational management

Manufacturing

Plan, track and schedule your operations

E-commerce & Website

Mobile friendly, awe-inspiring product pages

Service Management

Keep track of services and invoice

Restaurant

Run your bar or restaurant methodically

Hotel Management

An all-inclusive hotel management application

Support

Need Help?

Got questions or need help? Get in touch.

odoo@cybrosys.com

WhatsApp

Say hi to us on WhatsApp!

+91 86068 27707

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.
There are no ratings yet!
by
MEHMET YİĞİTER
on 7/9/23, 5:30 AM

from odoo import models, fields, api



class ResPartner(models.Model):

    _inherit = 'res.partner'


    unique_id = fields.Char(string='Unique Id', help="The Unique Sequence no", readonly=True, default='/')


    @api.model_create_multi

    def create(self, values):

        res = super(ResPartner, self).create(values)

        company_seq = self.env.company

        if res.unique_id == '/':

            if company_seq.next_code:

                if company_seq.next_code

                    company_seq.write({'next_code': company_seq.next_code + 10000})

                res.unique_id =  "{}{}".format(company_seq.id,company_seq.next_code + 1)

                res.name = "[{}{}]{}".format(company_seq.id,company_seq.next_code + 1,str(res.name))

                company_seq.write({'next_code': company_seq.next_code + 1})

            else:

                res.unique_id =  "{}{}".format(company_seq.id,10000)

                res.name = "[{}{}]{}".format(company_seq.id,10000,str(res.name))

                company_seq.write({'next_code': 10001})

        return res

i found one row bug. Resolved top


by
MEHMET YİĞİTER
on 7/9/23, 5:16 AM

Odoo 16 in not working this app. I changed same code lines. I added company id and 10000+ start customer sequence number. New model code bottom




# -*- coding: utf-8 -*-

#############################################################################

#

#    Cybrosys Technologies Pvt. Ltd.

#

#    Copyright (C) 2020-TODAY Cybrosys Technologies()

#    Author: Midilaj ()

#

#    You can modify it under the terms of the GNU LESSER

#    GENERAL PUBLIC LICENSE (LGPL v3), Version 3.

#

#    This program is distributed in the hope that it will be useful,

#    but WITHOUT ANY WARRANTY; without even the implied warranty of

#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

#    GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.

#

#    You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE

#    (LGPL v3) along with this program.

#    If not, see .

#

#############################################################################


from odoo import models, fields, api



class ResPartner(models.Model):

    _inherit = 'res.partner'


    unique_id = fields.Char(string='Unique Id', help="The Unique Sequence no", readonly=True, default='/')


    @api.model_create_multi

    def create(self, values):

        res = super(ResPartner, self).create(values)

        company_seq = self.env.company

        if res.unique_id == '/':

            if company_seq.next_code:

                if company_seq.next_code

                    company_seq.write({'next_code': company_seq.next_code + 10000})

                res.unique_id =  "{}{}".format(company_seq.id,company_seq.next_code + 1)

                res.name = "[{}{}]{}".format(company_seq.id,10000,str(res.name))

                company_seq.write({'next_code': company_seq.next_code + 1})

            else:

                res.unique_id =  "{}{}".format(company_seq.id,10000)

                res.name = "[{}{}]{}".format(company_seq.id,10000,str(res.name))

                company_seq.write({'next_code': 10001})

        return res