Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
6126 Lượt xem
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


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất
override the field you want to add option:
class YourClass(models.Model):
_inherit = 'module.model'
field = fields.Selection(
selection_add=[
("new_option", "New Option"),
]
)


Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 4 22
18182
2
thg 11 22
3439
1
thg 5 25
900
2
thg 11 24
2136
4
thg 2 24
12262