Skip to content

Commit

Permalink
[FIX] cep: filter payments by create_date
Browse files Browse the repository at this point in the history
  • Loading branch information
robinkeunen committed Jun 10, 2021
1 parent 4e90fd8 commit 79ff295
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions csv_export_base/models/csv_export_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions csv_export_payment/models/csv_export_payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion csv_export_payment/views/export_csv_payment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
attrs="{'invisible':[('data','=',False)]}"
/>
</footer>

</form>
</field>
</record>
Expand Down

0 comments on commit 79ff295

Please sign in to comment.