minor fix
This commit is contained in:
parent
7e8f40f4f6
commit
4fab20f229
13
statement.py
13
statement.py
|
@ -1,9 +1,9 @@
|
|||
# This file is part of the sale_pos module for Tryton.
|
||||
# The COPYRIGHT file at the top level of this repository contains the full
|
||||
# copyright notices and license terms.
|
||||
from datetime import date, timedelta, datetime
|
||||
from datetime import date, datetime
|
||||
from decimal import Decimal
|
||||
|
||||
from dateutil import tz
|
||||
from trytond.model import fields, ModelView, ModelSQL, Workflow
|
||||
from trytond.pool import Pool, PoolMeta
|
||||
from trytond.transaction import Transaction
|
||||
|
@ -342,6 +342,8 @@ class OpenStatement(Wizard):
|
|||
Sale = pool.get('sale.sale')
|
||||
Invoice = pool.get('account.invoice')
|
||||
Date = pool.get('ir.date')
|
||||
Company = pool.get('company.company')
|
||||
company = Company(Transaction().context.get('company'))
|
||||
today = Date.today()
|
||||
user = Transaction().user
|
||||
user = User(user)
|
||||
|
@ -359,10 +361,9 @@ class OpenStatement(Wizard):
|
|||
|
||||
vlist = []
|
||||
result = ''
|
||||
time = datetime.now()
|
||||
today = date.today()
|
||||
timedelta_ = time - timedelta(hours=5)
|
||||
today = date(timedelta_.year, timedelta_.month, timedelta_.day)
|
||||
time_zone = company.timezone
|
||||
now_ = datetime.now(tz.gettz(time_zone))
|
||||
today = date(now_.year, now_.month, now_.day)
|
||||
for journal in device.journals:
|
||||
statements_today = Statement.search([
|
||||
('journal', '=', journal.id),
|
||||
|
|
Loading…
Reference in New Issue