Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Odoo 14 Account Bank Statement Import by Odoo Mates , Odoo S.A. #45

Closed
thorza opened this issue Nov 4, 2021 · 3 comments
Closed

Odoo 14 Account Bank Statement Import by Odoo Mates , Odoo S.A. #45

thorza opened this issue Nov 4, 2021 · 3 comments

Comments

@thorza
Copy link

thorza commented Nov 4, 2021

Hi

Thank you for the assistance offered.

Please error below.

I am trying to import the attached file.

The first error talks to the Excel data format. COnverted it into the correct format using a CSV file. Then when importing the file it gave me the error below.

I am doing something Wrong.

Best regards'
Thor

Error:
Odoo Server Error

Traceback (most recent call last):
File "C:\GitHub\odoo\odoo\addons\base\models\ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "C:\GitHub\odoo\odoo\http.py", line 684, in dispatch
result = self._call_function(**self.params)
File "C:\GitHub\odoo\odoo\http.py", line 360, in _call_function
return checked_call(self.db, *args, **kwargs)
File "C:\GitHub\odoo\odoo\service\model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "C:\GitHub\odoo\odoo\http.py", line 348, in checked_call
result = self.endpoint(*a, **kw)
File "C:\GitHub\odoo\odoo\http.py", line 913, in call
return self.method(*args, **kw)
File "C:\GitHub\odoo\odoo\http.py", line 532, in response_wrap
response = f(*args, **kw)
File "c:\github\odoo\addons\web\controllers\main.
02 November - 628077201695.xlsx
py", line 1393, in call_button
action = self._call_kw(model, method, args, kwargs)
File "c:\github\odoo\addons\web\controllers\main.py", line 1381, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "C:\GitHub\odoo\odoo\api.py", line 396, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "C:\GitHub\odoo\odoo\api.py", line 383, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "C:\GitHub\odoo\odoo\addons\om_account_bank_statement_import\account_bank_statement_import.py", line 135, in import_file
statement = self.create_statement(statement_vals)
File "C:\GitHub\odoo\odoo\addons\om_account_bank_statement_import\account_bank_statement_import.py", line 55, in create_statement
statement = self.env['account.bank.statement'].create(values)
File "", line 2, in create
File "C:\GitHub\odoo\odoo\api.py", line 344, in _model_create_multi
return create(self, [arg])
File "c:\github\odoo\addons\account\models\account_bank_statement.py", line 275, in create
res = super(AccountBankStatement, self).create(values)
File "", line 2, in create
File "C:\GitHub\odoo\odoo\api.py", line 345, in _model_create_multi
return create(self, arg)
File "c:\github\odoo\addons\mail\models\mail_thread.py", line 264, in create
threads = super(MailThread, self).create(vals_list)
File "", line 2, in create
File "C:\GitHub\odoo\odoo\api.py", line 345, in _model_create_multi
return create(self, arg)
File "C:\GitHub\odoo\odoo\addons\base\models\ir_fields.py", line 534, in create
recs = super().create(vals_list)
File "", line 2, in create
File "C:\GitHub\odoo\odoo\api.py", line 345, in _model_create_multi
return create(self, arg)
File "C:\GitHub\odoo\odoo\models.py", line 3864, in create
records = self._create(data_list)
File "C:\GitHub\odoo\odoo\models.py", line 4024, in _create
for other, data in zip(others, data_list)
File "C:\GitHub\odoo\odoo\fields.py", line 3041, in create
self.write_batch(record_values, True)
File "C:\GitHub\odoo\odoo\fields.py", line 3067, in write_batch
return self.write_real(records_commands_list, create)
File "C:\GitHub\odoo\odoo\fields.py", line 3239, in write_real
flush()
File "C:\GitHub\odoo\odoo\fields.py", line 3203, in flush
comodel.create(to_create)
File "", line 2, in create
File "C:\GitHub\odoo\odoo\api.py", line 345, in _model_create_multi
return create(self, arg)
File "c:\github\odoo\addons\account\models\account_bank_statement.py", line 859, in create
st_lines = super().create(vals_list)
File "", line 2, in create
File "C:\GitHub\odoo\odoo\api.py", line 345, in _model_create_multi
return create(self, arg)
File "C:\GitHub\odoo\odoo\addons\base\models\ir_fields.py", line 534, in create
recs = super().create(vals_list)
File "", line 2, in create
File "C:\GitHub\odoo\odoo\api.py", line 345, in _model_create_multi
return create(self, arg)
File "C:\GitHub\odoo\odoo\models.py", line 3858, in create
for data in parent_data_list
File "", line 2, in create
File "C:\GitHub\odoo\odoo\api.py", line 345, in _model_create_multi
return create(self, arg)
File "c:\github\odoo\addons\purchase\models\account_invoice.py", line 103, in create
moves = super(AccountMove, self).create(vals_list)
File "", line 2, in create
File "C:\GitHub\odoo\odoo\api.py", line 345, in _model_create_multi
return create(self, arg)
File "c:\github\odoo\addons\account\models\account_move.py", line 1938, in create
vals_list = self._move_autocomplete_invoice_lines_create(vals_list)
File "c:\github\odoo\addons\account\models\account_move.py", line 1895, in _move_autocomplete_invoice_lines_create
move = self_ctx.new(vals)
File "C:\GitHub\odoo\odoo\models.py", line 5502, in new
record._update_cache(values, validate=False)
File "C:\GitHub\odoo\odoo\models.py", line 5148, in _update_cache
cache.set(self, field, field.convert_to_cache(value, self, validate))
File "C:\GitHub\odoo\odoo\fields.py", line 1834, in convert_to_cache
return self.to_date(value)
File "C:\GitHub\odoo\odoo\fields.py", line 1809, in to_date
return datetime.strptime(value, DATE_FORMAT).date()
File "C:\Users\thors\AppData\Local\Programs\Python\Python37\lib_strptime.py", line 577, in _strptime_datetime
tt, fraction, gmtoff_fraction = _strptime(data_string, format)
File "C:\Users\thors\AppData\Local\Programs\Python\Python37\lib_strptime.py", line 359, in _strptime
(data_string, format))
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\GitHub\odoo\odoo\http.py", line 640, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "C:\GitHub\odoo\odoo\http.py", line 316, in _handle_exception
raise exception.with_traceback(None) from new_cause
ValueError: time data '44502.0' does not match format '%Y-%m-%d'

@odoomates
Copy link
Owner

HI,
Are you uploading the data in the specified format ? seems the time in the sheet is having the problem ? Can you cross check the sheet with the sample format given here ? https://github.com/odoomates/odooapps/tree/14.0/om_account_bank_statement_import/sample_files

@sturlan
Copy link

sturlan commented Dec 20, 2021

Is there a way for a user to import bank statement without having the "administration/settings" access rights?

@odoomates
Copy link
Owner

@sturlan thanks for pointing out the error. We have fixed it with this commit: e13630a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants