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
    • Conocimientos
    • 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

Hide discounts on order lines on quotations/invoices?

Suscribirse

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

Se marcó esta pregunta
discountquotationinvisible
1 Responder
10785 Vistas
Avatar
Wolfgang Steuer

Hi there,

I'm testing openerp since two weeks now and almost everything is fine so that we can use it in our company except for one fact:

I enabled "group_discount_per_so_line" in settings/sale. I created a quotation which has different discounts on certain order lines.

But when I print now the quotation, the user will see their discounts, which (in certain cases) should not be visible to the customer because our company sometimes gives negative discounts for certain customers.

The only way I found out to remove discounts, was to completely remove it from the report file (rml).

Another way I tried was to add another print action to the form with a different rml file which then shows the discounts again. But I does not matter which print button I use, it always takes the original rml report file.

I took a look in the code of the sale module, and it looks like, as soon as I enable per order line discounts, they will be visible in the report, no matter what.

When I use pricelists, I can say "visible discounts", when I uncheck this, this is only valid for pricelist discounts :(.

Is there a way to read this value "visible discounts" in the rml file, so that I can hide the per order line discounts as well?

Did anybody implement a (working) selection to print quotations with different rml files?

Thanks a lot!

My solution:

  1. I enabled developer mode (About OpenERP/Enable developer mode)
  2. I added a boolean field called "x_show_discounts" to sale.order
  3. I changed the rml of sale.order to check this field and if true, display discount otherwise hide it and reduce single prices:

...
<para style="terp_default_Right_9">[[ not o.x_show_discounts and formatLang(line.price_unit * (1 - line.discount / 100) , digits=get_digits(dp='Product Price')) or formatLang(line.price_unit , digits=get_digits(dp='Product Price'))]]</para>
...
<para style="terp_default_Centre_9">[[ o.x_show_discounts and formatLang(line.discount, digits=get_digits(dp='Discount')) or '']]</para>
...

The "line.price_unit * (1 - line.discount / 100)" is needed, otherwise the customer could calculate and see the discount again ...

Cheers

0
Avatar
Descartar
Avatar
Brett Lehrer
Mejor respuesta

You might want to try two completely separate reports (not just multiple RML files), and select between them based on what a particular field is set to. A good example of this is in the account_check_printing module:

http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/view/head:/account_check_writing/account_voucher.py

Check around line 61, the print_check function. So basically create a new module to inherit sale.order and add in a second report to hide the discounts and a boolean field on the partner to hide or unhide discounts in quotations. Then overwrite the report generating action with a button to check that partner and forward to the corresponding report.

0
Avatar
Descartar
Wolfgang Steuer
Autor

That sounds good. I will try it this weekend and keep you updated with my solution! Thx

Wolfgang Steuer
Autor

I solved it in a different way, see my answer

¿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
Edit the Final Price in quotation lines and automatically update the discount Resuelto
accounting discount quotation
Avatar
Avatar
1
oct 25
579
Adding Subtotal after discount in Quotation
sales discount subtotal quotation
Avatar
Avatar
Avatar
2
ago 20
7918
Multiple lines in the quotation calculator
quotation
Avatar
0
nov 25
973
Special rates for non profit organisations
discount
Avatar
Avatar
Avatar
2
sept 25
1137
Design Quotation Template with dynamic variables
quotation
Avatar
0
abr 25
3347
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