Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
2632 Переглядів
 .. In a multi-company environment where each company has two or more warehouses, how do we make a warehouse a default warehouse when a SO or PO is created.

Example in Company 2: I want warehouse 2 to always be chosen by default.
Whereas in company 3: I want warehouse 5 to be always chosen by default.
Аватар
Відмінити
Найкраща відповідь

Hi,
The default warehouse selected for a sale order is based on the current company.
The domain which is used to select the default warehouse is,


[('company_id', '=', self.env.company.id)]

and the method is,


def _get_default_warehouse_id(self):

Hence the default warehouse will be the first warehouse shown in the tree view of warehouses under the inventory module. Here there is a drag option to arrange the warehouses. So make sure the warehouse which has to be selected by default is on the top of the tree view.
If you have any other criteria in selecting the default warehouse then try updating the domain used in the function.

Regards

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
2
вер. 24
5618
0
серп. 21
3048
1
трав. 22
3073
0
жовт. 24
1433
1
січ. 24
1623