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
회신
10853
화면
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
|
2542 | ||
|
0
10월 20
|
4325 | ||
|
0
5월 15
|
4050 | ||
|
2
3월 25
|
2171 | ||
|
5
10월 19
|
10103 |