Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
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".
When editing quotation and changing "warehouse", "company" field should also change automatically.
It does not.
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).
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?
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.
About This Community
This platform 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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 8/22/16, 7:57 AM|
|Seen: 311 times|
|Last updated: 9/1/16, 5:37 AM|