I need to create new records who need to have a specific ID. For
example, a new product.template with the ID 2. The prolem is that the
create() method from the ORM create my new record with anothed ID that
the one I give him as values.
Is it possible, with the Odoo ORM API, to create records with a
specific ID or do I need to do SQL?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Akuntansi
- Inventaris
- PoS
- Project
- MRP
Pertanyaan ini telah diberikan tanda
1
Balas
5466
Tampilan
You should use the External ID for that purpose.
Based on this: https://www.odoo.com/documentation/master/glossary.html#term-external-id
External ID is completely different to id field. Not what I need.
thanks anyway ;)
I know, but you should never touch the internal ID in any system.
twanda AG
Ermin Trevisan
Artherstrasse 19
CH-6318 Walchwil
T +41 41 758 1515
M +41 79 208 7373
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
Hot to get the current id into a method
Diselesaikan
|
|
5
Jan 24
|
12516 | |
|
1
Mar 15
|
9265 | ||
|
0
Mar 15
|
4530 | ||
|
1
Jun 18
|
3399 | ||
How can I speedup account.account creation?
Diselesaikan
|
|
4
Jan 17
|
7862 |