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

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
10787 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.

Registrarse
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
585
Adding Subtotal after discount in Quotation
sales discount subtotal quotation
Avatar
Avatar
Avatar
2
ago 20
7921
Multiple lines in the quotation calculator
quotation
Avatar
0
nov 25
974
Special rates for non profit organisations
discount
Avatar
Avatar
Avatar
2
sept 25
1138
Design Quotation Template with dynamic variables
quotation
Avatar
0
abr 25
3348
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.

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