Skip to Content
Menu
This question has been flagged

How would I create a filter in the Product Variants screen that would remove all variants that are currently on either a quotation, sale order, invoice etc...??


The filter "Stock move ids is not set" does not remove all variants that have quotations or sale order/invoices associated with them as I get the following error when trying to delete them;


Odoo Warning - 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: Invoice Line - account.invoice.line]

This is when the product is on a Invoice.



Odoo Warning - 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: Sales Order Line - sale.order.line]

This is when the product is on a Quotation.



How do I create a filter that returns results that have only variants with no associated quotations, sales order or invoices attached to their id??


Is anyone here capable of writing such a filter??



Odoo10 Enterprise

Trying to clean out unused variants before upgrading the database.

Any help would be really appreciated.


Thank you.

Avatar
Discard
Related Posts Replies Views Activity
2
Jan 24
652
2
Oct 23
4745
1
Sep 23
410
4
Aug 23
9896
2
Nov 22
5151