mirror of
https://github.com/bringout/oca-ocb-hr.git
synced 2026-04-26 00:32:00 +02:00
Initial commit: Hr packages
This commit is contained in:
commit
62531cd146
2820 changed files with 1432848 additions and 0 deletions
16
odoo-bringout-oca-ocb-hr/hr/models/hr_work_location.py
Normal file
16
odoo-bringout-oca-ocb-hr/hr/models/hr_work_location.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class WorkLocation(models.Model):
|
||||
_name = "hr.work.location"
|
||||
_description = "Work Location"
|
||||
_order = 'name'
|
||||
|
||||
active = fields.Boolean(default=True)
|
||||
name = fields.Char(string="Work Location", required=True)
|
||||
company_id = fields.Many2one('res.company', required=True, default=lambda self: self.env.company)
|
||||
address_id = fields.Many2one('res.partner', required=True, string="Work Address", domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]")
|
||||
location_number = fields.Char()
|
||||
Loading…
Add table
Add a link
Reference in a new issue