[IMP] Add wizard to import ZPL2

This commit is contained in:
Florent de Labarre
2018-01-20 23:20:11 +01:00
committed by Nils Hamerlinck
parent 76e719e09b
commit 92511a0533
9 changed files with 576 additions and 0 deletions

View File

@@ -272,6 +272,17 @@ class PrintingLabelZpl2(models.Model):
def unlink_action(self):
self.mapped('action_window_id').unlink()
def import_zpl2(self):
self.ensure_one()
return {
'view_type': 'form',
'view_mode': 'form',
'res_model': 'wizard.import.zpl2',
'type': 'ir.actions.act_window',
'target': 'new',
'context': {'default_label_id': self.id},
}
def _get_record(self):
self.ensure_one()
Obj = self.env[self.model_id.model]