how to assign or modify value of many2one field from another object
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
Hello,
You Can Call write Method For Assign Or Modify Value OF M2O From Another Object.
Example:
@api.multi
def write(self, values):
your_obj = self.env['object.object].search([(as per your Condition)])
your_obj.write({
'your_field_from_another_object': 'your_field_from_current_object.id'
})
Hi,
you can write the value of that field.
eg:
@api.multi |
Thank you.
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
Nov 22
|
14645 | ||
|
3
Aug 22
|
10749 | ||
|
2
Aug 22
|
3045 | ||
|
0
Jul 22
|
835 | ||
Many2one field doesn't exist
Solved
|
|
2
Oct 21
|
1432 |