hi iam getting this error while pressing action_send function
code:
#@api.model
def create(self, vals):
number = self.env['ir.sequence'].next_by_code('project.work.sequence')
vals.update({
'number': number,
})
return super(ProjectWorkPackage, self).create(vals)
def action_send(self, vals):
self.ensure_one()
ir_model_data = self.env['ir.model.data']
try:
template_id = self.env.ref('job_costing_work_package.email_work_packages_templates').id
except ValueError:
template_id = False
try:
compose_form_id = self.env.ref('mail.email_compose_message_wizard_form').id
except ValueError:
compose_form_id = False
ctx = {
'default_model': 'project.work.package',
'default_res_id': self.ids[0],
'default_use_template': bool (template_id),
'default_template_id': template_id,
'default_composition_mode': 'comment',
'mark_so_as_sent': True,
'force_email': True
}
self.state = 'sent'
return {
'type': 'ir.actions.act_window',
'view_mode': 'form',
'res_model': 'mail.compose.message',
'views': [(compose_form_id, 'form')],
'view_id': compose_form_id,
'target': 'new',
'context': ctx,
}
error:
File "/odoo/odoo_13/odoo/api.py", line 374, in _call_kw_multi result = method (recs, * args, ** kwargs) TypeError: action_send () missing 1 required positional argument: 'vals'
anyone