Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
3092 Переглядів

I want to make invoice date field editable for admins

Аватар
Відмінити
Найкраща відповідь

Hello Jain,

Hope you are doing well.

This field is read only in account_invoice file of account module. So, if you want to edit this field after validating invoice, then you have to inherit account.invoice model and override date_invoice field.

from odoo import models, fields, API

class Account Invoice(models.Model):
_inherit = "account.invoice"

date_invoice = fields.Date(string='Invoice Date', index=True,
help="Keep empty to use the current date", copy=False)

Thanks & Regards,

Email: odoo@aktivsoftware.com

Skype: kalpeshmaheshwari

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
2
лист. 22
6173
1
черв. 22
8182
0
серп. 21
95
0
лип. 21
172
0
трав. 21
1685