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

State statusbar in form view alligns left

Suscribirse

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

Se marcó esta pregunta
xmlstatestatusbarhelpdesk
1 Responder
7899 Vistas
Avatar
Kris Coenen

I've added alternet statusbar in the form view for helpdesk. The Statusbar works perfactly but it is alligned to the left after the buttuns and not on the right side of the header how do i solve this. Here is my code

helpdesk.py

from openerp.osv import osv, fields

class helpdesk(osv.Model):

_inherit = 'crm.helpdesk'

_columns = {
    'category' : fields.selection([('opsturen','Opsturen'),('ter_plaatse','Ter plaatse herstellen')],'categorie',states={'draft': [('readonly', False)], 'verwacht': [('readonly', True)], 'inplannen': [('readonly', True)], 'toegekomen': [('readonly', True)], 'ingepland': [('readonly', True)], 'offerte': [('readonly', True)], 'afgekeurd': [('readonly', True)], 'pending': [('readonly', True)], 'hersteld': [('readonly', True)], 'done': [('readonly', True)], 'cancel': [('readonly', True)]}),
    'dienst' : fields.many2one('sn_helpdesk.dienst','Dienst'),
    'state': fields.selection((('draft','Concept'),('verwacht','Toestel wordt verwacht'),('inplannen','Inplannen technieker'),('toegekomen','Toestel toegekomen'),('ingepland','Technieker ingepland'),('offerte','Offerte'),('afgekeurd','Afgekeurd'),('pending','In herstelling'),('hersteld','Hersteld'),('afgeleverd','Afgeleverd'),('factuur','Factureren'),('done','afgehandeld'),('cancel','geannuleerd')),'status helpdesk'),
    'offerte_id': fields.many2one('sale.order','offerte'),
    'invoice_id': fields.many2one('account.invoice','factuur'),
    'calendar_id': fields.many2one('crm.meeting','inplannen', states={'draft': [('invisible', True)], 'verwacht': [('invisible', True)], 'inplannen': [('invisible', False)], 'toegekomen': [('invisible', True)], 'ingepland': [('invisible', False)], 'offerte': [('invisible', False)], 'afgekeurd': [('invisible', False)], 'pending': [('invisible', False)], 'hersteld': [('invisible', False)], 'done': [('invisible', False)], 'cancel': [('invisible', False)]}),
    'tel_from': fields.char('Telefoon'),
    }

helpdesk()

helpdesk.xml

<?xml version="1.0" encoding="UTF-8"?>

<openerp> <data>

    <record id="base_helpdesk_category_view" model="ir.ui.view">
        <field name="name">helpdesk categorie</field>
        <field name="model">crm.helpdesk</field>
        <field name="inherit_id" ref="crm_helpdesk.crm_case_form_view_helpdesk"/>
        <field name="arch" type="xml">

            <header position="replace">

                <button string="toestel verwacht" type="object" name="action_helpdesk_verwacht" class="oe_highlight" states="draft"/>
                <button string="technieker inplannen" type="object" name="action_helpdesk_inplannen" class="oe_highlight" states="draft"/>
                <button string="toegekomen" type="object" name="action_helpdesk_toegekomen" class="oe_highlight" states="verwacht"/>
                <button string="technieker ingepland" type="object" name="action_helpdesk_ingepland" class="oe_highlight" states="inplannen"/>
                <button string="Offerte" type="object" name="action_helpdesk_offerte" class="oe_highlight" states="toegekomen,ingepland"/>
                <button string="In herstelling" type="object" name="action_helpdesk_herstelling" class="oe_highlight" states="offerte"/>
                <button string="hersteld" type="object" name="action_helpdesk_hersteld" class="oe_highlight" states="pending"/>
                <button string="Afgeleverd" type="object" name="action_helpdesk_afgeleverd" class="oe_highlight" states="hersteld"/>
                <button string="Factureren" type="object" name="action_helpdesk_factureer" class="oe_highlight" states="afgeleverd"/>
                <button string="Afgehandeld" type="object" name="action_helpdesk_done" class="oe_highlight" states="factuur"/>
                <button string="terug naar Concept" type="object" name="action_helpdesk_draft" class="oe_highlight" states="cancel"/>

                <button string="annuleren" type="object" name="action_helpdesk_annuleren" states="draft,verwacht,inplannen,toegekomen,ingepland,offerte,afgekeurd,pending,hersteld,afgeleverd,done"/>


                <field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,offerte,done"/>
            </header>


            <field name="channel_id" position="after">
                <field name="category"/>
            </field>

            <field name="section_id" position="replace">
                <field name="dienst"/>
                <field name="offerte_id" states="toegekomen,ingepland,offerte,pending,hersteld,afgeleverd,done"/>
                <field name="invoice_id" states="hersteld,afgeleverd,done"/>
            </field>

            <field name="partner_id" position="replace">
                <field name="partner_id" on_change="onchange_partner_id_helpdesk(partner_id,email_from,tel_from)"/>
            </field>

            <field name="email_from" position="after">µ
                <field name="tel_from"/>
                <field name="calendar_id"/>
            </field>

        </field>
    </record>

