mirror of
https://github.com/NaN-tic/trytond-systemlogics_modula.git
synced 2023-12-14 04:32:53 +01:00
Add datetime (YYYYMMDD-hhmmss) XML file names
This commit is contained in:
parent
2154eb2e80
commit
acfa09f946
|
@ -130,7 +130,8 @@ class SystemLogicsModula(ModelSQL, ModelView):
|
|||
|
||||
with tempfile.NamedTemporaryFile(
|
||||
dir=systemlogic.path,
|
||||
prefix='%s-' % (dbname),
|
||||
prefix='%s-%s-' % (dbname,
|
||||
datetime.datetime.now().strftime("%Y%m%d-%H%M%S")),
|
||||
suffix='.xml', delete=False) as temp:
|
||||
temp.write(xml.encode('utf-8'))
|
||||
logging.getLogger('systemlogics-modula').info(
|
||||
|
@ -194,7 +195,8 @@ class SystemLogicsModula(ModelSQL, ModelView):
|
|||
|
||||
with tempfile.NamedTemporaryFile(
|
||||
dir=systemlogic.path,
|
||||
prefix='%s-' % (dbname),
|
||||
prefix='%s-%s-' % (dbname,
|
||||
datetime.datetime.now().strftime("%Y%m%d-%H%M%S")),
|
||||
suffix='.xml', delete=False) as temp:
|
||||
temp.write(xml.encode('utf-8'))
|
||||
logging.getLogger('systemlogics-modula').info(
|
||||
|
|
Loading…
Reference in a new issue