Skip to content

Commit

Permalink
[REF] change upgrade script from checks for micropi
Browse files Browse the repository at this point in the history
  • Loading branch information
jjscarafia committed Jan 16, 2019
1 parent 685e422 commit dc33bde
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions account_check/migrations/9.0.1.0.0/post-migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,21 @@ def get_payment(env, voucher_id):
'* Payments: %s\n'
'* Domain: %s' % (payment, domain))
else:
raise ValidationError(
'Error de cheque al querer vincular con pago')
# raise ValidationError(
# 'Error de cheque al querer vincular con pago')
print (
'Error de cheque al querer vincular con pago. move_id %s, '
'state %s, voucher id %s' % (move_id, state ,voucher_id))
payment = env['account.payment'].create({
'state': 'cancel', 'partner_id': partner_id,
'amount': abs(amount), 'journal_id': journal_id,
'payment_reference':
'Creado por error en v8, pago sin asiento, '
'necesario para cheque',
'payment_method_id': env.ref(
'account.account_payment_method_manual_in').id,
'payment_type': amount > 0 and 'inbound' or 'outbound',
'partner_type': False, 'payment_date': create_date})
return payment
return False

Expand Down

0 comments on commit dc33bde

Please sign in to comment.