For example if i have invoice id 1, or any other invoice info. I want to show user an lnvoice link, when user click on that link user will be redirected to that invoice. Please help me in that
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
1
Reply
3594
Views
Hi Ahmed,
You can do it by creating a computed Many2one field:
invoice_id = fields.Many2one(comodel_name='account.invoice', string="Invoice", compute="_get_invoice", ) @api.one @api.depends('WHATEVER FIELDS TO BE USED IN THE CALCULATIONS')
def _get_invoice(self):
'''
Add all the calculations and the logic needed hear to get the ID of the invoice
'''
self.invoice_id = ID_THAT_YOU_HAVE
This will fill the field in the view with invoice, it will be shown as a link by default.
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
0
Oct 23
|
2306 | ||
|
4
Dec 21
|
29983 | ||
odoo 9 show user popups
Solved
|
|
2
Dec 20
|
8177 | |
|
2
Aug 18
|
6154 | ||
|
1
Jul 17
|
3625 |