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

How to add approval workflow OpenERP 7

Suscribirse

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

Se marcó esta pregunta
securityworkflowpythonxml
1 Responder
10400 Vistas
Avatar
priyankahdp

Here shows my model class which i need to add approval work flow.

class bpl_work_update(osv.osv):
    _name = "bpl.work.update"
    _description = "BPL Work Update"
    _columns = {
        'bpl_company_id':fields.many2one('res.company', 'Company', help='Company'),
        'ref_no': fields.char('Reference No', size=10,),
        'offered_date': fields.date('Offered Date'),
        # below lines are related to work update approve Workflow (i refer hr.holidays model for )
        'state': fields.selection([('draft', 'To Submit'), ('cancel', 'Cancelled'), ('confirm', 'To Approve'), ('refuse', 'Refused'), ('validate1', 'Second Approval'), ('validate', 'Approved')],
            'Status', readonly=True, track_visibility='onchange'),
        'user_id': fields.many2one('hr.employee', 'Add records', invisible=False, readonly=True),
        'manager_id': fields.many2one('hr.employee', 'First Approval', invisible=False, readonly=True),

     }
    _defaults = {
                 'bpl_company_id':_default_company,
                 'offered_date':fields.date.context_today,
                 'state': 'draft',
                 'user_id': lambda obj, cr, uid, context: uid,
                 }

bpl_work_update()

Here shows my view.xml file (i got only lines here which are related to work flow handling )

<header>
    <button string="Approve" name="validate" states="confirm"
        type="workflow" groups="group_checkroll_user" class="oe_highlight" />
    <button string="Validate" name="second_validate" states="validate1"
        type="workflow" groups="group_checkroll_manager" class="oe_highlight" />
    <button string="Refuse" name="refuse" states="confirm,validate,validate1"
        type="workflow" groups="group_checkroll_manager" />
    <button string="Reset to New" name="set_to_draft" states="cancel,refuse"
        type="object" groups="group_checkroll_manager" />
    <field name="state" widget="statusbar" statusbar_visible="draft,confirm,validate"
        statusbar_colors='{"confirm":"blue","validate1":"blue","refuse":"red"}' />
</header>

i have no idea for how to implement this approval type work flow. i refer hr.holidays model class but unable to got clear idea about it. please help me to add level to approve my work order request. & please give me a link to refer regarding this type of work flow creating..

now that workflow buttons added to form and shows correctly.but how to handle those.? here is my screen photo

1
Avatar
Descartar
Avatar
Priyesh Solanki (pso)
Mejor respuesta

You can refer this link :

http://doc.openerp.com/v6.1/developer/07_workflows.html

You need to create a new workflow.xml file where you need to define first Workflow for which object you are creating, Different Activities that you want to show in that workflow and Different Transitions between Activities. First you refer above link, understand it and after go for developing it.

You did right thing by assigning type="workflow" in button. Here, name of button is working as a signal in transition. It means that If your flow will get the signal, It will go for checking it in transition and from transition, it will trigger the function of that activity for which, transition is created.

1
Avatar
Descartar
samba

Thank you proyesh, It's help me alot..

¿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
How to get state value when workflow tagged in Openerp?
workflow python xml
Avatar
0
mar 15
4602
Issue with Access Rules for Attachments / odoo 17 Resuelto
security python xml odoo17
Avatar
Avatar
Avatar
Avatar
Avatar
4
jun 25
3978
HR Module 'Regularised Attendances' & 'Leave Requests' Appprval flow Issue..
hr workflow python xml
Avatar
0
dic 17
6339
OpenERP Workflow (ver 7)
workflow python xml button
Avatar
Avatar
1
mar 15
9900
How to hide view.xml fields group in Account module with attr
python xml
Avatar
Avatar
Avatar
2
dic 23
13915
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