I have inherited the sale order line and added some custom fields for my needs.
Now I need to add button against each line for a function that is applied on each line of a sale order on that button click.
Is there a way to bring it?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I have inherited the sale order line and added some custom fields for my needs.
Now I need to add button against each line for a function that is applied on each line of a sale order on that button click.
Is there a way to bring it?
Hi,
You
can inherit the sale order line view and add a button inside the line
similar to the Register Lots, Packs and Location button in picking.
Add the button after your custom fields on sale.order.line view inside your XML file.
.xml
<button name="button_function" string="String you want" type="object" icon="fa-icon_you_like"
width="0.1"
options='{"warn": true}'/>
.py
class SaleOrderLine(models.Model):
_inherit = 'sale.order.line'
def button_function(self):
"""And then write your function"""
Regards
This is it. Thank you.
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
2
अग॰ 20
|
2951 | ||
|
0
फ़र॰ 20
|
3972 | ||
|
0
अप्रैल 22
|
2127 | ||
|
0
नव॰ 21
|
2387 | ||
|
1
सित॰ 21
|
3422 |