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

customize website portal sale template V10

Suscribirse

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

Se marcó esta pregunta
templatesportalwebsiteodoo10
2 Respuestas
8078 Vistas
Avatar
Alvin

Hi

please how to customize (add a new menu after quote) website portal sale template ? which method to use ?

i tried to add my code in the in website_portal_sale_templates.xml by copying existing code and modified it. but i get no change. :

<template id="portal_my_orders" name="My Sales Orders 1">
      <t t-call="website_portal.portal_layout">
        <h3 class="page-header">Your Orders 1</h3>
        <t t-if="not orders">
            <p>There are currently no orders for your account.</p>
        </t>
        <t t-if="orders">
            <table class="table table-hover o_my_status_table">
                <thead>
                  <tr class="active">
                    <th>numero #</th>
                    <th>numero 2 #</th>
                    <th>Order Date</th>
                    <th></th>
                    <th>Total</th>
                  </tr>
                </thead>
                <t t-foreach="orderrs" t-as="orderr">
                    <tr>
                        <td>
                            <a t-attf-href="/my/orderrs/{{orderr.id}}?{{keep_query()}}"><t t-esc="orderr.name"/></a>
                        </td>
                         <td>
                            <a t-attf-href="/my/orderrs/{{orderr.id}}?{{keep_query()}}"><t t-esc="orderr.id"/></a>
                        </td>
                        <td><span t-field="orderr.date_order"/></td>
                        <td>
                            <t t-if="orderr.state == 'progress'">
                                <span class="label label-info"><i class="fa fa-fw fa-clock-o"/> Invoiced</span>
                            </t>
                            <t t-if="orderr.state in ['shipping_except','invoice_except']">
                                <span class="label label-danger"><i class="fa fa-fw fa-warning"/> Problem</span>
                            </t>
                            <t t-if="orderr.state == 'done'">
                                <span class="label label-default"><i class="fa fa-fw fa-check"/> Done</span>
                            </t>
                        </td>
                        <td><span t-field="orderr.amount_total" t-options='{"widget": "monetary", "display_currency": order.pricelist_id.currency_id}'/></td>
                    </tr>
                </t>
            </table>
            <div t-if="pager" class="o_portal_pager text-center">
              <t t-call="website.pager"/>
            </div>
        </t>
      </t>
    </template>



Please help me.


regards

0
Avatar
Descartar
Avatar
Tintuk Tomin
Mejor respuesta

The below code should is the xml code


<template id="new_link" name="New Link" inherit_id="website_portal.portal_layout" priority="25">
    <xpath expr="//ul[contains(@class,'o_portal_submenu')]" position="inside">
        <li>
            <a href="/my/newlink">New Menu</a>
        </li>
    </xpath>
</template>


The above code is used to create a new menu in the portal view of odoo 10. Also you want to create a new python function in the controller for creating the action. What to do on clicking on this new menu, with the link /my/newlink


For example

class CustomerPortal(CustomerPortal):

    @http.route(['/my/newlink', '/my/quotes/page/<int:page>'], type='http', auth="user", website=True)
    def portal_my_records(self, page=1, date_begin=None, date_end=None, sortby=None, **kw):
        
        print("IN PYTHON CONTROLLER")
        data={}
        return request.render("call.template", data)

When you click on the New menu in the portal page the python function will execute. and from here you can pass the controll to another template. in the above code call.template is the template name and data is the values that you need to pass into that particular template.


If you want to create a new menu in the portal page of odoo 11 refer the below link.

https://stackoverflow.com/questions/52733625/how-to-add-my-custom-menu-to-the-portal-users-menu-list



0
Avatar
Descartar
Avatar
FG
Mejor respuesta

typo orderr maybe. If you have an order as in <t t-if="orders"> you still have no orderr and nothing is displayed

0
Avatar
Descartar
¿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
Projects/Tasks not showing in Portal for User in Odoo 10 Resuelto
project portal website odoo10
Avatar
Avatar
2
sept 22
10561
How can I activate signup on website in Odoo 10 Resuelto
portal signup website odoo10
Avatar
Avatar
2
mar 17
11694
How to set date format in datepicker in the portal template? Resuelto
portal template datepicker website odoo10
Avatar
Avatar
Avatar
2
ago 23
18992
Error after changing some fields in 'my details' page.
portal website
Avatar
Avatar
1
ene 23
2844
How to print/Download report from website ? Resuelto
website odoo10
Avatar
Avatar
Avatar
5
feb 24
25299
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