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

I have a form with one2many view. when I click the one2many record a popup will show the record. In that popup record I have a button action for them. When I Click the Button the action will performed but the one2many popup record is not closing. I want to close that popup record when the button action will perform. 

How can I do this.........?

Here below I given the Button return value . In that how can I give Flag to close the one2many popup window.


return {

            'name': _ ('List'),

            'type': 'ir.actions.act_window',

            'view_type': 'form',

            'view_mode': 'form',

            'res_model': 'product.pricelist',

            'views': [(view.id, 'form')],

            'view_id': view.id,

            'flags': {'initial_mode': 'edit'},

            'res_id': self.id,

            }  



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

Hi Muniswaran, 

If you want to close it, you need to get rid of the return section. It tells you to reopen a popoup after you click on your button.

Probably the good way is to add a footer with 2 buttons ( Validate and Cancel )

<footer>
     <button name="button_validate" type="object"  string="Validate" class="oe_highlight"/>
     <button string="Cancel" class="oe_link" special="cancel"/>
</footer>


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 11 16
3843
0
thg 7 21
6681
0
thg 4 25
565
2
thg 1 25
15673
1
thg 1 25
1769