i created a transient model and when i click save button it should be saved in another model.
how to save it any idea
my transient model
from odoo import fields, models, api
class CreateExam(models.TransientModel):
_name = 'exam.wizards'
_description = 'Create exams'
std_wiz = fields.Many2one(comodel_name='std.record',string='Student')
std_subject = fields.Many2one('std.subject',string="Subject")
std_marks=fields.Float(string="Marks")
def save_btn(self):
print("saved")
return Truemodel that data should be saved
class Exams(models.Model):
_name = 'exams.details'
_description = 'Exams'
students = fields.One2many('exam.wizards','std_wiz', string='Students')
student_subject = fields.One2many('exam.wizards','std_subject', string='subjects')
mark = fields.Float(string="marks")
Thanks in advance