Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
3919 Представления

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

Аватар
Отменить
Related Posts Ответы Просмотры Активность
2
окт. 22
9770
2
нояб. 19
10772
0
авг. 18
2547
1
мая 17
7521
4
нояб. 15
13906