[已解决]wizard 不触发
-
触发wizard的button的方法如下:能返回action,但是不弹出wizard的??
@api.one def batch_import(self): if self.env.user: action = self.env.ref('sps_product.action_import_wizard').read()[0] return action
wizard代码:
class ImportWizard(models.TransientModel): _name = 'import.wizard' selected = fields.Integer("Total Num", readonly=1) imported = fields.Integer("Valid Num", readonly=1) to_import = fields.Text() data = fields.Binary("File") state = fields.Selection([('1', '1'), ('2', '2')], string='State', default='1')