Hello folks,
i have quetion regarding recordset.
i have one2many field with 10 values i need to get last inserted record from the field
how can we do that in odoo any help will be apreciated and thanks for your time.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Financeiro
- Inventário
- PoS
- Project
- MRP
Esta pergunta foi sinalizada
2
Respostas
2107
Visualizações
self.'one2manyfield'[-1]
Hi,
Try this code:# Assuming 'order' is an instance of your model and 'order_line_ids' is a One2many or Many2many field
last_inserted_order_line = order.order_line_ids[-1]
Hope it helps
it's work! thanks for your repely:)
Está gostando da discussão? Não fique apenas lendo, participe!
Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!
Inscreva-sePublicações relacionadas | Respostas | Visualizações | Atividade | |
---|---|---|---|---|
|
2
jul. 22
|
2243 | ||
|
0
jun. 22
|
2381 | ||
|
2
out. 21
|
6420 | ||
|
3
mai. 23
|
3342 | ||
Group by on related field
Resolvido
|
|
1
mai. 23
|
4200 |