Odoo Help

0

Users stored in res_partner..?

By
aci aisha
on 1/20/15, 1:33 AM 793 views

Hi friends,

When we create a customer it should be stored in the table res_partner

But when we create a user it stored in res_user and res_partner..

What is the logic behind it??

...?

Anand
on 1/20/15, 1:37 AM
0
Umashankar Subramani
On 1/20/15, 1:37 AM

A res.users class inherits from res.partner. The partner model is used to store the data related to the partner: lang, name, address. The user model is now dedicated to technical data.

Ddnt understand,,,

Abin C I
on 1/20/15, 1:46 AM
0

The reason behind creating partner of that user and relating that with user table, is that from OpenERP 7 onwards, as they have given feature of messaging, it uses related partner for following particular record, sending message, and other messaging feature. And also any customer can also log a note into related invoice, and so on. So to make that central development, rather than creating different method to send messages from users, they have created a partner for related users and managing messaging from that user. Also if you notice, it is creating partner for company as well !

Ok,But how can i filter the customers only when i use a many2one function from res_partners(Now it also displays the usersr also,bt i didnt need that)

Abin C I
on 1/20/15, 1:48 AM

There are 3 boolean fields that are available in res.partner that you can use for filtering. They are Customer (field name customer), Supplier (supplier), and Employee (employee). Any partner can have none (a very rare case), one, two, or all three fields checks, but basically if you are creating a Sale Order, the Customer field will filter res.partner that has Customer field checked. So, if you have a many2one field and you want to let user select only partners that are Customers, you can put a domain to that field: [('customer', '=', True)]

Ivan
on 1/20/15, 2:06 AM

There is a field 'customer' in the res_partner model which is of type boolean you can always use that. This field doesn't get checked when partner is created for the user.

Emipro Technologies Pvt. Ltd.
on 1/20/15, 2:08 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 1/20/15, 1:33 AM
Seen: 793 times
Last updated: 3/16/15, 8:10 AM