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

Model : stock.picking


i want to add 2 new column in one2many(stock.pack.operations) after click on button that is show only partially available or available state.


i have tried.

here, i want to show accept_q and accept_deviation field or qc_reject

in XML

<field name="accept_q" invisible="context.get('accept', False)"/>
<field name="accept_deviation" invisible="context.get('accept', True)"/>
<field name="qc_reject" invisible="context.get('reject', False)"/>


.py

 @api.multi
    def qc_check_btn(self):
        con=self.env.context.copy()
        for line in self.pack_operation_product_ids:
            line.qc_check = True

                   con.update({

                                         'accept':False if line.location_dest_id.qc_location else True,
                                        'reject':True if line.location_dest_id.qc_location else False,
                     })
        return {
            'type': 'ir.actions.client',
            'tag': 'reload',
            'context': con,
        }

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 10 22
9871
2
thg 11 19
10871
0
thg 8 18
2657
1
thg 5 17
7608
4
thg 11 15
13975