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

I have a problem in my module... I need to save my model (lets call this Model_A) after filling a form raising for a wizard. The explanation is: I have a module that has a button which raises a wizard , so, when i press that button it saves the Model_A before and then raises the wizard. The problem is that i need to fill some fields in the wizard form, save it, close the wizard, and after that save Model_A by clicking on the save button. Any suggestion? I already tried by overriding the create function and returning False, None, an empty dictionary... I tried the solution given on the below link [1] but it doesn't work for me. Iam working with Odoo V8.

  [1]: https://stackoverflow.com/questions/31963214/odoo-prevent-button-from-closing-wizard


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi Osmani,

Normal way it won't work as you expect. You need to create a web (just like Create / Save) button and bind it with the JS click event. From the JS function, you can open your wizard without saving your existing record.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Replacing vals with blank dictionary(not always but based on some condition) should work but wont suggest to do so  as explained in \https://github.com/odoo/odoo/issues/26527

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
เม.ย. 19
9775
how can i add default image to wizard?? แก้ไขแล้ว
3
มิ.ย. 19
5318
1
มี.ค. 15
6919
Close wizard after print report แก้ไขแล้ว
3
ก.พ. 24
12701
1
ส.ค. 20
5379