Skip to Content
Menu
This question has been flagged

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,
        }

Avatar
Discard
Related Posts Replies Views Activity
2
Oct 22
8793
2
Nov 19
9721
0
Aug 18
1876
1
May 17
6711
4
Nov 15
12990