Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
3 Replies
6113 Tampilan
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


Avatar
Buang
Jawaban Terbai
override the field you want to add option:
class YourClass(models.Model):
_inherit = 'module.model'
field = fields.Selection(
selection_add=[
("new_option", "New Option"),
]
)


Avatar
Buang
Penulis Jawaban Terbai

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

Avatar
Buang
Jawaban Terbai

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

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
1
Apr 22
18179
2
Nov 22
3434
1
Mei 25
896
2
Nov 24
2118
4
Feb 24
12253