Ir al contenido
Odoo Menú
  • Identificarse
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • TPV para tiendas
    • TPV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en directo
    • eLearning
    Cadena de suministro
    • Inventario
    • Fabricación
    • PLM
    • Compra
    • Mantenimiento
    • Calidad
    Recursos Humanos
    • Empleados
    • Reclutamiento
    • Ausencias
    • Evaluación
    • Referencias
    • Flota
    Marketing
    • Marketing social
    • Marketing por correo electrónico
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyecto
    • Partes de horas
    • Servicio de campo
    • Servicio de asistencia
    • Planificación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Información
    • WhatsApp
    Aplicaciones de terceros Studio de Odoo Plataforma de Odoo Cloud
  • Industrias
    Comercio al por menor
    • Librería
    • Tienda de ropa
    • Tienda de muebles
    • Tienda de ultramarinos
    • Ferretería
    • Juguetería
    Alimentación y hostelería
    • Bar y taberna
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidor de bebidas
    • Hotel
    Inmueble
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión inmobiliaria
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Empresa contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Fabricación
    • Textil
    • Metal
    • Muebles
    • Alimentos
    • Brewery
    • Regalos de empresas
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Terapeutas
    • Farmacia
    • Peluquería
    Oficios
    • Handyman
    • Hardware y asistencia informática
    • Sistemas de energía solar
    • Zapatero
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin ánimo de lucro
    • Agencia de protección del medio ambiente
    • Alquiler de paneles publicitarios
    • Estudio fotográfico
    • Alquiler de bicicletas
    • Distribuidor de software
    Browse all Industries
  • Comunidad
    Aprender
    • Tutoriales
    • Documentación
    • Certificaciones
    • Formación
    • Blog
    • Podcast
    Potenciar la educación
    • Programa de formación
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtener el software
    • Descargar
    • Comparar ediciones
    • Versiones
    Colaborar
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Convertirse en partner
    • Services for Partners
    • Registrar tu empresa contable
    Obtener servicios
    • Encontrar un partner
    • Encontrar un asesor fiscal
    • Contacta con un experto
    • Servicios de implementación
    • Referencias de clientes
    • Ayuda
    • Actualizaciones
    GitHub YouTube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicitar 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
  • Proyecto
  • 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

Multicompany Access Rights - Why is the field res.user.company_ids not used?

Suscribirse

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

Se marcó esta pregunta
access
2 Respuestas
18996 Vistas
Avatar
Michael Karrer

In a multi-company setup of OpenERP there is a new field available for the users "res.user.company_ids" but it seems that this field will not be taken into account on any of the access Rules:

Acces Rules for res.partner

['|','|',('company_id.child_ids','child_of',[user.company_id.id]),('company_id','child_of',[user.company_id.id]),('company_id','=',False)]

Or Access Rule for res.companies

[('id','child_of',[user.company_id.id])]

I do understand that OpenERP is by default sharing it's documents between Parents and Children and not between brother and sister wich is abvious if you look at

('company_id.child_ids','child_of',[user.company_id.id]) and ('company_id','child_of',[user.company_id.id])

BUT I really don't understand for what the field res.user.company_ids is for? Could somebody shed some light on this?

I was expecting that if all of my companies are in an hierarchy like this:

Company A > Company B > Company C

and a user belongs to "Company B and has set the field "res.user.company_ids" to "Company B" and "Company A" he could see all the partners (contacts) from "Company A" and "Company B" but NOT from "Company C". But in reality he will be able to see all the contacts from all the companies including "Company C".

Maybe i did not understand the purpose of the Field "Allowed Companies" ( res.user.company_ids )

Solution for me: To make it work like expected i altered the access rules like this:

res.partner

['|','|','&',('company_id.child_ids','child_of',[user.company_id.id]),('company_id','child_of',[user.company_id.id]),('company_id','=',False),('company_id', 'in', [company.id for company in user.company_ids])]

res.company

[('id','in',[company.id for company in user.company_ids])]

But i am not sure if this has any impact or if this is the correct way to alter this access rules?!?

So my two questions are:

  1. What is the purpose of res.user.company_ids
  2. Are my new access rules correct and ok?
6
Avatar
Descartar
Avatar
Jos De Graeve
Mejor respuesta

Hello Michael,

The goal of the res.user.company_ids field is to set the list of companies a user is allowed to use.  A user can change his user preferences and select a different company to work on, if that user has the 'multicompany' technical setting enabled and if the company he want's to change to is in his list of allowed companies.

I dont know if part 2 of you question is still relevant in the light of above answer ?

Regards,

Jos

1
Avatar
Descartar
Avatar
Glue Software Engineering AG, Stephan Amann
Mejor respuesta

I'm struggling with the same question. In a multi-company setup, where the companies are sisters, things are not working properly by the standard. A simple example is the messaging system in odoo.

If a action in company A triggers a message to be sent to my Inbox, I have no access anymor to my Inbox from company B. If the same happens vice-versa, I keep getting "Access Denied" messages.

The only solution I would see, is to set the access rules according to Michael Karrer.

0
Avatar
Descartar
¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Inscribirse
Publicaciones relacionadas Respuestas Vistas Actividad
How to assign a user to admin on sales, customer invoices and inventory
access
Avatar
Avatar
1
mar 25
2227
Granting Payslip Access to a Portal User: Troubleshooting Custom Group Permissions
access
Avatar
0
ago 25
2116
How to change existing access right of some model in a ir.model.access.csv? Resuelto
access
Avatar
Avatar
Avatar
2
abr 23
27413
How to create Hierarchical Access Rights Control
access
Avatar
0
dic 20
4080
JIRA Component invisible while creating new JIRA ticket
access
Avatar
0
dic 18
3633
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento Odoo.sh
  • Ayuda
  • Actualizar
  • Desarrollos personalizados
  • Educación
  • Encontrar un asesor fiscal
  • Encontrar un partner
  • Convertirse en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contacta con nosotros
  • Puestos de trabajo
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Información 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 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