details: https://code.tryton.org/tryton/commit/5395d22d4a07
branch: default
user: Cédric Krier <[email protected]>
date: Tue Oct 21 11:00:36 2025 +0200
description:
Format date with contextual language when used as record name
diffstat:
modules/currency/currency.py | 2 +-
modules/product_cost_history/product.py | 2 +-
modules/stock/period.py | 2 +-
modules/timesheet_cost/company.py | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diffs (45 lines):
diff -r 2d2af73e62f2 -r 5395d22d4a07 modules/currency/currency.py
--- a/modules/currency/currency.py Fri Oct 17 17:59:53 2025 +0200
+++ b/modules/currency/currency.py Tue Oct 21 11:00:36 2025 +0200
@@ -288,7 +288,7 @@
return Date.today()
def get_rec_name(self, name):
- return str(self.date)
+ return Pool().get('ir.lang').get().strftime(self.date)
class CronFetchError(Exception):
diff -r 2d2af73e62f2 -r 5395d22d4a07 modules/product_cost_history/product.py
--- a/modules/product_cost_history/product.py Fri Oct 17 17:59:53 2025 +0200
+++ b/modules/product_cost_history/product.py Tue Oct 21 11:00:36 2025 +0200
@@ -155,4 +155,4 @@
return history_table.company == company_id
def get_rec_name(self, name):
- return str(self.date)
+ return Pool().get('ir.lang').get().strftime(self.date)
diff -r 2d2af73e62f2 -r 5395d22d4a07 modules/stock/period.py
--- a/modules/stock/period.py Fri Oct 17 17:59:53 2025 +0200
+++ b/modules/stock/period.py Tue Oct 21 11:00:36 2025 +0200
@@ -75,7 +75,7 @@
return pool.get('stock.period.cache')
def get_rec_name(self, name):
- return str(self.date)
+ return Pool().get('ir.lang').get().strftime(self.date)
@classmethod
@ModelView.button
diff -r 2d2af73e62f2 -r 5395d22d4a07 modules/timesheet_cost/company.py
--- a/modules/timesheet_cost/company.py Fri Oct 17 17:59:53 2025 +0200
+++ b/modules/timesheet_cost/company.py Tue Oct 21 11:00:36 2025 +0200
@@ -103,7 +103,7 @@
return Date.today()
def get_rec_name(self, name):
- return str(self.date)
+ return Pool().get('ir.lang').get().strftime(self.date)
@classmethod
def on_modification(cls, mode, prices, field_names=None):