[IMP] base_comment_template: Dynamic placeholder genereator added.
parent
a4f870f115
commit
43c4e7f805
|
@ -5,7 +5,7 @@
|
||||||
"name": "Base Comments Templates",
|
"name": "Base Comments Templates",
|
||||||
"summary": "Add conditional mako template to any report"
|
"summary": "Add conditional mako template to any report"
|
||||||
"on models that inherits comment.template.",
|
"on models that inherits comment.template.",
|
||||||
"version": "15.0.2.0.0",
|
"version": "15.0.2.0.1",
|
||||||
"category": "Reporting",
|
"category": "Reporting",
|
||||||
"website": "https://github.com/OCA/reporting-engine",
|
"website": "https://github.com/OCA/reporting-engine",
|
||||||
"author": "Camptocamp, Odoo Community Association (OCA)",
|
"author": "Camptocamp, Odoo Community Association (OCA)",
|
||||||
|
|
|
@ -11,6 +11,7 @@ class BaseCommentTemplate(models.Model):
|
||||||
"""Comment templates printed on reports"""
|
"""Comment templates printed on reports"""
|
||||||
|
|
||||||
_name = "base.comment.template"
|
_name = "base.comment.template"
|
||||||
|
_inherit = "mail.render.mixin"
|
||||||
_description = "Comments Template"
|
_description = "Comments Template"
|
||||||
_order = "sequence,id"
|
_order = "sequence,id"
|
||||||
|
|
||||||
|
|
|
@ -77,6 +77,26 @@
|
||||||
<page name="text" string="Comment">
|
<page name="text" string="Comment">
|
||||||
<field name="text" />
|
<field name="text" />
|
||||||
</page>
|
</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>
|
</notebook>
|
||||||
</sheet>
|
</sheet>
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Reference in New Issue