Odooers论坛

欢迎!

该社区面向专业人士和我们产品和服务的爱好者。
分享和讨论最好的内容和新的营销理念,建立您的专业形象,一起成为更好的营销人员。


0

odoo 15 Studio - get last purchase order date (Dropshipping)

形象
odoo
形象
丢弃
2 答案
0
形象
odoo
最佳答案

Hi,

Could you change the field type to Datetime from Many2one and see if this work well.

Thanks & Regards

1 备注
形象
丢弃
形象
odoo
-

I have to correct me - it works! Thank you!

0
形象
odoo
最佳答案

Hi!

Here's how you can solve your issue with displaying the last delivery date for a dropshipping partner in Odoo 15:

1. Use Odoo Studio Filters:

- Open the Studio tool and modify the partner form.

- Set the last_delivery field as a computed field.

- Write an expression that fetches the latest delivery date for the partner using the related stock.picking records. For example:

record.stock_picking_ids.filtered(lambda p: p.partner_id == record.id and p.dropship).sorted('date_done')[-1].date_done

2. Check Data Setup:

Ensure that your dropshipping records have the correct partner ID and delivery dates populated.

3. Test the Logic:

Save and test the field by navigating to a partner with dropshipping deliveries.

If this becomes too complex, Cleverence Warehouse 15 could help you simplify tracking and linking such information with mobile devices for scanning and managing orders https://apps.odoo.com/apps/modules/17.0/clv_api

形象
丢弃