I created form popup but footer button can’t call my function in python. It always call write function. Anyone help me fix this bug.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
2
Trả lời
3299
Lượt xem
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
How to make pop ups after actions?
Đã xử lý
|
|
2
thg 7 25
|
6863 | |
|
0
thg 11 23
|
1394 | ||
|
1
thg 9 23
|
2341 | ||
|
1
thg 7 22
|
1125 | ||
|
2
thg 4 20
|
9856 |
Please share your XML and python code to get more details and root cause.
Hi Avatar Sudhir Arya. This is my code
def assign_lead(self):
self.ensure_one()
_logger.info("test assign lead")
lead_selected = self._context.get('active_ids', [])
_logger.info(lead_selected)
return True
<record id="crm_lead_assign_form" model="ir.ui.view">
<field name="name">crm.lead.asign_form</field>
<field name="model">crm.lead</field>
<field name="priority" eval="20"/>
<field name="arch" type="xml">
<form string="assign_lead_form" create="false" edit="false">
<sheet>
<group>
<group>
<field name="user_id"/>
<field name="team_id" widget="selection" />
</group>
</group>
</sheet>
<footer>
<button name="assign_lead" type="object" class="btn-primary" string="Assign lead"/>
<button name="cancel" string="Cancel" special="cancel" class="oe_link"/>
</footer>
</form>
</field>
</record>