[FIX] Fixes found by review

This commit is contained in:
Stefan Rijnhart
2013-04-06 07:02:18 +02:00
parent b19939a25e
commit bcfa846bd5
2 changed files with 8 additions and 6 deletions

View File

@@ -131,7 +131,7 @@ class payment_order(orm.Model):
wizard_obj = self.pool.get(wizard_model)
wizard_id = wizard_obj.create(cr, uid, {}, context)
result = {
'name': wizard_obj._description or 'Payment Order Export',
'name': wizard_obj._description or _('Payment Order Export'),
'view_type': 'form',
'view_mode': 'form',
'res_model': wizard_model,

View File

@@ -57,7 +57,7 @@ class payment_order_create(orm.TransientModel):
# line2bank = line_obj.line2bank(cr, uid, line_ids, t, context)
line2bank = line_obj.line2bank(
cr, uid, line_ids, payment.mode.id, context)
_today = datetime.utcnow().strftime(DEFAULT_SERVER_DATE_FORMAT)
_today = fields.date.context_today(self, cr, uid, context=context)
### end account banking
## Finally populate the current payment with new lines:
@@ -69,15 +69,17 @@ class payment_order_create(orm.TransientModel):
### account_banking
# date_to_pay = line.date_maturity
date_to_pay = (
line.date_maturity if line.date_maturity
and line.date_maturity > _today else False)
line.date_maturity
if line.date_maturity and line.date_maturity > _today
else False)
### end account banking
elif payment.date_prefered == 'fixed':
### account_banking
# date_to_pay = payment.date_planned
date_to_pay = (
payment.date_planned if payment.date_planned
and payment.date_planned > _today else False)
payment.date_planned
if payment.date_planned and payment.date_planned > _today
else False)
### end account banking
### account_banking