{"action":"created","issue":{"url":"https://api.github.com/repos/OCA/account-financial-tools/issues/497","repository_url":"https://api.github.com/repos/OCA/account-financial-tools","labels_url":"https://api.github.com/repos/OCA/account-financial-tools/issues/497/labels{/name}","comments_url":"https://api.github.com/repos/OCA/account-financial-tools/issues/497/comments","events_url":"https://api.github.com/repos/OCA/account-financial-tools/issues/497/events","html_url":"https://github.com/OCA/account-financial-tools/pull/497","id":234596291,"number":497,"title":"[FIX] account_asset_management, error asset remove","user":{"login":"kittiu","id":1973598,"avatar_url":"https://avatars2.githubusercontent.com/u/1973598?v=3","gravatar_id":"","url":"https://api.github.com/users/kittiu","html_url":"https://github.com/kittiu","followers_url":"https://api.github.com/users/kittiu/followers","following_url":"https://api.github.com/users/kittiu/following{/other_user}","gists_url":"https://api.github.com/users/kittiu/gists{/gist_id}","starred_url":"https://api.github.com/users/kittiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kittiu/subscriptions","organizations_url":"https://api.github.com/users/kittiu/orgs","repos_url":"https://api.github.com/users/kittiu/repos","events_url":"https://api.github.com/users/kittiu/events{/privacy}","received_events_url":"https://api.github.com/users/kittiu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2017-06-08T17:12:06Z","updated_at":"2017-06-14T10:49:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/OCA/account-financial-tools/pulls/497","html_url":"https://github.com/OCA/account-financial-tools/pull/497","diff_url":"https://github.com/OCA/account-financial-tools/pull/497.diff","patch_url":"https://github.com/OCA/account-financial-tools/pull/497.patch"},"body":"If the asst has lines in depreciation board, but non of the line (even first line) being posted yet.\r\nWhen do the asset removal, system will return error,\r\n```\r\naccount_asset_management/wizard/account_asset_remove.py\", line 189, in _prepare_early_removal\r\n    datetime.strptime(last_depr_date, '%Y-%m-%d')).days\r\nTypeError: strptime() argument 1 must be string, not bool\r\n```\r\nThis is because, the first depreciation line will not have previous_id yet, first_to_depreciate_dl.previous_id, and so the last_depr_date = False.\r\nAnd if non of line ever posted, the calculation will start from the first line, and so, no last date.\r\n\r\nThe fix make sure that even it is the first depreciation line, it get the asset.date_start for calculation."},"comment":{"url":"https://api.github.com/repos/OCA/account-financial-tools/issues/comments/308395473","html_url":"https://github.com/OCA/account-financial-tools/pull/497#issuecomment-308395473","issue_url":"https://api.github.com/repos/OCA/account-financial-tools/issues/497","id":308395473,"user":{"login":"kittiu","id":1973598,"avatar_url":"https://avatars2.githubusercontent.com/u/1973598?v=3","gravatar_id":"","url":"https://api.github.com/users/kittiu","html_url":"https://github.com/kittiu","followers_url":"https://api.github.com/users/kittiu/followers","following_url":"https://api.github.com/users/kittiu/following{/other_user}","gists_url":"https://api.github.com/users/kittiu/gists{/gist_id}","starred_url":"https://api.github.com/users/kittiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kittiu/subscriptions","organizations_url":"https://api.github.com/users/kittiu/orgs","repos_url":"https://api.github.com/users/kittiu/repos","events_url":"https://api.github.com/users/kittiu/events{/privacy}","received_events_url":"https://api.github.com/users/kittiu/received_events","type":"User","site_admin":false},"created_at":"2017-06-14T10:49:31Z","updated_at":"2017-06-14T10:49:31Z","body":"@luc-demeyer I am from Thailand. (ref from the auditor). Actually, the Thai Account Standard allow to use both months and days. But when come to Tax Department (RD) consultation, which is published, it recommended to use days. So most company follow that. And so, when we implement ERP, if we want to have big agrument, we normally follow that.\r\n\r\nOK, I will do the PR form your branch, around next week."}}
{"actor":{"display_login":"kittiu"}}