Skip to Content
Menu
v 10.0 v 11.0 Third Party 3518
Download for v 12.0 Deploy on Odoo.sh
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Discuss (mail)
Website (website)
Lines of code 1112
Technical Name website_form_builder
LicenseLGPL-3
Websitehttps://github.com/OCA/website
Versions 10.0 11.0
You bought this module and need support? Click here!

Website Form Builder

Beta License: LGPL-3 OCA/website Translate me on Weblate Try me on Runboat

This module provides websites the feature of adding custom forms in any page.

Table of contents

Installation

Install some other addon that provides website_form support to benefit from this one’s features. Hints:

  • website_crm
  • website_form_project
  • website_hr_recruitment
  • website_sale

Configuration

To configure this module, you need to:

  1. Have Administration / Settings privileges.
  2. Go to Settings > Activate developer mode.
  3. Go to Settings > Technical > Database Structure > Models.
  4. Search for the model you want to manage website form access for.
  5. When you find it, it will have a Website Forms section where you can:
    • Allow the model to get forms, by checking Allowed to use in forms.
    • Give the model forms a better name in Label for form action.
    • Choose the field where to store custom fields data in Field for custom form data. If you leave this one empty and the model is a mail thread, a new message will be appended with that custom data.
  6. In the Fields tab, there’s a new column called Blacklisted in web forms. It’s a security feature that forbids form submitters to write to those fields. When you create a new website form, all its model fields are automatically whitelisted for the sake of improving the UX. If you want to have higher control, come back here after creating the form and blacklist any fields you want, although that will only work for custom fields.

Usage

To use this module, you need to:

  1. Go to any of your website pages.
  2. Edit it.
  3. Drag and drop the Form snippet into the page.
  4. Use the snippet overlay to add, edit and remove fields.
  5. If you want to set a hidden field, make sure you set a valid default value on it, or users may get hidden errors and they might even be unable to send the form!

Known issues / Roadmap

  • These type of fields will not appear, they are forbidden since they make no sense in this module’s context, or a correct implementation would be adding not much value while adding lots of complexity:
    • id
    • create_uid
    • create_date
    • write_uid
    • write_date
    • __last_update
    • Any one2many fields
    • Any reference fields
    • Any serialized fields
    • Any read-only fields
  • You should include https://github.com/odoo/odoo/pull/21628 in your installation to get a better UX when a user has already sent a form and cannot resend it.
  • To edit any <label> text, you need to click twice. Review the problem once https://bugzilla.mozilla.org/show_bug.cgi?id=853519 gets fixed.
  • You cannot edit base fields blacklisted status manually because Odoo forbids that for security.
  • website_form works in unexpected and undocumented ways. If you plan to add support in your addon, this is a good place to start reading.
  • If you add a custom file upload field to a form that creates records in models that have no mail.thread inheritance, your users will be unable to send the form.
  • This module it’s incompatible with ‘website_form_recaptcha’ module.

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • Tecnativa

Contributors

Other credits

Images

  • https://openclipart.org/detail/281632/form
  • https://openclipart.org/detail/224192/simple-grey-small-pencil-icon-white-background

Maintainers

This module is maintained by the OCA.

Odoo Community Association

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

This module is part of the OCA/website project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.
This is the error when I try to update
by
Daly Babay
on 4/12/20, 11:39 PM

Error: Odoo Server Error Traceback (most recent call last): File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190918-py3.7.egg/odoo/http.py", line 656, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190918-py3.7.egg/odoo/http.py", line 314, in _handle_exception raise pycompat.reraise(type(exception), exception, sys.exc_info()[2]) File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190918-py3.7.egg/odoo/tools/pycompat.py", line 87, in reraise raise value File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190918-py3.7.egg/odoo/http.py", line 698, in dispatch result = self._call_function(**self.params) File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190918-py3.7.egg/odoo/http.py", line 346, in _call_function return checked_call(self.db, *args, **kwargs) File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190918-py3.7.egg/odoo/service/model.py", line 97, in wrapper return f(dbname, *args, **kwargs) File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190918-py3.7.egg/odoo/http.py", line 339, in checked_call result = self.endpoint(*a, **kw) File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190918-py3.7.egg/odoo/http.py", line 941, in __call__ return self.method(*args, **kw) File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190918-py3.7.egg/odoo/http.py", line 519, in response_wrap response = f(*args, **kw) File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190918-py3.7.egg/odoo/addons/web/controllers/main.py", line 962, in call_kw return self._call_kw(model, method, args, kwargs) File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190918-py3.7.egg/odoo/addons/web/controllers/main.py", line 954, in _call_kw return call_kw(request.env[model], method, args, kwargs) File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190918-py3.7.egg/odoo/api.py", line 749, in call_kw return _call_kw_multi(method, model, args, kwargs) File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190918-py3.7.egg/odoo/api.py", line 736, in _call_kw_multi result = method(recs, *args, **kwargs) File "", line 2, in button_immediate_upgrade File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190918-py3.7.egg/odoo/addons/base/models/ir_module.py", line 74, in check_and_log return method(self, *args, **kwargs) File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190918-py3.7.egg/odoo/addons/base/models/ir_module.py", line 622, in button_immediate_upgrade return self._button_immediate_function(type(self).button_upgrade) File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190918-py3.7.egg/odoo/addons/base/models/ir_module.py", line 561, in _button_immediate_function modules.registry.Registry.new(self._cr.dbname, update_module=True) File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190918-py3.7.egg/odoo/modules/registry.py", line 86, in new odoo.modules.load_modules(registry._db, force_demo, status, update_module) File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190918-py3.7.egg/odoo/modules/loading.py", line 417, in load_modules force, status, report, loaded_modules, update_module, models_to_check) File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190918-py3.7.egg/odoo/modules/loading.py", line 313, in load_marked_modules perform_checks=perform_checks, models_to_check=models_to_check File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190918-py3.7.egg/odoo/modules/loading.py", line 227, in load_module_graph migrations.migrate_module(package, 'post') File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190918-py3.7.egg/odoo/modules/migration.py", line 181, in migrate_module mod = load_script(pyfile, name) File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190918-py3.7.egg/odoo/modules/migration.py", line 46, in load_script spec.loader.exec_module(module) File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190918-py3.7.egg/Custom_v12/website_form_builder/migrations/12.0.1.1.0/post-migrate.py", line 4, in from openupgradelib import openupgrade as ou ModuleNotFoundError: No module named 'openupgradelib'


It's really good module ! Thanks guys !
by
bhavikvyas1991@gmail.com
on 9/11/19, 7:26 PM

On a side note: Have anybody extended this module for using One2many fields in the website form as well ?


There are no comments yet!