</data>

</openerp>

how do i resolve the issue with the statusbar

sincerily

Kris

0
Avatar
Descartar
Avatar
ZEeineb
Mejor respuesta

Hi Kris,

Try to do so:

in your xml file:

<xpath expr="//form/sheet" position="before">
        <header>
            <button string="toestel verwacht" type="object"
            name="action_helpdesk_verwacht" class="oe_highlight" states="draft" />
            <button string="technieker inplannen" type="object"
            name="action_helpdesk_inplannen" class="oe_highlight" states="draft" />
            <button string="toegekomen" type="object"
            name="action_helpdesk_toegekomen" class="oe_highlight" states="verwacht" />
            <button string="technieker ingepland" type="object"
            name="action_helpdesk_ingepland" class="oe_highlight" states="inplannen" />
            <button string="Offerte" type="object" name="action_helpdesk_offerte"
            class="oe_highlight" states="toegekomen,ingepland" />
            <button string="In herstelling" type="object"
            name="action_helpdesk_herstelling" class="oe_highlight" states="offerte" />
            <button string="hersteld" type="object" name="action_helpdesk_hersteld"
            class="oe_highlight" states="pending" />
            <button string="Afgeleverd" type="object"
            name="action_helpdesk_afgeleverd" class="oe_highlight" states="hersteld" />
            <button string="Factureren" type="object"
            name="action_helpdesk_factureer" class="oe_highlight" states="afgeleverd" />
            <button string="Afgehandeld" type="object" name="action_helpdesk_done"
            class="oe_highlight" states="factuur" />
            <button string="terug naar Concept" type="object"
            name="action_helpdesk_draft" class="oe_highlight" states="cancel" />
            <button string="annuleren" type="object" name="action_helpdesk_annuleren"  states="draft,verwacht,inplannen,toegekomen,ingepland,offerte,afgekeurd,pending,hersteld,afgeleverd,done" />
            <field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,offerte,done" />
        </header>
</xpath>

in your python file:

'state': fields.selection([
                            ('draft', 'Concept'),
                            ('verwacht', 'Toestel wordt verwacht'),
                            ('inplannen', 'Inplannen technieker'),
                            ('toegekomen', 'Toestel toegekomen'),
                            ('ingepland', 'Technieker ingepland'),
                            ('offerte', 'Offerte')
                            , ('afgekeurd', 'Afgekeurd'),
                            ('pending', 'In herstelling'),
                            ('hersteld', 'Hersteld'),
                            ('afgeleverd', 'Afgeleverd'),
                            ('factuur', 'Factureren'),
                            ('done', 'afgehandeld'),
                            ('cancel', 'geannuleerd'), ], 'status helpdesk'),
1
Avatar
Descartar
ZEeineb

See more at: [http://www.zbeanztech.com/blog/tags-used-openerp-70#sthash.VfgiA

Kris Coenen
Autor

Didn't work for me statusbar is still on the left

ZEeineb

Hi Kris , I have edited the answer . Try to follow it. I hope it works now.

Kris Coenen
Autor

now it works thanks

¿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
File Changes Not Working in OpenERP
xml helpdesk
Avatar
Avatar
Avatar
2
mar 15
8618
Buttons does not appear in the status bar ????
xml statusbar python2.7
Avatar
Avatar
2
mar 15
7249
statusbar refuses to be colored Resuelto
stages state statusbar
Avatar
Avatar
Avatar
Avatar
3
ene 24
16882
How change the value of statusbar_visible in function of status value ?
xml v7 statusbar
Avatar
0
mar 15
8307
How to change the order of status bar states in Odoo 18 after adding a new state, without override the field?
state statusbar Selection selectionfield
Avatar
1
ene 25
4932
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