Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Property field in OpenERP

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 895
    Comment on it

    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:

    1. different value for the same property depending on the company
    2. access right management per field
    3. 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)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: