odoo-brazil / odoo-brazil-banking

Framework Bancário Brasileiro Odoo
GNU Affero General Public License v3.0
16 stars 35 forks source link

Update file_cnab240_parser.py #42

Open yk2kus opened 7 years ago

yk2kus commented 7 years ago

Use .zfill(8) on date, because it ignores the leading zeros hence gets wrong date, becasue in library dates are read as numbers , "formato": "num" Eg:

date='3012017' datetime.datetime.strptime(date,'%d%m%Y').date() datetime.date(2017, 1, 30) date='03012017' datetime.datetime.strptime(date,'%d%m%Y').date() datetime.date(2017, 1, 3)