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

Horizontal Table XML

Suscribirse

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

Se marcó esta pregunta
xmlreportstablexmlviewodooV13
5142 Vistas
Avatar
Marco Vogels

Hi Odoo Users,

For one of the new reports, a Rough Order of Magnitude (ROM), I need to change the tables sideways, so rotate them 90 degrees. A small example is given above. Currently, the 'normal' table in Odoo Reports like report_saleorder_document are vertical, with a continuous line being added once a product is added. I want the exact same, just to the side. The new report is already in landscape and it will never be more than 5 products, thus it will easily fit.

The best would be an upgraded version of the already existing code within the report_saleorder_document as that is already taken valuable data from the order, I want to continue from that information.

Could anyone help me with the necessary code? You would help me so much! Thank you advance for your help.



Line Nr.Item Ref.DescriptionQuantity
1BM-001BETA Machine1,00
2BM-002ALPHA Machine1,00

to

Item Nr.12
Item Ref.BM-001BM-002
DescriptionBETA MachineALPHA Machine
Quantity1,001,00

Kind regards,

Marco


0
Avatar
Descartar
Marco Vogels
Autor

<table class="table table-sm o_main_table">
<thead style="color: rgb(277,277,277);background-color: rgb(0, 0, 0)">
<tr>

<th name="th_line" class="text-left">Line nr.</th>
<th name="th_item_number" class="text-left">Item nr.</th>
<t t-set="line_no" t-value="0"/>
<th name="th_description" class="text-left o_bold">Description</th>
<th name="th_quantity" class="text-right">Quantity</th>
<th name="th_unit" class="text-left">Unit</th>

<th name="th_priceunit" class="text-right">Unit Price</th>
<th name="th_discount" t-if="display_discount" class="text-right" groups="product.group_discount_per_so_line">
<span>Disc.%</span>
</th>
<th name="th_taxes" class="text-right">Taxes</th>
<th name="th_subtotal" class="text-right">
<t groups="account.group_show_line_subtotals_tax_excluded">Amount</t>
<t groups="account.group_show_line_subtotals_tax_included">Total Price</t>
</th>
</tr>
</thead>
<tbody class="sale_tbody">

<t t-set="current_subtotal" t-value="0"/>

<t t-foreach="doc.order_line" t-as="line">

<t t-set="current_subtotal" t-value="current_subtotal + line.price_subtotal" groups="account.group_show_line_subtotals_tax_excluded"/>
<t t-set="current_subtotal" t-value="current_subtotal + line.price_total" groups="account.group_show_line_subtotals_tax_included"/>

<tr t-att-class="'bg-200 font-weight-bold o_line_section' if line.display_type == 'line_section' else 'font-italic o_line_note' if line.display_type == 'line_note' else ''">
<t t-if="not line.display_type">

<t t-set="line_no" t-value="line_no + 1"/>
<td name="td_name"><span t-esc="line_no"/></td>
<td name="td_item_number"><span t-esc="line.product_id.default_code"/></td>
<td name="td_name"><span t-field="line.product_id.name"/>
</td>
<td name="td_quantity" class="text-right">
<span t-field="line.product_uom_qty"/>
</td>
<td name="td_uom" class="text-right">
<span t-field="line.product_uom" groups="uom.group_uom"/>
</td>

<td name="td_priceunit" class="text-right">
<span t-field="line.price_unit" t-options-widget="&quot;monetary&quot;"/>
</td>
<td t-if="display_discount" class="text-right" groups="product.group_discount_per_so_line">
<span t-field="line.discount" t-options-widget="&quot;integer&quot;"/>
</td>
<td name="td_taxes" class="text-right">
<span t-esc="', '.join(map(lambda x: (x.description or x.name), line.tax_id))">
<p></p>
</span>
</td>
<td name="td_subtotal" class="text-right o_price_total">
<span t-field="line.price_subtotal" groups="account.group_show_line_subtotals_tax_excluded"/>
<span t-field="line.price_total" groups="account.group_show_line_subtotals_tax_included"/>
</td>
</t>
<t t-if="line.display_type == 'line_section'">
<td name="td_section_line" colspan="99">
<span t-field="line.name"/>
</td>
<t t-set="current_section" t-value="line"/>
<t t-set="current_subtotal" t-value="0"/>
</t>
<t t-if="line.display_type == 'line_note'">
<td name="td_note_line" colspan="99">
<span t-field="line.name"/>
</td>
</t>
</tr>

<t t-if="current_section and (line_last or doc.order_line[line_index+1].display_type == 'line_section')">
<tr class="is-subtotal text-right">
<td name="td_section_subtotal" colspan="99">
<strong class="mr16">Subtotal</strong>
<span t-esc="current_subtotal" t-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: doc.pricelist_id.currency_id}"/>
</td>
</tr>
</t>
</t>
</tbody>
</table>

¿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
Fields from QWeb Report Shifted/Move upon updating from another version
xml qweb reports
Avatar
0
ene 25
2098
How to hide reports from print menu in odoo 14 ? Resuelto
xml reports v14
Avatar
Avatar
2
ene 23
12816
XML code on Report won't appear when you print
reports xmlview OdooV13
Avatar
0
ene 22
20
KeyError: 'account.partner.ledger'
account reports odooV13
Avatar
0
jun 21
3087
Two different reports for different companies
xml reports multicompany
Avatar
0
may 21
2544
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