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

Create new Fields or immitate one2many field

Suscribirse

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

Se marcó esta pregunta
functionone2manybuttonrowstextbox
2 Respuestas
3322 Vistas
Avatar
Ewen JEZEQUEL

Hello ! 


Here's my problem, i'd like to create a liste of multiple text box like a one2many relation, with a button to add new row and i'd like to now if this is possible. I have no clues on how to do so. I've tried searching for a button with a creation function but i only find button that turn on invisible from an already existing field wich is not what i'm looking for.


Thank you for your responces.


Ewen JEZEQUEL

0
Avatar
Descartar
Avatar
Ewen JEZEQUEL
Autor Mejor respuesta

Okay i realised i didn't specify it but i dont want neather a Many2One relation nor a One2Many, i want to be able to create new line of 3 text box not related to anything exepte my custom module. And i want to be able to add as much as i want. Thx for your response.

Regardes.


To close the subject i'll said what i did to dodge the problem:
instead of reinvented the weal i just euse what i was given and create a liste of one2many but i dont use the many2one relation so i have a liste of text box related to a module like the one i make (almost related to it self) but i juste don't use it or display it.
For help or details don't esitate to ask me.

Ewen JEZEQUEL


0
Avatar
Descartar
Avatar
TTN SOLUTION
Mejor respuesta

I understand that you want to create a field array, similar to adding products to an order. You can refer to the following code snippet:

0
Avatar
Descartar
TTN SOLUTION

from odoo import models, fields

class Order(models.Model):
_name = 'order.model'
_description = 'Order'

name = fields.Char(string='Order Name', required=True)
order_lines = fields.One2many('order.line.model', 'order_id', string='Order Lines')

class OrderLine(models.Model):
_name = 'order.line.model'
_description = 'Order Line'

order_id = fields.Many2one('order.model', string='Order')
product_id = fields.Many2one('product.model', string='Product')
quantity = fields.Float(string='Quantity', default=1.0)

TTN SOLUTION

and view
<odoo>
<data>
<record model="ir.ui.view" id="view_order_form">
<field name="name">order.model.form</field>
<field name="model">order.model</field>
<field name="arch" type="xml">
<form>
<sheet>
<group>
<field name="name"/>
</group>
<notebook>
<page string="Order Lines">
<field name="order_lines" mode="tree">
<tree editable="bottom">
<field name="product_id"/>
<field name="quantity"/>
</tree>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
</data>
</odoo>

¿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
api request
function api button
Avatar
0
dic 24
2235
How to open a wizard with yes or no buttons (Odoo 14) Resuelto
function button Buttons
Avatar
Avatar
Avatar
2
sept 22
10034
[Odoo 10] Update view calling function from another model using button? Resuelto
function button odoo10.0
Avatar
Avatar
4
mar 19
10579
How to Create Function (Dummy) One2many Field in models.Model ?
function one2many models.Model
Avatar
0
jun 17
990
Functional field error Resuelto
function treeview one2many
Avatar
Avatar
Avatar
5
abr 15
6213
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.

Sitio web hecho con

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