
from openerp.osv import fields, osv


class analytic_code(osv.Model):
    _name = "analytic.code"

    _columns = dict(
        name=fields.char("Name", size=128, translate=True, required=True),
        nd_id=fields.many2one(
            "analytic.dimension", ondelete="restrict"),
        active=fields.boolean('Active'),
        nd_name=fields.related('nd_id', 'name', type="char",
                               string="Dimension Name", store=False),
        description=fields.char('Description', size=512),
    )
    _defaults = {
        'active': 1,
    }


from openerp.osv import fields, osv


class analytic_code(osv.Model):
    _name = "analytic.code"

    _columns = dict(
        name=fields.char("Name", size=128, translate=True, required=True),
        nd_id=fields.many2one(
            "analytic.dimension", "Dimensions", ondelete="restrict"),
        active=fields.boolean('Active'),
        nd_name=fields.related('nd_id', 'name', type="char",
                               string="Dimension Name", store=False),
        description=fields.char('Description', size=512),
    )
    _defaults = {
        'active': 1,
    }

Add string to display the name of the field Dimension during the import
Add string to display the name of the field Dimension during the import

  
  from openerp.osv import fields, osv
  
  
  class analytic_code(osv.Model):
      _name = "analytic.code"
  
      _columns = dict(
          name=fields.char("Name", size=128, translate=True, required=True),
          nd_id=fields.many2one(
-             "analytic.dimension", ondelete="restrict"),
+             "analytic.dimension", "Dimensions", ondelete="restrict"),
          active=fields.boolean('Active'),
          nd_name=fields.related('nd_id', 'name', type="char",
                                 string="Dimension Name", store=False),
          description=fields.char('Description', size=512),
      )
      _defaults = {
          'active': 1,
      }
  
Add string to display the name of the field Dimension during the import
## Code Before:

from openerp.osv import fields, osv


class analytic_code(osv.Model):
    _name = "analytic.code"

    _columns = dict(
        name=fields.char("Name", size=128, translate=True, required=True),
        nd_id=fields.many2one(
            "analytic.dimension", ondelete="restrict"),
        active=fields.boolean('Active'),
        nd_name=fields.related('nd_id', 'name', type="char",
                               string="Dimension Name", store=False),
        description=fields.char('Description', size=512),
    )
    _defaults = {
        'active': 1,
    }

## Instruction:
Add string to display the name of the field Dimension during the import
## Code After:

from openerp.osv import fields, osv


class analytic_code(osv.Model):
    _name = "analytic.code"

    _columns = dict(
        name=fields.char("Name", size=128, translate=True, required=True),
        nd_id=fields.many2one(
            "analytic.dimension", "Dimensions", ondelete="restrict"),
        active=fields.boolean('Active'),
        nd_name=fields.related('nd_id', 'name', type="char",
                               string="Dimension Name", store=False),
        description=fields.char('Description', size=512),
    )
    _defaults = {
        'active': 1,
    }
