Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
4768 Представления

Hello, Iam trying this to call onchange in account invoice state field

from openerp import models, fields, api 
import logging
_logger = logging.getLogger(__name__)

class invoice(models.Model):
_inherit = 'account.invoice'

@api.onchange('state')
 def _check_onchange_invoice_state(self): 
_logger.info('=======================================================')
_logger.info(self.id)
_logger.info('=======================================================')

I now this field have "track_visibility" and I don't know if I can used or not but I really need it. Any help?

I also try @api.onchange('write_date') but nothing happens :(.

Аватар
Отменить
Лучший ответ

I recommend you to read the documentation of api@onchange and api@depend.
https://www.odoo.com/documentation/12.0/reference/orm.html#module-odoo.api
In both cases, you should probably use api@depends

Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
февр. 16
5292
2
мар. 15
5184
1
июл. 19
3199
2
нояб. 16
5923
1
сент. 16
7878