Skip to Content
Menu
This question has been flagged
1 Reply
955 Views

  Passwd_pin = fields.Char(string="Password", size=10, readonly=True)

    start_date = fields.Date(string="Start Date", readonly=True, default=fields.Date.today())

    end_date = fields.Date(string="End Date", required=False, default=fields.Date.today())

    state = fields.Selection([('draft','Draft'),('active','Active'),('disactive','Disactive')], string="State", default='draft')

Avatar
Discard
Best Answer

you can try a concatenation with the create function, something like this:


@api.model
def create(self, values):
res = super(your_class, self).create(values)
name = "{}-{}".format(
res.Passwd_pin,
res.start_date,
)
res.name = name
return res
Avatar
Discard