中国本土应用
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
332B

  1. # -*- coding: utf-8 -*-
  2. import markdown
  3. from odoo import api, models, _
  4. class MarkdownConverter(models.AbstractModel):
  5. _name = "ir.qweb.field.markdown"
  6. _description = "Qweb Field Markdown"
  7. _inherit = "ir.qweb.field"
  8. @api.model
  9. def value_to_html(self, value, options):
  10. return markdown.markdown(value)
上海开阖软件有限公司 沪ICP备12045867号-1