Odoo Help

Welcome!

This community 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.

1

what is ir.property used for?

By
Eric
on 4/2/14, 2:08 PM 2,701 views

Hello, I am really confused about the ir.property table in OpenERP 7. I dont understand why it is used or needed. All the records on that table have a many2one type, and then have different fields which relates two objects together. If all this table does is relate two objects together, then why not create a many2one field on a child object? Why use the ir.property table to establish the relationship?

2

Ray Carnes

--Ray Carnes--
15677
| 9 7 9
Greater Los Angeles, United States
--Ray Carnes--

Senior Odoo Analyst

OpenERP 6.1, 7.0 and Odoo 8.0, 9.0 (Since 2012)

Completed Functional and Technical Training.

Major Skills:

  • Needs Discovery and Requirements Analysis;

  • Function and Technical Specifications;

  • Project Planning;

  • Prototyping and Proof of concepts;

  • Data migration;

  • Configuration & Customization (UI and modules);

  • Integration - data, business logic and service levels;

  • Training and Knowledge transfer;

  • Go Live support;

  • Help desk;

  • Version Migration.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

Ray Carnes
On 4/5/14, 3:08 PM

Using properties or normal fields:

When you want to add a new feature, you will have to choose to implement it as a property or as normal field.

  • Use a normal field when you inherit from an object and want to extend this object.

  • Use a property when the new feature is not related to the object but to an external concept.

Here are a few tips to help you choose between a normal field or a property:

Normal fields extend the object, adding more features or data.

A property is a concept that is attached to an object and have special features:

  • Different value for the same property depending on the company

  • Rights management per field

  • It's a link between resources (many2one)


The default "Account Receivable" for a specific partner is implemented as a property because:

  • This is a concept related to the account chart and not to the partner, so it is an account property that is visible on a partner form. Rights have to be managed on this fields for accountants, these are not the same rights that are applied to partner objects. So you have specific rights just for this field of the partner form: only accountants may change the account receivable of a partner.
  • This is a multi-company field: the same partner may have different account receivable values depending on the company the user belongs to. In a multi-company system, there is one account chart per company. The account receivable of a partner depends on the company it placed the sale order.
  • The default account receivable is the same for all partners and is configured from the general property menu (in administration).

An example product expiry module (implements all delays related to products: removal date, product usetime) is implemented as simple fields on the product.product object because:

  • It extends a product, the life_time field is a concept related to a product, not to another object.

  • There is no need for rights management per field, the information is managed by the same people that manage products.


Source: https://doc.openerp.com/trunk/server/03_module_dev_02/

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 4/2/14, 2:08 PM
Seen: 2701 times
Last updated: 8/9/16, 9:34 AM