Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
3316 มุมมอง

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. 

อวตาร
ละทิ้ง

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>

Related Posts ตอบกลับ มุมมอง กิจกรรม
How to make pop ups after actions? แก้ไขแล้ว
2
ก.ค. 25
6908
0
พ.ย. 23
1402
1
ก.ย. 23
2354
1
ก.ค. 22
1125
2
เม.ย. 20
9886