pavs_one2many
The values list on a product attribute. Deleting one asks the server whether anything is using it, and refuses outright if the answer is yes, before any confirmation is offered.
| Technical name | pavs_one2many |
|---|---|
| Field types | one2many |
| Views | form, with an embedded list |
| Module | product, present wherever products exist |
| Used in core | 1 occurrence, the values list on the product attribute form in product |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0 |
| No-code setup | No. It calls a server method specific to attribute values |
| Alternatives | one2many, auto_save_res_partner, payment_term_line_ids, many2many_tags |
What the attribute values list does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
check_is_used_on_products | server method | Called before any deletion. A returned message means the value is in use and the deletion is refused with that message.(since Odoo 18.0) |
editable | string (list attribute) | Set on the embedded list. Governs inline editing of the values. |
delete | boolean (list attribute) | Set on the embedded list. Turning it off removes the delete action entirely, and with it the guard.(default: true) |
The guard is a server call. The widget asks a method on the attribute value model whether the value is used, and treats any returned message as a refusal. That means the rule lives in Python, where it can be extended by another module without touching the widget.
Working examples
Ask the server before asking the user
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. Only the confirmation button's styling changes on the development branch. |
| Odoo 19.0 | Verified | Verified against the shipped source. The delete confirmation is properly awaited. |
| Odoo 18.0 | Partial / changed | Same guard, but the confirmation was not awaited, so callers continued before the user answered. |
| Odoo 17.0 | Not available | Widget does not exist. |
| Odoo 16.0 | Not available | Widget does not exist. |
Upgrade note. No view change is needed. The widget arrived in Odoo 18, and Odoo 19 changed only how the confirmation is awaited, which affects sequencing rather than the visible flow. On Odoo 17 and earlier the values list had no guard of this kind.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| A value cannot be deleted | The server reported it as used on products, and the widget refuses before offering a confirmation. Read the message; remove the value from the products using it first. |
| Deleting removed the value immediately | Intended. Confirming unlinks server side and then saves the attribute rather than queueing the change. Expected. There is nothing to discard afterwards. |
| A new row deletes without any check | An unsaved row has nothing on the server to check. Expected. |
| Deleting several rows behaves oddly on Odoo 18 | The confirmation was not awaited on that version, so sequences of deletions overlapped. Upgrade to Odoo 19, where the confirmation blocks properly. |
| The refusal message is unclear | The text comes from the server method, not the widget. Adjust the message in Python if you maintain that module. |
| Options are ignored | The widget declares none and the descriptor forwards the dictionary to the embedded list. Use the list attributes instead. |
Attribute values list vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
pavs_one2many | Deleting configuration records that other data may depend on | Asks the server whether the value is in use and refuses with the server's own message before confirming |
| one2many | Child rows with no deletion consequences | Deletes without a server check, leaving failures to surface on save |
| auto_save_res_partner | Child lists needing a saved parent | Guards the add action rather than the delete |
payment_term_line_ids | Lists whose new rows must survive a click elsewhere | Another small guard on the same family of widget |
| many2many_tags | Linking values rather than owning them | Unlinking rather than deleting, so the question does not arise |
Frequently asked questions
Why can I not delete an attribute value?+
Why is the deletion immediate rather than pending?+
What about a row I just added?+
What changed in Odoo 19?+
Can I change the refusal message?+
Product data that survives its own history
Attributes, variants and the documents that reference them are easy to change and hard to unpick. We structure Odoo product data so today's cleanup does not break last year's orders, on versions 16 through 19.
Book a free consultation