Skip to Content
Menu
This question has been flagged
3 Replies
6173 Rodiniai
I need to add a new option to the status invoiced field, how can I do this?
I need that when making a credit note it is reflected as a new state to show


Portretas
Atmesti
Best Answer
override the field you want to add option:
class YourClass(models.Model):
_inherit = 'module.model'
field = fields.Selection(
selection_add=[
("new_option", "New Option"),
]
)


Portretas
Atmesti
Autorius Best Answer

How could I apply the activation of my new status when making a credit note?

Portretas
Atmesti
Best Answer

Hi,

https://www.odoo.com/forum/help-1/add-value-in-selection-field-without-overwrite-whole-field-160683
Refer the above forum post to add a new option for the selection field in Odoo

And for updating the invoice status, you can use the _get_invoice_status(self) compute function which can be found from sale_order.py file in Sale module.

Regards

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
bal. 22
18251
2
lapkr. 22
3474
1
geg. 25
943
2
lapkr. 24
2177
4
vas. 24
12303