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

@api.multi
    def action_open_product_wizard(self):
        context = {
            'product_id':self.product_id.id,

             'qty':self.qty,

             'line_id':self.id
            }
        return {
            'name': ('Batch Allocation'),
            'view_type':'form',
            'view_mode':'form',
            'res_model': 'batch.wise_allocation',
            'view_id':False,
            'type':'ir.actions.act_window',
            'target':'new',
            'context': context,
            }


#Something is wrong in the context it is not loading the desired fields

Аватар
Отменить
Лучший ответ

You have to prepend a default_ to the variable names in the context (qty -> default_qty), so that they will be taken as the default value for the wizard.

Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
янв. 25
1111
0
дек. 15
3457
1
мар. 15
5416
0
мар. 15
3785
0
июл. 25
232