[IMP] base_comment_template: Dynamic placeholder genereator added.

pull/723/head
Bearnard21 2023-02-09 13:33:53 +03:00
parent a4f870f115
commit 43c4e7f805
3 changed files with 22 additions and 1 deletions

View File

@ -5,7 +5,7 @@
"name": "Base Comments Templates",
"summary": "Add conditional mako template to any report"
"on models that inherits comment.template.",
"version": "15.0.2.0.0",
"version": "15.0.2.0.1",
"category": "Reporting",
"website": "https://github.com/OCA/reporting-engine",
"author": "Camptocamp, Odoo Community Association (OCA)",

View File

@ -11,6 +11,7 @@ class BaseCommentTemplate(models.Model):
"""Comment templates printed on reports"""
_name = "base.comment.template"
_inherit = "mail.render.mixin"
_description = "Comments Template"
_order = "sequence,id"

View File

@ -77,6 +77,26 @@
<page name="text" string="Comment">
<field name="text" />
</page>
<page
string="Dynamic Placeholder Generator"
name="dynamic_placeholder_generator"
>
<group>
<field name="model_ids" invisible="1" />
<field
name="model_object_field"
domain="[('model_id','in',model_ids),('ttype','!=','one2many'),('ttype','!=','many2many')]"
/>
<field name="sub_object" readonly="1" />
<field
name="sub_model_object_field"
domain="[('model_id','=',sub_object),('ttype','!=','one2many'),('ttype','!=','many2many')]"
attrs="{'readonly':[('sub_object','=',False)],'required':[('sub_object','!=',False)]}"
/>
<field name="null_value" />
<field name="copyvalue" />
</group>
</page>
</notebook>
</sheet>
</form>