odex30_standard/odex30_base/branch/models/product.py

9 lines
309 B
Python

# Part of BrowseInfo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models, _
class ProductTemplateIn(models.Model):
_inherit = 'product.template'
branch_id = fields.Many2one('res.branch', string="Branch", default=lambda self: self.env.user.branch_id.id)