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

hello guys. i want to ask some questions about SQL constraints when importing data in odoo

let's say i have 1 field (name) and I've added SQL constraints unique to that field.. what happens if we importing 2 rows with the same name?


for example:
rows 1: test123
rows 2: test123


do the validation sql constraints pop up shows or we keep importing the data but only the last row (row 2)? thanks


Awatar
Odrzuć
Najlepsza odpowiedź

Hi,
The SQL constraints do work while importing data.
Regards

Awatar
Odrzuć
Najlepsza odpowiedź

You can check importing with sample date.

I think import will fail due to constraint error. Once remove duplicate row, then only import success.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
@api.constrains Rozwiązane
2
gru 23
3653
0
cze 21
2846
1
lis 20
4641
2
mar 24
5933
1
lip 23
1891