Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Manging multiple companies and warehouses in Odoo 8.0

By
Dima Litvinov
on 8/22/16, 7:57 AM 181 views

In our sales system we need to perform different sales on behalf of different companies (actually, there are two). For this we created two companies, two warehouses (because "company" field in quotation form is read-only) and assigned these warehouses to different companies. Then, when we create quotation, we can choose different warehouses for it. According to selected warehouse, quotation's company_id (quotation->edit->other info->company) should change automatically (on the form it is read-only). But it doesn't happen!

What are we doing wrong?


Exact steps to reproduce:

1) Create new DB in odoo 8.

2) Install "sales" and "stock" apps.

3) Enable multiple companies (Settings->General settings->Manage multiple companies).

4) Create second company ("Your Company" already exists): Settings->companies.

5) Enable "multiple locations" (Settings->Warehouse->Manage multiple locations and warehouse).

6) Create second warehouse (Warehouse->warehouses).

7) Edit both warehouses and set "location" to different companies.

8) Do the same for "owner" field in Warehouse->locations.

9) Create sample customer and product.

10) Create a quotation with 1 product and try to change it's "warehouse".


Expected results:

When editing quotation and changing "warehouse", "company" field should also change automatically.


Actual results:

It does not.


Technical details:

We looked into underlying postgresql db. In "stock_warehouse" table there is "company_id" field - but it cannot be changed from UI and is always set to 1. If we manually change it - company change on warehouse change (on the "quotation" form) begins to actually happen! BUT - the results are not preserved in DB (quotation is still assigned to company #1).

0
Dima Litvinov
On 9/1/16, 5:37 AM

Thank you, Mark, it really worked when we added both companies to the user's profile (we also needed to check "multiple companies" in the user's properties).


But it still seems strange - from the user's point of view: on "quotation" form when one changes warehouse, the order's company ineractively changes too; but after save this change does not preserve!? Shouldn't it be considered as a bug?

0
Mark Draheim
On 8/31/16, 8:14 AM

The quotation is assigned to the company of your user. You would have to add both companies to the user's allowed companies and then use the switch drop down on the top right to change the user's current company. The warehouse should then follow the user's company. It is not an ideal solution but many, many functions internally check user.company_id and pass that on to subsequent calls.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 8/22/16, 7:57 AM
Seen: 181 times
Last updated: 9/1/16, 5:37 AM