When I try to confirm a sale order through the UI, I get the following validation error:
The operation cannot be completed, probably due to the following:
- deletion: you may be trying to delete a record while other records still reference it- creation/update: a mandatory field is not correctly set
[object with reference: Product Template - product.template]
I am simply creating a basic sales order by selecting a few products and saving it, then clicking "Confirm Sale", but I keep getting the error. Does anybody know why this would be occurring?
I am working on what is basically a fresh Odoo 10 install with only a few modications. I created a custom view that inherits from sale.order.form.sale.stock and the content is:
<?xml version="1.0"?>
<data>
<xpath expr="//field[@name='order_line']/tree/field[@name='route_id']" position="before">
<field name="x_all_route_ids" invisible="1"/>
</xpath>
<xpath expr="//field[@name='order_line']/tree/field[@name='route_id']" position="attributes">
<attribute name="attrs">{'readonly': [('product_id', '=', False)]}</attribute>
<attribute name="domain">[('id', 'in', x_all_route_ids[0][2])]</attribute>
</xpath></data>
However, even when this view is inactive, the error still occurs, so I don't believe it is causing the issue.