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

list items on one2many

Suscribirse

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

Se marcó esta pregunta
fieldsone2manyv7
4 Respuestas
10906 Vistas
Avatar
Francisco Castro

how can I list items on one2many without have to click on add item? I have two classes to build two tables:

class tabela_recintos(osv.osv):

_name = 'tabela.recintos'

_columns = {

'recinto_ids': fields.one2many('tabela.lista','id_wizard','teste')
}

tabela_recintos()

class tabela_lista(osv.osv):

_name = 'tabela.lista'

_columns = {

        'id_wizard':fields.many2one('tabela.recintos','id_wizard'),
       'cod': fields.char('Código', size=20, required='True'),
       'nome': fields.char('Designação', size=60, required='True')
        }

I click on a menu on the left and pop's up a wizard, this wizard ll list the items, but I dont know what can I do more. it only shows a field and the button add item...

my xml is this

<record id="carrega_form" model="ir.ui.view">
    <field name="name">carrega.form</field>
    <field name="model">tabela.recintos</field>
    <field name="arch" type="xml">
        <form string="carrega" version="7.0">

            <group string="carrrega" col="1">

        <field name="recinto_ids"/>

            </group>

            <footer>
               <button name='name' type='object' string='Criar novo Recinto' class="oe_highlight"/>
                ou
                <button string="Cancelar" class="oe_link" special="cancel"/>
            </footer>
        </form>
    </field>
</record>

<record id="gs_carrega_act" model="ir.actions.act_window">
    <field name="name">Carregar os Recintos</field>
    <field name="type">ir.actions.act_window</field>
    <field name="res_model">tabela.recintos</field>
    <field name="view_type">form</field>
    <field name="view_mode">form</field>
    <field name="target">new</field>
</record>

<menuitem
    name="Carrega Recinto teste"
    parent="gs_menuLotacoes"
    action="gs_carrega_act"
    id="gs_carrega"
    sequence="0"/>
0
Avatar
Descartar
Daniel Reis

Not sure what you mean: a one2may holds a list of items, it's not a view on another table's items.

Francisco Castro
Autor

I have done a wizard to list items on this wizard I show a one2many field on it but I cant list the items when the wizard starts. I have to go to the add button and add the items one by one. I just need to list items when I click on the wizard menu

Avatar
mywebsitedeal
Mejor respuesta

Evn i have the same problem .any idea of the solution

0
Avatar
Descartar
Avatar
Mejor respuesta

Did anyone findthe solution? I have the same problem.

0
Avatar
Descartar
Avatar
K Santosh Subba Rao
Mejor respuesta

you want the list of items to be displayed automatically based on some condition right??

0
Avatar
Descartar
Avatar
Ivan
Mejor respuesta

The method that we have used before is create the instance of tabela.recintos first, then create the related recinto_ids records, then return an action whose res_id is set to the created tabela.recintos.  Sample method returning action with res_id set can be found in action_button_confirm method in sale/sale.py.

Second method I can think of is to use the _default for tabela.recintos.  This can be done if the recinto_ids can be created without any knowledge of the information in tabela.recintos.

A side note, usually for wizards (non persistent data) we would use osv.osv_memory (or orm.TransientModel in 7.0) instead of osv.osv.

0
Avatar
Descartar
¿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
One2many field odoo 14
fields one2many
Avatar
0
jul 22
4370
field restriction for owner (salesperson)
fields v7
Avatar
0
mar 15
3955
V 7 - One2Many form view
one2many v7
Avatar
0
mar 15
3722
forbid addition in one2many widget but permit edition of lines Resuelto
view one2many v7
Avatar
Avatar
Avatar
2
may 24
9983
Updating One2many field inside onchange breaks the field
fields one2many Odoo13.0
Avatar
Avatar
1
may 21
5566
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