|
@@ -63,29 +63,7 @@ class AccountVoucher(models.Model):
|
|
|
'state': 'paid'
|
|
|
})
|
|
|
|
|
|
-
|
|
|
- # step 2 create voucher
|
|
|
- # account_voucher = self.create({
|
|
|
- # 'reference': values['reference'],
|
|
|
- # 'type': 'receipt',
|
|
|
- # 'journal_id': journal.id,
|
|
|
- # 'company_id': company.id,
|
|
|
- # 'pre_line': True,
|
|
|
- # 'amount': float(values['amount']),
|
|
|
- # 'period_id': int(period.id),
|
|
|
- # 'date': fields.Date.context_today(self),
|
|
|
- # 'partner_id': partner.id,
|
|
|
- # 'account_id': journal.default_credit_account_id.id,
|
|
|
- # 'currency_id': currency_id,
|
|
|
- # 'line_cr_ids': [[0, False, {
|
|
|
- # 'date_due': line.date_maturity,
|
|
|
- # 'account_id': line.account_id.id,
|
|
|
- # 'date_original': line.move_id.date,
|
|
|
- # 'move_line_id': line.id,
|
|
|
- # 'amount_original': abs(line.credit or line.debit or 0.0),
|
|
|
- # 'amount_unreconciled': abs(line.amount_residual),
|
|
|
- # 'amount': abs(line.debit) if amount > line.debit else amount,
|
|
|
- # 'reconcile': line.move_id.date <= line.date_maturity,
|
|
|
- # 'currency_id': currency_id
|
|
|
- # }] for line in move_line]
|
|
|
- # })
|
|
|
+ return {
|
|
|
+ 'action_id': self.env['ir.actions.report.xml'].search([('report_name', '=', 'voucher_print.report_voucher')]).id,
|
|
|
+ 'voucher_id': account_voucher.id
|
|
|
+ }
|