[FIX] date error
This commit is contained in:
parent
9a9ab49e24
commit
7c811ccf2b
@ -22,7 +22,7 @@ months = ["",
|
|||||||
"мая", "июня", "июля", "августа",
|
"мая", "июня", "июля", "августа",
|
||||||
"сентября", "октября", "ноября", "декабря",
|
"сентября", "октября", "ноября", "декабря",
|
||||||
]
|
]
|
||||||
date = self.date_conclusion_fix or self.date_conclusion or self.create_date
|
date = self.get_date()
|
||||||
dd = date.day
|
dd = date.day
|
||||||
mm = date.month
|
mm = date.month
|
||||||
yyyy = date.year
|
yyyy = date.year
|
||||||
|
@ -97,6 +97,9 @@ class PartnerContract(models.Model):
|
|||||||
"context": {"self_id": self.id},
|
"context": {"self_id": self.id},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def get_date(self):
|
||||||
|
return self.date_conclusion_fix or self.date_conclusion_fix or self.create_date
|
||||||
|
|
||||||
|
|
||||||
class PrintTemplate(models.Model):
|
class PrintTemplate(models.Model):
|
||||||
_name = "res.partner.template.print"
|
_name = "res.partner.template.print"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user