# -*- coding: utf-8 -*- from odoo import models, fields, api from odoo.exceptions import UserError, ValidationError from psycopg2 import sql, DatabaseError from odoo.tools.safe_eval import safe_eval, datetime from werkzeug import utils class opendons_template_rf(models.Model): _name = 'opendons.template_rf' _description = 'manage rf html template' name=fields.Char('name') description=fields.Text('description') active=fields.Boolean('active') html_content=fields.Html('Html content') type_id=fields.Many2one('opendons.type_template_rf', required=True) def action_update_receipts(self): rf=self.env['donation.tax.receipt'].search([('template_rf_id','=',int(self.id))]) for r in rf: r.html_content=self.html_content class opendons_type_template_rf(models.Model): _name = 'opendons.type_template_rf' _description = 'manage type rf template' name=fields.Char('name')