# -*- 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') css=fields.Text('css') type_rf=fields.Selection(string='type',selection=[('generic','Generic'),('affectation','Affectation'),('high amount','High amount')]) def action_print(self): self.ensure_one() return self.env.ref("opendons.report_tax_receipt_template").report_action(self)