Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
3 Odpowiedzi
1664 Widoki

im using ondelete parameter in several fields but somehow im getting this warning

WARNING prestaterreihza odoo.fields: Field certification.agreement.agreement_ids: unknown parameter 'ondelete', if this is an actual parameter you may want to override the method _valid_field_parameter on the relevant model in order to allow it

this is one of my warning field

    agreement_ids = fields.One2many('certification.agreement.line', 'agreement_id', string='Agreement Line', ondelete='cascade')

is there any requirement or something that needed to use the ondelete parameter? im currently in odoo 17

Awatar
Odrzuć
Najlepsza odpowiedź

ondelete normally use for m2o and selection field, not o2m field. If you get warning for m2o field please check if your many2one field is store or not

Awatar
Odrzuć
Najlepsza odpowiedź

no you can use this to only in m20 example agreement_id in this field

Awatar
Odrzuć
Autor Najlepsza odpowiedź

for addition, i also have a many2one field that has ondelete parameter and it also gives a warning message

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
maj 23
2273
3
lip 25
1982
1
cze 25
2318
2
maj 25
1969
1
maj 25
1186