Commit 1fee4196 authored by Ángel Ramírez Isea's avatar Ángel Ramírez Isea
Browse files

refactor: Mover compute_age_from_dates de commed_evaluation a res_partner.

parent 99f692ef
......@@ -3,7 +3,7 @@
# License GPL-3.0 or later (http://www.gnu.org/licenses/gpl.html).
{
'name': 'Community Medical - Page of Live',
'name': 'Community Medical - Page of Life',
'description': """Page of Life, ported from GNU Health. Records relevant
events for a person:
- Demographical.
......
......@@ -4,8 +4,7 @@
from datetime import datetime
from odoo import models, fields, api
from odoo.addons.commed_evaluation.models.commed_evaluation import \
CommedPatientEvaluation
from odoo.addons.commed_base.models.res_partner import ResPartner
class CommedPol(models.Model):
......@@ -17,7 +16,7 @@ class CommedPol(models.Model):
def age_at_page(self):
if (self.person.dob and self.page_date):
return CommedPatientEvaluation.compute_age_from_dates(
return ResPartner.compute_age_from_dates(
self.person.dob, None, None, None, 'age', self.page_date.date()
)
......@@ -155,7 +154,8 @@ class CommedPol(models.Model):
# 'natural_variant':genetic_info.natural_variant and \
# genetic_info.natural_variant.aa_change,
# 'summary': genetic_info.notes,
# 'author': genetic_info.healthprof and genetic_info.healthprof.name.rec_name,
# 'author': genetic_info.healthprof and genetic_info.healthprof.\
# name.rec_name,
# }
# if (genetic_info.variant_phenotype):
# vals['health_condition_text'] = vals['health_condition_text'] = \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment