Skip to content
Snippets Groups Projects
Commit 997ccc78 authored by Benjamin - Le Filament's avatar Benjamin - Le Filament
Browse files

[add] filename in fields

parent 362009d9
No related branches found
No related tags found
No related merge requests found
...@@ -28,6 +28,7 @@ class CgscopRigaOdooImport(models.Model): ...@@ -28,6 +28,7 @@ class CgscopRigaOdooImport(models.Model):
is_warning = fields.Boolean('Warning', default=False) is_warning = fields.Boolean('Warning', default=False)
log = fields.Text('Log') log = fields.Text('Log')
is_error = fields.Boolean('Erreur Synchro', default=False) is_error = fields.Boolean('Erreur Synchro', default=False)
filename = fields.Char('Nom du fichier')
# ------------------------------------------------------ # ------------------------------------------------------
# Fonctions génériques # Fonctions génériques
...@@ -133,6 +134,9 @@ class CgscopRigaOdooImport(models.Model): ...@@ -133,6 +134,9 @@ class CgscopRigaOdooImport(models.Model):
self.create({ self.create({
'model_id': model.id, 'model_id': model.id,
'is_sync': True, 'is_sync': True,
'filename': (data.riga_filename +
date_value.strftime(data.suffix) + '.' +
data.riga_extension),
'log': ("Import du fichier " + data.riga_filename + 'log': ("Import du fichier " + data.riga_filename +
date_value.strftime(data.suffix) + '.' + date_value.strftime(data.suffix) + '.' +
data.riga_extension + " : \n" + data.riga_extension + " : \n" +
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
decoration-danger="is_error" decoration-warning="is_warning" > decoration-danger="is_error" decoration-warning="is_warning" >
<field name="create_date"/> <field name="create_date"/>
<field name="model_id"/> <field name="model_id"/>
<field name="filename"/>
<field name="is_sync"/> <field name="is_sync"/>
<field name="is_warning"/> <field name="is_warning"/>
<field name="is_error"/> <field name="is_error"/>
...@@ -31,6 +32,7 @@ ...@@ -31,6 +32,7 @@
<group> <group>
<field name="create_date" readonly="1" /> <field name="create_date" readonly="1" />
<field name="model_id" readonly="1" /> <field name="model_id" readonly="1" />
<field name="filename" readonly="1" />
</group> </group>
<group> <group>
<field name="is_sync"/> <field name="is_sync"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment