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

Hi, Where i can get action ID (162) and put it to parameters in URL ?
i set href to a button like this

/web&debug=#id=1&view_type=form&model=res.partner.task&menu_id=126&action=162 

but i get error web.assets_backend.js:427 No type for action 


Thanks




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

Hello simes

I think use like this, it's helpful for you.
action_id = self.env.ref('module_name.action_id', , raise_if_not_found=False)

Ex.
web&debug=#id=1&view_type=form&model=res.partner.task&menu_id=126&action=action_id.id

Аватар
Отменить
Автор

action_id = self.env.ref('contacts.Contacts',

raise_if_not_found=False)

print(action_id) // i got None

not work got error AttributeError: 'NoneType' object has no attribute 'id'

action_id = self.env.ref('module_name.action_id')

Автор

tks it work

i go in form view click debug -> edit action -> get External ID

action_id = self.env.ref('External ID')

print(action_id.id) // 167

Related Posts Ответы Просмотры Активность
Why XML in odoo ? Решено
3
мар. 25
960
Odoo action error Решено
1
окт. 24
5299
0
дек. 22
1857
1
февр. 18
5300
4
нояб. 24
76286