我在.py文件中编写了一些python代码来显示向导
class DisplayWindow(models.Model):
_inherit = 'res.partner'
wizard_id = fields.Many2one('sale.example_wizard')
def result_to_search(self, cr, uid, active_ids):
wizard = self.pool['sale.example_wizard'].create(cr, uid, vals={
'partner_ids': [(6, 0, active_ids)]
})
return {
'name': _('Account Search'),
'type': 'ir.actions.act_window',
'res_model': 'sale.example_wizard',
'res_id': wizard,
'view_type': 'form',
'view_mode': 'form',
'target': 'new',
}
这是我的.xml文件
^{pr2}$我的问题是,当我从客户列表视图中选择所有客户时,它只选择第一页联系人,而不管我为向导的按钮编写了什么代码,它都只适用于第一页的联系人顾客。但是在我的数据库中我假设所有的客户都能得到我想要的结果。 可能我对这段代码做了些错误
wizard = self.pool['sale.example_wizard'].create(cr, uid, vals={
'partner_ids': [(6, 0, active_ids)]
})
请帮帮我。如果需要的话,我可以解释更多。谢谢
您可以使用以下代码获取所选记录。在
谢谢
相关问题 更多 >
编程相关推荐