Each time you work in OpenERP, you find a new concept, recently I came across a concept Property Field in OpenERP and tried hard to understand it. Here is a small introduction to a property field.
Property Field: A property field is a special field, that is not related to the object but to some external concept. A property is a concept that is associated to an object has some special features.
Characteristics:
- different value for the same property depending on the company
- access right management per field
- it is a link between many2one relationship
The definition of a property is stored in the ir.model.fields model like any other field. In the definition of the property, we can add groups that are allowed to change to property.
The type of this field is many2one, so in the form a property is represented like a many2one function.
Example:
'property_account_receivable': fields.property(
'account.account',
type='many2one',
relation='account.account',
string="Account Receivable",
view_load=True,
domain="[('type', '=', 'receivable')]",
help="This account will be used instead of the default one as the receivable account for the current partner",
required=True),
Explaination:
This is related to the account chart and this field is visible at the partner's form, so it is a concept to account.
The default account receivable is the same for all partners and is configured from the general property menu (in administration).
For more information you can go to https://doc.openerp.com/6.0/developer/2_5_Objects_Fields_Methods/field_type/
0 Comment(s)