Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
3098 Переглядів

@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
1022
0
груд. 15
3389
1
бер. 15
5315
0
бер. 15
3677
0
лип. 25
79