IntegrityError: null value in column "name" violates not-null constraint
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Boekhouding
- Voorraad
- PoS
- Project
- MRP
Deze vraag is gerapporteerd
I know this is late for your question, but on odoo 15 i just met exactly this issue, and If you or some one else meet this issue, here is how you can deal with it:
If you met this issue when coding with wizard (popup), you can try this:
This issue is because you missing "name" column, to solve this, you need to set value for "name" column.
In below example, i've try to set value for "name" column by onchange function, and it's worked for me, the issue is gone.
But you can try other way to set value for "name" column. Best Wishes.
# declare "your_column" column so we can use it to call onchange, without this, onchange function won't be called
your_column = fields.Binary(string="Your Column")
@api.onchange('your_column')
def your_column_onchange(self):
for wizard in self:
wizard.name = False
# set "name" to this wizard model, to prevent this issue:
# null value in column "name" violates not-null constraint
if wizard.your_column:
wizard.name = wizard.your_column
Please read this:
IntegrityError: null value in column "name" violates not-null constraint
Please also search the forum before asking questions.
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
Aanmelden
Where? When? Why? If you write some information it will be cool!!!