Tower: upload tk_construction_management 18.0.2.0.8 (was 18.0.2.0.8, via marketplace)

This commit is contained in:
2026-05-08 19:20:12 +00:00
parent c412640ca2
commit 63c62699f5
174 changed files with 44759 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
# Copyright 2020-Today TechKhedut.
# Part of TechKhedut. See LICENSE file for full copyright and licensing details.
from odoo import fields, api, models
class ConstructionDepartment(models.Model):
_name = 'construction.department'
_description = "Construction department"
name = fields.Char(string="Department Name")
manager_ids = fields.Many2many('res.users', string="Manager")
user_ids = fields.Many2many('res.users', 'construction_user_team_rel', 'user_id', 'team_id_id',
string="Responsible", domain="[('id','not in',manager_ids)]")
department_id = fields.Many2one('hr.department', string="HR Department")
@api.model_create_multi
def create(self, vals):
res = super(ConstructionDepartment, self).create(vals)
for rec in res:
for data in rec.manager_ids:
data.department_ids = data.department_ids.ids + [rec.id]
return res