Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is res.partner?

Tags:

odoo

I am new to openerp I came across res.partner but I couldn't understand what it does and what all functionalities it provides,so if anyone could explain it to me I would be grateful.

like image 737
greywind Avatar asked Apr 08 '14 04:04

greywind


2 Answers

To clarify.

res.partner is an ORM Model. An ORM model describes a class of objects in the database and provides a series of ORM methods to allow you to manage them in code (create, write, unlink etc).

To get the database table, unless there is a specific _table override, just convert the periods to underscores so the table in the database is res_partner. As with any "res." model, you get res.partner as part of the core of OpenERP rather than any additional model such as accounting or sales.

But to answer a wider question, what is res.partner for in OpenERP? Assuming OpenERP 7, res.partner contains information about any entities you have a relationship with.

This includes:

  • Customers - you have a res.partner entry for each customer plus a res.partner entry for each contact person or address (invoice to, deliver to) you set up for that customer.
  • Suppliers - same as customers. In fact, the only difference between the two is a boolean field on res.partner to say if they are a customer or supplier.
  • Users - each user allowed to log in to your OpenERP instance has a related res.partner to store address details.
  • Companies - each company you set up in OpenERP assuming you are using multi-company has a related res.parter to store address details.
like image 65
Adrian Merrall Avatar answered Sep 28 '22 01:09

Adrian Merrall


res.partner is the technical name for the Model representing Partners:

Partners represent People and Organizations.

The most straightforward example are Customers and Suppliers.

Other examples of Partners are:

  • Contact persons within an organization
  • Customer or Supplier Adresses
  • Employees personal contact data
  • Users contact data

So it's a base concept used pretty much everywhere in the application.

like image 28
Daniel Reis Avatar answered Sep 28 '22 02:09

Daniel Reis