Community mailing list archives

community@mail.odoo.com

Re: Sale Order line -> Multiple procurement ids

by
Graeme Gellatly
- 02/22/2015 18:26:53
you are thinking of the relationship back to front.  A single procurement has only one sale order line and given there is no one2one field anymore, the reverse field is a one2many. In other words it is that way because it is desired that the procurement is an m2o.

On Mon, Feb 23, 2015 at 10:52 AM, OpenERP Master <openerpmaster@gmail.com> wrote:
Could someone describe a scenario where a sale_order_line would have multiple procurement_ids?

In module sale, procurement_ids is a one2many and I expected it to be a many2one. Ref:

https://github.com/odoo/odoo/blob/8.0/addons/sale/sale.py#L889

With my tests, only 1 procurement.order is ever created that has a matching sale_order_line. Even in the case of a M2O a sale_line_id is not attached to the new procurement created.

I am thinking this would only be valid in manufacturing, which isn't something im using yet. Any thoughts?

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe