1# -*- coding: utf-8 -*-
2# Part of Odoo. See LICENSE file for full copyright and licensing details.
3
4from odoo import fields, models
5from odoo.addons.base.models.res_partner import WARNING_HELP, WARNING_MESSAGE
6
7
8class Partner(models.Model):
9    _inherit = 'res.partner'
10    _check_company_auto = True
11
12    property_stock_customer = fields.Many2one(
13        'stock.location', string="Customer Location", company_dependent=True, check_company=True,
14        domain="['|', ('company_id', '=', False), ('company_id', '=', allowed_company_ids[0])]",
15        help="The stock location used as destination when sending goods to this contact.")
16    property_stock_supplier = fields.Many2one(
17        'stock.location', string="Vendor Location", company_dependent=True, check_company=True,
18        domain="['|', ('company_id', '=', False), ('company_id', '=', allowed_company_ids[0])]",
19        help="The stock location used as source when receiving goods from this contact.")
20    picking_warn = fields.Selection(WARNING_MESSAGE, 'Stock Picking', help=WARNING_HELP, default='no-message')
21    picking_warn_msg = fields.Text('Message for Stock Picking')
22