i am trying to use one single button for two function, first i want to generate a sequence number and in a second place i want to print a pdf, in odoo here is my code
def print_pdf(self):
if self.name:
if self.my_number == _('New') or self.my_number == 'New':
self.write({'my_number': self.env['ir.sequence'].next_by_code('shipset.bar')})
return True
return self.env.ref('module_extend.action_report_styn').report_action(self)
but i can't print my pdf, what i am missing else ?