mirror of
https://github.com/bringout/oca-ocb-sale.git
synced 2026-04-27 16:31:58 +02:00
19.0 vanilla
This commit is contained in:
parent
79f83631d5
commit
73afc09215
6267 changed files with 1534193 additions and 1130106 deletions
|
|
@ -4,17 +4,15 @@
|
|||
from odoo import models, fields
|
||||
|
||||
|
||||
class Users(models.Model):
|
||||
_inherit = ['res.users']
|
||||
class ResUsers(models.Model):
|
||||
_inherit = 'res.users'
|
||||
|
||||
property_warehouse_id = fields.Many2one('stock.warehouse', string='Default Warehouse', company_dependent=True, check_company=True)
|
||||
|
||||
def _get_default_warehouse_id(self):
|
||||
if self.property_warehouse_id:
|
||||
return self.property_warehouse_id
|
||||
# !!! Any change to the following search domain should probably
|
||||
# be also applied in sale_stock/models/sale_order.py/_init_column.
|
||||
return self.env['stock.warehouse'].search([('company_id', '=', self.env.company.id)], limit=1)
|
||||
return super()._get_default_warehouse_id()
|
||||
|
||||
@property
|
||||
def SELF_READABLE_FIELDS(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue