This question has been flagged
1 Reply
7814 Views

I have created a module but i want a breadcrumb show some field instead of module name ,id and label of sheet also show the same field

i have to show the combination of two fields as header

Avatar
Discard
Author Best Answer

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'"),
}
Avatar
Discard