Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3943 Lượt xem


Hi,

<button name = "toggle_active" position = "before"> <a href='web?debug=true#id=&action=407&model=purchase.order&view_type=form&menu_id=235'> <button name = "create_rfq" string = 'Create Rfq 'type = "object" class = "oe_stat_button" icon =' fa-list-alt '> </button> </a> </button>

this code redirect on page but does not show data.

(if any one executable code,please share )

Thank you


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

Hi,

If you are looking to pass default values to the new form, you can do it using the context. See this:Set Default Value Using Context in Odoo

See an example:

<button name="%(action_email_compose_message_wizard)d" string="Reply" type="action" icon="fa-reply text-warning"
context="{'default_composition_mode':'reply', 'default_parent_id': mail_message_id}" states='received,sent,exception,cancel'/>


To add smart buttons into form, you can refer this: https://www.youtube.com/watch?v=NfYt028J8rA

Thanks

Ảnh đại diện
Huỷ bỏ