account_hash_integrity_templates.py 738 B

1234567891011121314151617181920212223
  1. # -*- coding: utf-8 -*-
  2. # Part of Odoo. See LICENSE file for full copyright and licensing details.
  3. from odoo import api, fields, models
  4. class ReportAccountHashIntegrity(models.AbstractModel):
  5. _name = 'report.account.report_hash_integrity'
  6. _description = 'Get hash integrity result as PDF.'
  7. @api.model
  8. def _get_report_values(self, docids, data=None):
  9. if data:
  10. data.update(self.env.company._check_hash_integrity())
  11. else:
  12. data = self.env.company._check_hash_integrity()
  13. return {
  14. 'doc_ids' : docids,
  15. 'doc_model' : self.env['res.company'],
  16. 'data' : data,
  17. 'docs' : self.env['res.company'].browse(self.env.company.id),
  18. }