I know It is possible to get a record using self.env['res.partner'].search([]) and creating one using self.env['res.partner'].create({}). But how can I update an existing record? for example update name field of res.partner record.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Contabilidad
- Inventario
- PoS
- Project
- MRP
Se marcó esta pregunta
1
Responder
10347
Vistas
Hi,
You can update an existing in the following ways:
partner = self.env['res.partner'].search([], limit=1)
partner.name = 'Odoo'
partner.write({'name': 'odoo'})
To know more about the odoo orm methods, see: Odoo ORM Methods
Thanks
Thanks a lot!
¿Le interesa esta conversación? ¡Participe en ella!
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
RegistrarsePublicaciones relacionadas | Respuestas | Vistas | Actividad | |
---|---|---|---|---|
|
0
oct 21
|
2144 | ||
|
0
oct 20
|
3650 | ||
|
0
may 15
|
3603 | ||
|
2
mar 25
|
1184 | ||
|
5
oct 19
|
9394 |