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

Not Having New State in...Odoo7?

Suscribirse

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

Se marcó esta pregunta
customizationopenerp7odoo
1 Responder
4462 Vistas
Avatar
Mazhar Iqbal Rana

... In openerp7

I want my new state to show up in sale module ... But it is not appearing
Pls have a look at code below

In sale.py module I added state like:

    class Sale_order(osv.Model):

    _inherit = 'sale.order'

    _columns = {
        'state': fields.selection([
            ('draft', 'Draft Quotation'),
            ('my_new_state', 'My New State'),
            ('sent', 'Quotation Sent'),
            ('cancel', 'Cancelled'),
            ('waiting_date', 'Waiting Schedule'),
            ('progress', 'Sales Order'),
            ('manual', 'Sale to Invoice'),
            ('invoice_except', 'Invoice Exception'),
            ('done', 'Done'),
            ], 'Status', readonly=True, track_visibility='onchange',
            help="Gives the status of the quotation or sales order. \nThe exception status is automatically set when a cancel operation occurs in the processing of a document linked to the sales order. \nThe 'Waiting Schedule' status is set when the invoice is confirmed but waiting for the scheduler to run on the order date.", select=True),
    }

And in sale_view.xml, I added this piece of code..


    <openerp>
    <data>
        <!-- Inherit the sale order model's form view and customize -->
        <record id="sale_form_view" model="ir.ui.view">
            <field name="name">sale.order.form.inherit</field>
            <field name="model">sale.order</field>
            <field name="inherit_id" ref="sale.view_order_form"/>
            <field name="arch" type="xml">
                <!-- Statusbar widget should also contain the new status -->
                <field name="state" position="replace">
                    <field name="state" widget="statusbar" statusbar_visible="draft,my_new_state,sent,invoiced,done" statusbar_colors='{"invoice_except":"red","waiting_date":"blue"}'/>
                </field>
            </field>
        </record>
    </data>
</openerp>


But.... My new state is not appearing between draft quotation and quotation sent

Please guide

Why is this so

Thanks

0
Avatar
Descartar
Anand

http://www.pixelite.co.nz/article/adding-additional-fields-using-custom-module-openerp-7

Anand

import netsvc from openerp.osv import osv, fields class purchase_order(osv.osv): _inherit = 'purchase.order' STATE_SELECTION = [ ('draft', 'Draft PO'), ('sent', 'RFQ Sent'), ('design_approved','Design Approval'), ('confirmed', 'Waiting Approval'), ('approved', 'Purchase Order'), ('except_picking', 'Shipping Exception'), ('except_invoice', 'Invoice Exception'), ('done', 'Done'), ('cancel', 'Cancelled') ] _columns = { 'state': fields.selection(STATE_SELECTION, 'Status', readonly=True, help="The status of the purchase order or the quotation request. A quotation is a purchase order in a 'Draft' status. Then the order has to be confirmed by the user, the status switch to 'Confirmed'. Then the supplier must confirm the order to change the status to 'Approved'. When the purchase order is paid and received, the status becomes 'Done'. If a cancel action occurs in the invoice or in the reception of goods, the status becomes in exception.", select=True), } this is how i added a custom state and i used this xml to view it design_approved function write({'state':'design_approved'}) design_confirm purchase_confirm purchase.workflow.inherit purchase.order <xpath expr="/form/header//button[@name='print_quotation']" position="after"> <xpath expr="/form/header//button[@name='purchase_confirm']" position="replace">

Mazhar Iqbal Rana
Autor

Can you help me on teamviwer please? Am still getting prob :(

Anand

Give me your skypeid and mail id.. First i will send you module for state change install that.. if necessary ping me.. skype id: anand.kannathasan mail id: anand.k@mitosistech.com

Mazhar Iqbal Rana
Autor

Thanks so much Anand My skype id is engr1111 and email is imazhar74@hotmail.com Also please tell me there that how much problems can be solved using odoo interface or always we have to enter code? Thanks so much I add you at skype

Mazhar Iqbal Rana
Autor

I have added you and also have pingde you on skype

Mazhar Iqbal Rana
Autor

Also I have emailed you as test email

Anand

I have sent a module in mail check it..

Avatar
Anand
Mejor respuesta

At first you should craete a state in workflow...?

then appropriate transition..? after that only it will appear..

1
Avatar
Descartar
Mazhar Iqbal Rana
Autor

I se.e. but each time i want to give new state i just have to add activity plus transition thats it? I mean all doable from interface or both from code and interface I have to do? And in that upper case I mentioned in question, coding wont help or both coding and interface change of workflow will work ? Thanks

Anand

Actually you should do like above mentioned or else u can also use a button in xml and trigger it like self.write('state':'state you want')..

Anand

https://www.odoo.com/forum/help-1/question/how-do-i-add-new-state-and-change-the-workflow-of-purchase-order-5118

Anand

http://members.hellug.gr/xrg/openerp-doc/html/api_reference/workflow/wkf_service.html

Anand

refer both buddy.. if it seems good give me a upvote..?

Mazhar Iqbal Rana
Autor

@Anand Thanks but problem is he is adding new module please guide me how to add new module I mean by which name..LIke we add custom modules and then restart server and update the list... how in this case will i do? what will be my module name etc or only changes will be in existing files? Thanks

Mazhar Iqbal Rana
Autor

Dont worry for upvote dear.. :) plz solve my issue I am worried :(

Mazhar Iqbal Rana
Autor

Actually what I want is that .. I have to put two approvals between draft quotation and rfq sent in purchase order... By default odoo has only one approval..I want to add states and i want to trigger wioth buttons to these states.. Like approved by superintendent then approved by manager and then approved by ceo...then rfq sent must be triggered....each of them must approve certain levels of purchase orders amount like for superintendent 1000$ and similarly varies from person to person

¿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
Few Confusions Regarding Odoo..
customization odoo
Avatar
0
mar 15
4252
Purchase Order Module..Cannot Install..Odoo8
customization odoo
Avatar
0
mar 15
4711
Showing Installed Module on Ubuntu???
customization odoo
Avatar
Avatar
1
mar 15
4216
No Widget Displayed?
customization odoo
Avatar
0
mar 15
3912
How to set value to another class member in openErp Resuelto
openerp7 odoo
Avatar
Avatar
1
mar 15
4482
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