Search code examples
odoo

Odoo 13 : how to allow field to be editable in form builder



I want to allow field to be editable in form builder,
I added "title" field in a custom odoo form (contact form), but it shouldn't in website_form_blacklised, so I wrote this code :

class CrmLead(models.Model):
    _inherit = "crm.lead"
    title = fields.Many2one(website_form_blacklisted=False)

But it doesn't work,
Can you help me?


Solution

  • Solved, I added this in xml,

    <function model="ir.model.fields" name="formbuilder_whitelist">
            <value>crm.lead</value>
            <value eval="[
                'title'
            ]"/>
        </function>