def action_generate_bill(self):
# Assuming you have necessary information for creating the invoice
invoice_data = {
'payment_reference': self.type_id.id, # Replace with the actual partner field in your model
'partner_id': self.user_id.id, # Replace with other necessary fields
# Add more fields as needed
}
# Create a new invoice
new_invoice = self.env['account.move'].create(invoice_data)
# Open the form view of the newly created invoice
action = {
'type': 'ir.actions.act_window',
'res_model': 'account.move',
# 'view_type': 'form',
'view_mode': 'tree,form',
'res_id': new_invoice.id,
}
return action
here is my function here i want to go odoo accounting invoice and want all the field and fucntionality of this view but now when i click on this button it take me to account.move model but i can not found all the field and also missing add a line option
how i do this