Update re_unit

This commit is contained in:
zainab2097 2024-08-28 12:28:42 +03:00 committed by GitHub
parent 7ba6937c96
commit 233052c8fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -9,6 +9,11 @@
import base64
import re
from odoo import models, fields, api, exceptions, _
class PropertyRole(models.Model):
_name = 'property.role'
_description = 'Property Role'
name = fields.Char('Name')
class Unit(models.Model):
_name = 're.unit'
@ -23,6 +28,7 @@ class Unit(models.Model):
('lands', 'Lands') ], string="Unit Category")
attach_nbr = fields.Integer(compute='get_attachments')
active = fields.Boolean(default=True)
role_id = fields.Many2one('property.role', string='Role')
unlock = fields.Boolean(default=True, string="Unlock")
name = fields.Char(string="Unit Name")
color = fields.Integer(string='Color Index', compute="set_color")