mirror of
https://gitlab.com/sonalarora/tra_backend.git
synced 2025-12-17 10:19:09 +02:00
add gym module
This commit is contained in:
23
gym/models/account_analytic_account.py
Normal file
23
gym/models/account_analytic_account.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import fields, models,api
|
||||
|
||||
|
||||
class AccountAnalyticAccount(models.Model):
|
||||
_inherit = 'account.analytic.account'
|
||||
|
||||
|
||||
is_location = fields.Boolean(
|
||||
string='Is Location',
|
||||
compute='compute_is_location',
|
||||
store=True
|
||||
)
|
||||
|
||||
|
||||
@api.depends('group_id')
|
||||
def compute_is_location(self):
|
||||
for record in self:
|
||||
if record.group_id.name=='Location':
|
||||
record.is_location=True
|
||||
else:
|
||||
record.is_location=False
|
||||
Reference in New Issue
Block a user