
from openerp import models, fields


class ResPartnerBank(models.Model):
    _inherit = 'res.partner.bank'

    # TODO: It doesn't work, I don't understand why
    # So I change the label of the field in the view
    acc_type = fields.Char(string='Bank Account Type')


from openerp import models, fields


class ResPartnerBank(models.Model):
    _inherit = 'res.partner.bank'

    # I also have to change the label of the field in the view
    # I store the field, so that we can do groupby and search on it
    acc_type = fields.Char(string='Bank Account Type', store=True)

Store field acc_type on res.partner.bank, so that we can search and groupby on it
Store field acc_type on res.partner.bank, so that we can search and groupby on it

  
  from openerp import models, fields
  
  
  class ResPartnerBank(models.Model):
      _inherit = 'res.partner.bank'
  
-     # TODO: It doesn't work, I don't understand why
-     # So I change the label of the field in the view
+     # I also have to change the label of the field in the view
+     # I store the field, so that we can do groupby and search on it
-     acc_type = fields.Char(string='Bank Account Type')
+     acc_type = fields.Char(string='Bank Account Type', store=True)
  
Store field acc_type on res.partner.bank, so that we can search and groupby on it
## Code Before:

from openerp import models, fields


class ResPartnerBank(models.Model):
    _inherit = 'res.partner.bank'

    # TODO: It doesn't work, I don't understand why
    # So I change the label of the field in the view
    acc_type = fields.Char(string='Bank Account Type')

## Instruction:
Store field acc_type on res.partner.bank, so that we can search and groupby on it
## Code After:

from openerp import models, fields


class ResPartnerBank(models.Model):
    _inherit = 'res.partner.bank'

    # I also have to change the label of the field in the view
    # I store the field, so that we can do groupby and search on it
    acc_type = fields.Char(string='Bank Account Type', store=True)
