I recently read some code that called with the isinstance method which checked the record id on NewId. I don't find documentation on NewId, can you explain to me what it refers to?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Comptabilitat
- Inventari
- PoS
- Project
- MRP
This question has been flagged
When creating a record , the records of the recordset will be in memory only. At that time the id of the record will be a dummy ids of type NewId .
https://www.odoo.com/fr_FR/forum/aide-1/what-kind-of-error-is-this-184634#answer-184639
NewId is propose (virtual ) location of record which has not been saved in Database .
in another word NewId will get memory location in create moment
Before the return?
ex:
def create(self, vals):
ret = super(Model, self).create(vals)
# now i have the NewId?
return ret
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Registrar-seRelated Posts | Respostes | Vistes | Activitat | |
---|---|---|---|---|
|
0
de maig 25
|
300 | ||
|
2
d’abr. 25
|
2466 | ||
|
1
de febr. 25
|
818 | ||
|
2
de febr. 25
|
1315 | ||
|
2
de gen. 25
|
1453 |