I want to pass the value of this field:
Image: https://i.stack.imgur.com/I11St.png
for this field:
Image: https://i.stack.imgur.com/4yGi4.png
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I want to pass the value of this field:
Image: https://i.stack.imgur.com/I11St.png
for this field:
Image: https://i.stack.imgur.com/4yGi4.png
Hi Robson
You make the second field to compute (wiil be readonly automatically , you may know)
def _foo(self):
# On2many field will have a related Many2one field to parent object, example parent_id
bar = # Calculate the parent_id
for i in self.env['model of first field'].search([('parent_id', '=', bar )]):
# You can get all lines of One2many field of that parent object
# Find the value
self.second_field = value to be passed
second_field = fields.Float(compute='_foo')
All the best
Luo tili jo tänään nauttiaksesi yksinoikeusominaisuuksista ja osallistuaksesi mahtavaan yhteisöömme!
Rekisteröidy| Aiheeseen liittyviä artikkeleita | Vastaukset | Näkymät | Toimenpide | |
|---|---|---|---|---|
|
1
jouluk. 25
|
297 | |||
|
2
marrask. 25
|
417 | |||
|
1
marrask. 25
|
2349 | |||
|
1
marrask. 25
|
3614 | |||
|
2
elok. 25
|
4146 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.