diff --git a/addons/account_asset/account_asset.py b/addons/account_asset/account_asset.py index f45dd8397ab..ab18ab437ab 100644 --- a/addons/account_asset/account_asset.py +++ b/addons/account_asset/account_asset.py @@ -198,7 +198,12 @@ class AccountAssetAsset(models.Model): if self.value_residual != 0.0: amount_to_depr = residual_amount = self.value_residual if self.prorata: - depreciation_date = datetime.strptime(self._get_last_depreciation_date()[self.id], DF).date() + # if we already have some previous validated entries, starting date is last entry + method period + if posted_depreciation_line_ids and posted_depreciation_line_ids[-1].depreciation_date: + last_depreciation_date = datetime.strptime(posted_depreciation_line_ids[-1].depreciation_date, DF).date() + depreciation_date = last_depreciation_date + relativedelta(months=+self.method_period) + else: + depreciation_date = datetime.strptime(self._get_last_depreciation_date()[self.id], DF).date() else: # depreciation_date = 1st of January of purchase year if annual valuation, 1st of # purchase month in other cases diff --git a/doc/cla/individual/kurkop.md b/doc/cla/individual/kurkop.md new file mode 100644 index 00000000000..ead18fbc4cb --- /dev/null +++ b/doc/cla/individual/kurkop.md @@ -0,0 +1,11 @@ +Colombia, 2015-12-23 + +I hereby agree to the terms of the Odoo Individual Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +Juan Pablo Arias jpa@devco.co https://github.com/kurkop diff --git a/openerp/addons/base/res/res_country_data.xml b/openerp/addons/base/res/res_country_data.xml index dd1351b855d..4e007c26175 100644 --- a/openerp/addons/base/res/res_country_data.xml +++ b/openerp/addons/base/res/res_country_data.xml @@ -354,6 +354,7 @@ + Costa Rica diff --git a/openerp/addons/base/res/res_currency_data.xml b/openerp/addons/base/res/res_currency_data.xml index 24f45ac0182..c81fae1b46e 100644 --- a/openerp/addons/base/res/res_currency_data.xml +++ b/openerp/addons/base/res/res_currency_data.xml @@ -50,6 +50,7 @@ $ 0.01 + before