Commit 38b881ab authored by Jean-Christophe CHOQUET's avatar Jean-Christophe CHOQUET
Browse files

correction export Sare

parent 54c59861
......@@ -323,7 +323,7 @@ class ActeSare(models.Model):
self._compute_verif_fields()
vals['verif_required_fields'] = self.verif_required_fields
if not vals['verif_required_fields']:
if not vals['verif_required_fields'] and vals['type_id'] != self.env.ref('ecarre_sare.type_act_a0',False).id:
raise ValidationError(_("Merci de vérifier les champs obligatoires."))
if 'family_id' not in vals or 'type_id' not in vals:
......@@ -563,6 +563,8 @@ class ActeSare(models.Model):
}
datas.append(vals)
acte.exported = True
return datas
@api.multi
......
......@@ -75,8 +75,7 @@ class ActeSareExportTBS(models.TransientModel):
buf.write(s.encode('cp1252', 'replace'))
out = base64.encodestring(buf.getvalue())
actes.write({'exported':True})
this.write({'state': 'get', 'export_data': out, 'filename': filename_name})
action = {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment