Ir al contenido
Odoo Menú
  • Identificarse
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • TPV para tiendas
    • TPV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en directo
    • eLearning
    Cadena de suministro
    • Inventario
    • Fabricación
    • PLM
    • Compra
    • Mantenimiento
    • Calidad
    Recursos Humanos
    • Empleados
    • Reclutamiento
    • Ausencias
    • Evaluación
    • Referencias
    • Flota
    Marketing
    • Marketing social
    • Marketing por correo electrónico
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyecto
    • Partes de horas
    • Servicio de campo
    • Servicio de asistencia
    • Planificación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Información
    • WhatsApp
    Aplicaciones de terceros Studio de Odoo Plataforma de Odoo Cloud
  • Industrias
    Comercio al por menor
    • Librería
    • Tienda de ropa
    • Tienda de muebles
    • Tienda de ultramarinos
    • Ferretería
    • Juguetería
    Alimentación y hostelería
    • Bar y taberna
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidor de bebidas
    • Hotel
    Inmueble
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión inmobiliaria
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Empresa contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Fabricación
    • Textil
    • Metal
    • Muebles
    • Alimentos
    • Brewery
    • Regalos de empresas
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Terapeutas
    • Farmacia
    • Peluquería
    Oficios
    • Handyman
    • Hardware y asistencia informática
    • Sistemas de energía solar
    • Zapatero
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin ánimo de lucro
    • Agencia de protección del medio ambiente
    • Alquiler de paneles publicitarios
    • Estudio fotográfico
    • Alquiler de bicicletas
    • Distribuidor de software
    Browse all Industries
  • Comunidad
    Aprender
    • Tutoriales
    • Documentación
    • Certificaciones
    • Formación
    • Blog
    • Podcast
    Potenciar la educación
    • Programa de formación
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtener el software
    • Descargar
    • Comparar ediciones
    • Versiones
    Colaborar
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Convertirse en partner
    • Services for Partners
    • Registrar tu empresa contable
    Obtener servicios
    • Encontrar un partner
    • Encontrar un asesor fiscal
    • Contacta con un experto
    • Servicios de implementación
    • Referencias de clientes
    • Ayuda
    • Actualizaciones
    GitHub YouTube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicitar 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
  • Proyecto
  • 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

Invoice product warning

Suscribirse

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

Se marcó esta pregunta
invoicingwarning
6 Respuestas
4531 Vistas
Avatar
Javier Murcia Díaz

¿Its possible to raise a warning when adding a product to an invoice?

This functionality is currently working fine in the sales module. If i create a quotation, and add a product with a warning configured, the message is displayed. However, in the invoicing module, nothing happens.

This only happens with products, if i set a warning in a partner, this works fine.

Version: 11.0CE

1
Avatar
Descartar
faOtools

Hi, have a look at this paid solution - https://apps.odoo.com/apps/modules/11.0/smart_warnings/. It let configure almost any sort of warnings for any document

Javier Murcia Díaz
Autor

Thanks for the suggestion! However if a user validates the invoice without saving it prior, will the warning be displayed before the invoice confirmation?

Anyway, i'll keep in mind the plugin for other projects.

faOtools

Yes, warnings are regretfully shown only after reloading (after saving or refreshing a page, e.g.)

Avatar
Caret IT Solutions Pvt. Ltd.
Mejor respuesta

Hello, 

Currently in Odoo warning on the onchange product is available for the only sale.order  (Sale module). It is not raised when you change the product in account.invoice.  Generally in Odoo invoice is created from sale.order so they are not put this option in invoicing. 

So to raise a warning on adding a product to an invoice you have to call the onchange method of product in account.invoice and raise warning.

you can refer the below method in sale module sale.py : 1002:

@api.multi

    @api.onchange('product_id')

    def product_id_change(self):

        if not self.product_id:

            return {'domain': {'product_uom': []}}


        vals = {}

        domain = {'product_uom': [('category_id', '=', self.product_id.uom_id.category_id.id)]}

        if not self.product_uom or (self.product_id.uom_id.id != self.product_uom.id):

            vals['product_uom'] = self.product_id.uom_id

            vals['product_uom_qty'] = 1.0


        product = self.product_id.with_context(

            lang=self.order_id.partner_id.lang,

            partner=self.order_id.partner_id.id,

            quantity=vals.get('product_uom_qty') or self.product_uom_qty,

            date=self.order_id.date_order,

            pricelist=self.order_id.pricelist_id.id,

            uom=self.product_uom.id

        )


        result = {'domain': domain}


        title = False

        message = False

        warning = {}

        if product.sale_line_warn != 'no-message':

            title = _("Warning for %s") % product.name

            message = product.sale_line_warn_msg

            warning['title'] = title

            warning['message'] = message

            result = {'warning': warning}

            if product.sale_line_warn == 'block':

                self.product_id = False

                return result


        name = product.name_get()[0][1]

        if product.description_sale:

            name += '\n' + product.description_sale

        vals['name'] = name


        self._compute_tax_id()


        if self.order_id.pricelist_id and self.order_id.partner_id:

            vals['price_unit'] = self.env['account.tax']._fix_tax_included_price_company(self._get_display_price(product), product.taxes_id, self.tax_id, self.company_id)

        self.update(vals)


        return result


If you want more help you can contact us.

Thank You.

0
Avatar
Descartar
Avatar
Niyas Raphy (Walnut Software Solutions)
Mejor respuesta

Hi,

It seems you are looking for something  in invocing like raise a warning if the selected product is out of stock. As you know by default this is there in the sale order but the same is not there in the invoice.

In the invoicing the product is not a required field. If you need the same functionality of the sale in invoicing, you can copy the onchange function in the sale which raise the warning to invoicing.


Thanks

0
Avatar
Descartar
Javier Murcia Díaz
Autor

No, i'm not looking to an out of stock warning, i'm looking to a configurable warning in the product, so if a user adds the product to the invoice, the warning is displayed (just like the sales order function).

It's because we do an activity which sometimes is taxed, and sometimes no, so the warning serves as a reminder so the correct taxes are applied.

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

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

Inscribirse
Publicaciones relacionadas Respuestas Vistas Actividad
Odoo 14 add warning to an invoice if condition has not been met.
invoice invoicing warning
Avatar
0
ene 23
2471
Lines Disappearing on Invoices after save
invoicing
Avatar
1
abr 25
137
Sending an invoice always sends an electronic invoice also. Don't want to send electronic invoice.
invoicing
Avatar
0
nov 24
2558
Mexican Invoice where to enter SAT Unit of Measure
invoicing
Avatar
0
mar 23
2995
Percentage Invoicing
invoicing
Avatar
Avatar
1
mar 23
4301
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento Odoo.sh
  • Ayuda
  • Actualizar
  • Desarrollos personalizados
  • Educación
  • Encontrar un asesor fiscal
  • Encontrar un partner
  • Convertirse en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contacta con nosotros
  • Puestos de trabajo
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Información 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 totalmente integrado.

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