Files
odoo_source/addons/website_sale/views/website_views.xml
T
Walid HANNICHE (waha) 3d16470717 [FIX] website_sale: prevent adding empty fields
Steps to reproduce:
1- install eComerce app and activate debug mode
2- go to Website > Configuration > Websites
3- on a website product page extra fields tab add an empty line and save
4- visit any product page on the website (500: internal server error)

Bug:
adding an empty field crashes the website server on the product page

Fix:
made the field required

opw-2945621

closes odoo/odoo#100541

X-original-commit: c00fd50ef59030848a7f7dbfff4c0ff90645cc26
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-19 21:58:07 +02:00

21 lines
895 B
XML

<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="view_website_sale_website_form" model="ir.ui.view">
<field name="name">website_sale.website.form</field>
<field name="model">website</field>
<field name="inherit_id" ref="website.view_website_form"/>
<field name="arch" type="xml">
<xpath expr="//notebook" position="inside">
<page string="Product Page Extra Fields" groups="base.group_no_one">
<field name="shop_extra_field_ids" context="{'default_website_id': active_id}">
<tree editable="bottom">
<field name="sequence" widget="handle"/>
<field name="field_id" required="1"/>
</tree>
</field>
</page>
</xpath>
</field>
</record>
</odoo>