Multicompany purchase fix
This module fixs errors in multi-company purchase order environments:
When the "Run mrp scheduled" planner is automatically executed and will create a purchase quotation, it searches for a supplierinfo record for the corresponding product template and supplier but does not take the company into account, so if it finds more than one, when accessing the min_qty field it gives the following error:
Expected singleton: product.supplierinfo(id_x, ix_y)
Add the "company_id" key with the value of the current company to the context in the "make_po" function and correct the searches of the "product.supplierinfo" object in the "_calc_new_qty_price" function so that the company is taken into account in the search.
Please log in to comment on this module
- The author can leave a single reply to each comment.
- This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
- If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.