Migrate stock_user_default_warehouse_base from 10.0

This commit is contained in:
Alexis de Lattre
2020-05-19 13:28:27 +02:00
committed by Daniel Luque
parent e96c3d72eb
commit d1deeeac31
8 changed files with 147 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
# © 2017 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, fields
class ResUsers(models.Model):
_inherit = 'res.users'
context_default_warehouse_id = fields.Many2one(
'stock.warehouse',
string='Default Warehouse',
company_dependent=True,
help="Default warehouse for sale orders (if the module "
"stock_user_default_warehouse_sale is installed), purchase orders "
"(if the module stock_user_default_warehouse_purchase is installed) "
"and production orders "
"(if the module stock_user_default_warehouse_mrp is installed)."
)