Ir al contenido
Odoo Menú
  • Iniciar sesión
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • PdV para tiendas
    • PdV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en vivo
    • eLearning
    Cadena de suministro
    • Inventario
    • Manufactura
    • PLM
    • Compras
    • Mantenimiento
    • Calidad
    Recursos humanos
    • Empleados
    • Reclutamiento
    • Vacaciones
    • Evaluaciones
    • Referencias
    • Flotilla
    Marketing
    • Redes sociales
    • Marketing por correo
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyectos
    • Registro de horas
    • Servicio externo
    • Soporte al cliente
    • Planeación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Artículos
    • WhatsApp
    Aplicaciones externas Studio de Odoo Plataforma de Odoo en la nube
  • Industrias
    Venta minorista
    • Librería
    • Tienda de ropa
    • Mueblería
    • Tienda de abarrotes
    • Ferretería
    • Juguetería
    Alimentos y hospitalidad
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidora de bebidas
    • Hotel
    Bienes inmuebles
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión de bienes inmuebles
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Firma contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Manufactura
    • Textil
    • Metal
    • Muebles
    • Comida
    • Cervecería
    • Regalos corporativos
    Salud y ejercicio
    • Club deportivo
    • Óptica
    • Gimnasio
    • Especialistas en bienestar
    • Farmacia
    • Peluquería
    Trades
    • Personal de mantenimiento
    • Hardware y soporte de TI
    • Sistemas de energía solar
    • Zapateros y fabricantes de calzado
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin fines de lucro
    • Agencia para la protección del medio ambiente
    • Alquiler de anuncios publicitarios
    • Fotografía
    • Alquiler de bicicletas
    • Distribuidor de software
    Descubre todas las industrias
  • Odoo Community
    Aprende
    • Tutoriales
    • Documentación
    • Certificaciones
    • Capacitación
    • Blog
    • Podcast
    Fortalece la educación
    • Programa educativo
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtén el software
    • Descargar
    • Compara ediciones
    • Versiones
    Colabora
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Conviértete en partner
    • Servicios para partners
    • Registra tu firma contable
    Obtén servicios
    • Encuentra un partner
    • Encuentra un contador
    • Contacta a un consultor
    • Servicios de implementación
    • Referencias de clientes
    • Soporte
    • Actualizaciones
    GitHub YouTube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicita una demostración
  • Precios
  • Ayuda

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

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyectos
  • MRP
All apps
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

How to customize the po number

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
5 Respuestas
19158 Vistas
Avatar
Allen Prasanth

Hi,

How to customize the PO number by adding the Company name/ Purchase location/ Project name/ Financial Year /PO number.

Eg: Heutech/India/Project-1/2018-19/PO0001

In the above i want customize the PO number , is there any possibility to fetch the field details that i defined in the app or i need to explicitly define new fields,

Thanks in Advance


Allen.. 

0
Avatar
Descartar
Avatar
Nikhil Krishnan
Mejor respuesta

Hi Prashanth Kumar,

Settings -> Technical -> Sequences and Identifiers -> Sequences

In the search bar, type "Purchase" Select the first one.


You can add prefix and suffixes.

Prefix: Fixed or date/ time-based prefix characters (Basic Odoo feature does not provide the project name and location)
Suffix: Fixed or date/ time-based suffix characters after the character.
Sequence Size: The total number of numerals in the number (padding) ie: 001 or 000001

Step: The increment used for the next number in the sequence

Next Number: The next number used for the numeric part of the sequence

Use subsequences per date_range: Allow to add the Data/time range.


UPDATED:-

you can override the CREATE function of the purchase order. and add the location and project name etc in the reference.

    @api.model
    def create(self, vals):
        if vals.get('name', 'New') == 'New':
            vals['name'] = self.env['ir.sequence'].next_by_code('purchase.order') or '/'
# Inherit this fuction and add project name and location and company name as a string before the sequence. # then change the new PO reference to the vals['name']. last return the vals, you can recreate the complete reference.
return super(PurchaseOrder, self).create(vals)

Thank you

..

2
Avatar
Descartar
Allen Prasanth
Autor

Thanks Nikhil for the response,

The above configuration i did but my requirement is that to fetch the information automatically , The example i mentioned can be defined as prefix , but if the purchasing is done from different location and for different projects what should i do , and more over the customized PO is applicable for all the projects, i want this format for a single project and the location. .... is there any way that we can fetch the project name info and Location info from the fields in coding

Thanks in Advance

Nikhil Krishnan

HI, I just update the answer it will help you.

Avatar
Rakesh Vadeghar
Mejor respuesta
do this in py

@api.model def create(self, vals): if vals.get('name', 'New') == 'New':
            if location == "location_1":      vals['name'] = self.env['ir.sequence'].next_by_code('purchase.order')
            if location == 'location_2'
                vals['name'] = self.env['ir.sequence'].next_by_code('purchase.order.location') 

return super(PurchaseOrder, self).create(vals)

class purchaseorderlocation(models.Model):
    _inherit = 'purchase.order'
    _name = purchase.order.location

    seq = fields.Char('')

put this purchase/data/purchase_data.xml
<record id="sequence_PO" model="ir.sequence">
<field name="name">purchase order</field>
<field name="code">purchase.order.location</field>
<field name="prefix">PO or Purchase order</field> #prefix of the doc
<field name="padding">5</field>
<field name="number_next">1</field>
<field name="number_increment">1</field>
</record>

0
Avatar
Descartar
Allen Prasanth
Autor

Thanks Rakesh,

But After editing all the above on Purchse.py it is showing "The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application"

Can explain what might be the problem...... an moreover unable to login to the home screen. This i installed locally.

Thanks in advance.

Avatar
Mayank Gosai
Mejor respuesta

Hello Prashanth, 

          To Change Sequences goto settings and update with your required pattern:

                    Settings -> Technical -> Sequences & Identifiers -> Sequences

 For more details, please visit:  

https://www.odoo.com/en_US/forum/aide-1/question/how-do-i-change-the-format-of-purchase-order-numbers-ie-poxxxxx -to- something- else- 129797

Hope it helps you.
Thanks,
Mayank Gosai


0
Avatar
Descartar
¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Registrarse
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento en Odoo.sh
  • Soporte
  • Actualizaciones del software
  • Desarrollos personalizados
  • Educación
  • Encuentra un contador
  • Encuentra un partner
  • Conviértete en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contáctanos
  • Empleos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Legal • Privacidad
  • Seguridad
الْعَرَبيّة 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 es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y estar totalmente integrado.

Sitio web hecho con

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