|
@ -2,7 +2,8 @@ |
|
|
from datetime import datetime |
|
|
from datetime import datetime |
|
|
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT as OE_DFORMAT |
|
|
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT as OE_DFORMAT |
|
|
|
|
|
|
|
|
from openerp import models, fields, api, _ |
|
|
|
|
|
|
|
|
from openerp import models, fields, api |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ResPartner(models.Model): |
|
|
class ResPartner(models.Model): |
|
|
_inherit = 'res.partner' |
|
|
_inherit = 'res.partner' |
|
@ -26,5 +27,6 @@ class ResPartner(models.Model): |
|
|
self.age = dToday.year - dBday.year - (( |
|
|
self.age = dToday.year - dBday.year - (( |
|
|
dToday.month, dToday.day) < (dBday.month, dBday.day)) |
|
|
dToday.month, dToday.day) < (dBday.month, dBday.day)) |
|
|
|
|
|
|
|
|
age = fields.Integer(string='Age',compute='_compute_age',search='_search_age') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
age = fields.Integer(string='Age', |
|
|
|
|
|
compute='_compute_age', |
|
|
|
|
|
search='_search_age') |