# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from openerp import models, api, fields, _ from datetime import datetime import json # class account_invoice(models.Model): # _inherit = 'account.invoice' # date_day = fields.Char(string='Date Day',compute='_get_date_day',store=True,readonly=True) # date_month = fields.Char(string='Date Month',compute='_get_date_month',store=True,readonly=True) # @api.one # @api.depends('date_invoice') # def _get_date_day(self): # self.date_day = datetime.strptime(self.date_invoice,'%Y-%m-%d').strftime('%d')