Skip to content
Snippets Groups Projects
Commit 590b6adb1b36 authored by oury.balde's avatar oury.balde
Browse files

Force account move date when the value is empty.

Note that when the account move date is empty an exception:
constraint null value is raised during execution of action_move_create() method.
parent 72d97c5696f7
No related branches found
No related tags found
No related merge requests found
......@@ -51,6 +51,9 @@
"""Override to set a transaction date from invoices.
"""
if not vals.get("date"):
vals["date"] = fields.Date.context_today(self)
invoice = self.env.context.get("invoice")
if invoice and isinstance(invoice, models.BaseModel):
if not isinstance(vals, dict):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment