diff --git a/csv_export_base/models/csv_export_history.py b/csv_export_base/models/csv_export_history.py index 031734b..0160f1c 100644 --- a/csv_export_base/models/csv_export_history.py +++ b/csv_export_base/models/csv_export_history.py @@ -10,6 +10,7 @@ class CSVExportHistory(models.Model): _name = "csv.export.history" + _order = "date desc" date = fields.Datetime(string="Date", required=True) path = fields.Char(string="Path", required=True) diff --git a/csv_export_payment/models/csv_export_payment.py b/csv_export_payment/models/csv_export_payment.py index c025cb9..672ba76 100644 --- a/csv_export_payment/models/csv_export_payment.py +++ b/csv_export_payment/models/csv_export_payment.py @@ -26,15 +26,15 @@ class PartnerCSVExport(models.TransientModel): _filename_template = "CASH_%Y%m%d_%H%M_%S%f.csv" def get_domain(self): + # est-ce que les paiments peuvent rester en draft plusieurs jours? + # => non, les paiements ne passent pas par l'état brouillon. return [ ("journal_id.type", "=", "cash"), ("state", "!=", "draft"), - ("payment_date", ">=", self.start_date), - ("payment_date", "<", self.end_date), + ("create_date", ">=", self.start_date), + ("create_date", "<", self.end_date), ] - # est-ce que les paiments peuvent rester en draft plusieurs jours? - def get_headers(self): return HEADERS diff --git a/csv_export_payment/views/export_csv_payment.xml b/csv_export_payment/views/export_csv_payment.xml index aad8589..10916fc 100644 --- a/csv_export_payment/views/export_csv_payment.xml +++ b/csv_export_payment/views/export_csv_payment.xml @@ -32,7 +32,6 @@ attrs="{'invisible':[('data','=',False)]}" /> -