تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3 الردود
6086 أدوات العرض
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


الصورة الرمزية
إهمال
أفضل إجابة
override the field you want to add option:
class YourClass(models.Model):
_inherit = 'module.model'
field = fields.Selection(
selection_add=[
("new_option", "New Option"),
]
)


الصورة الرمزية
إهمال
الكاتب أفضل إجابة

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

الصورة الرمزية
إهمال
أفضل إجابة

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

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
أبريل 22
18166
2
نوفمبر 22
3397
1
مايو 25
882
2
نوفمبر 24
2093
4
فبراير 24
12229