from odoo import models, fields, api class YuthonWorkCondolences(models.Model): _name = 'yuthon.work.condolences' _description = '节日慰问' _inherit = ['soong.workflow.mixin'] name = fields.Char(string='名称') code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('property_work_condolences_code_sequence'))