Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
3 Antwoorden
6097 Weergaven
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
Annuleer
Beste antwoord
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
Annuleer
Auteur Beste antwoord

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

Avatar
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
apr. 22
18170
2
nov. 22
3400
1
mei 25
886
2
nov. 24
2094
4
feb. 24
12239