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.
This question has been flagged
1
Reply
12086
डेटा देखने का तरीका
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!
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
साइन अप करें| Related Posts | Replies | डेटा देखने का तरीका | ऐक्टिविटी | |
|---|---|---|---|---|
|
|
0
अक्तू॰ 21
|
3558 | ||
|
|
0
अक्तू॰ 20
|
6043 | ||
|
|
0
मई 15
|
5418 | ||
|
|
2
मार्च 25
|
4681 | ||
|
|
5
अक्तू॰ 19
|
11888 |