can't figure out how to add a line to sale.subscription using the create medal from another model
supsctiption_pak = self.env['product.template'].search([('name', '=', pak_name),('recurring_invoice', '=', True)], limit=1) supsctiption_info = { 'partner_id': vals['name'], } add_supsctiption = self.env['sale.subscription'].create(supsctiption_info) print('ssssss',supsctiption_pak)
#works
add_supsctiption_pak = { 'product_id': supsctiption_pak.id, 'partner_id': add_supsctiption.id, } link_user_to_supsctiption = self.env['sale.subscription.line'].create(add_supsctiption_pak)