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
- 会計
- 在庫
- PoS
- Project
- MRP
この質問にフラグが付けられました
1
返信
10402
ビュー
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!
関連投稿 | 返信 | ビュー | 活動 | |
---|---|---|---|---|
|
0
10月 21
|
2202 | ||
|
0
10月 20
|
3701 | ||
|
0
5月 15
|
3670 | ||
|
2
3月 25
|
1308 | ||
|
5
10月 19
|
9478 |