account_voucherfilter.py 703 B

123456789101112131415161718
  1. # -*- coding: utf-8 -*-
  2. ##############################################################################
  3. # For copyright and license notices, see __openerp__.py file in module root
  4. # directory
  5. ##############################################################################
  6. from openerp import models, api, fields, _
  7. from datetime import datetime
  8. import json
  9. # class account_invoice(models.Model):
  10. # _inherit = 'account.invoice'
  11. # date_month = fields.Char(string='Date Month',compute='_get_date_month',store=True,readonly=True)
  12. # @api.one
  13. # @api.depends('date_invoice')
  14. # def _get_date_month(self):
  15. # self.date_month = datetime.strptime(self.date_invoice,'%Y-%m-%d').strftime('%m')