Odoo Help


1 Answer
Soohoo India
12/17/13, 6:19 AM

Use _rec_name = 'field_name ' to make it as record name

for example --

_name = 'account.tax.code'
_description = 'Tax Code'
_rec_name = 'code'
_columns = {
    'name': fields.char('Tax Case Name', size=64, required=True, translate=True),
    'code': fields.char('Case Code', size=64),
    'info': fields.text('Description'),
    'sum': fields.function(_sum_year, string="Year Sum"),
    'sum_period': fields.function(_sum_period, string="Period Sum"),
    'parent_id': fields.many2one('account.tax.code', 'Parent Code', select=True),
    'child_ids': fields.one2many('account.tax.code', 'parent_id', 'Child Codes'),
    'line_ids': fields.one2many('account.move.line', 'tax_code_id', 'Lines'),
    'company_id': fields.many2one('res.company', 'Company', required=True),
    'sign': fields.float('Coefficent for parent', required=True, help='You can specify here the coefficient that will be used when consolidating the amount of this case into its parent. For example, set 1/-1 if you want to add/substract it.'),
    'notprintable':fields.boolean("Not Printable in Invoice", help="Check this box if you don't want any tax related to this tax code to appear on invoices"),
    'sequence': fields.integer('Sequence', help="Determine the display order in the report 'Accounting \ Reporting \ Generic Reporting \ Taxes \ Taxes Report'"),
Ask a Question
Keep Informed
0 follower(s)
About This Community

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

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now