Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
884 Lượt xem

Hello,

Odoo is referencing the sales order for a reference in every invoice.

In our use case we bill the customer by deliverd items.
So we want to reference the delivery slip in the invoice.

I already tried several solutions in Odoo Studio but failed with a rendering error or not the wanted result.

Attempts so far:


<t t-out="max(env['stock.picking'].search([('origin', '=', object.invoice_origin)]), key=lambda p: p.scheduled_date).name if object.invoice_origin else 'No delivery slip found'"/>


<t t-out="object.invoice_origin and object.invoice_origin[0].picking_ids and object.invoice_origin[0].picking_ids[0].name or 'No delivery slip found'"/>


But also broken down it is not working  o.sale_id.picking_ids[0].name


Thanks in advance and best Regards

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

For now we stick to copying the delivery number into the reference.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 8 25
979
3
thg 7 25
476
2
thg 7 25
1120
1
thg 5 25
842
0
thg 5 25
998