OCA / multi-company

GNU Affero General Public License v3.0
101 stars 281 forks source link

[12] purchase_sale_inter_company. Error when validating purchase oder #194

Closed ghost closed 2 years ago

ghost commented 4 years ago

When a RFQ is created on the moment to be validated this message appears. 01

The reason is that the company changes automatically. But Odoo continues showing the company that mades the purchase order. 02 But if you refresh the screen it changes to the vendor's company.

03 The purchase order is done and the quotation/sale order too. But I think that this error shouldn't be showed. What do you think?

kimbo23 commented 4 years ago

I have the same error. Any advice or solution?

ghost commented 4 years ago

I don't have a solution yet. I don't know if it's a bug and it's going to be fixed or not.

kimbo23 commented 4 years ago

Do you know how i can setup this situation: I have 2 companies A and B. Company A is a Vendor and company B is a customers. If company B make a purchase to company A, works good with this module, but if company A make a sale quotation or sale order to company B, i don´t see the purchase order or even the inventory receipt on company B. Maybe i´m doing something wrong do you know how i can setup this situation?. Thank you.

ghost commented 4 years ago

You have to read the module's description. "This module is useful if there are multiple companies in the same Odoo database and those companies sell goods or services among themselves. It allows to create a sale order in company A from a purchase order in company B. Imagine you have company A and company B in the same Odoo database: Company A purchase goods from company B. Company A will create a purchase order with company B as supplier. This module automate the creation of the sale order in company B with company A as customer" This issue is to fix this error.

supakornkim commented 4 years ago

Hello, I also have this error and also the unit price of the generated PO and SO is incorrect (input 10 but turn to 1 ).

mmotahar commented 4 years ago

Hello,

The error is simply coming from the following line

https://github.com/OCA/multi-company/blob/12.0/purchase_sale_inter_company/models/purchase_order.py#L93

If after creation of the sales order we add a few lines to switch the user back to the user account that it was before

AND commit a small change like saving internal notes against the original purchase order, It solves the problem.

Any other suggestions ? :)

github-actions[bot] commented 2 years ago

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.