From 9dc9a058cd8cb0934863006dd5eaa1264b6f3ae1 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 6 Dec 2016 14:07:30 +0100 Subject: [PATCH 1/2] [FIX] account_asset: modify asset - Create a new assets - Set a any gross value, any number of depreciation, and any number of months in period - Set "Prorata temporis" to True! - Save, then confirm the asset - Post at least one of the line by clicking on the red bubble next to it - Click on "Modify Depreciation" and choose another number of month - Click on "modify" to confirm the modifications The depreciation of the latest posted month is duplicated. However, the first unposted depreciation should be the first period after the last posted period, as it is the case for non prorata temporis assets. opw-693081 --- addons/account_asset/account_asset.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/addons/account_asset/account_asset.py b/addons/account_asset/account_asset.py index 1d756145a80..0939f1beebc 100644 --- a/addons/account_asset/account_asset.py +++ b/addons/account_asset/account_asset.py @@ -177,7 +177,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 From 799f12c326e4f4a36e072ed0ccb8451e1b78fcda Mon Sep 17 00:00:00 2001 From: Juan Pablo Arias Date: Mon, 25 Jan 2016 10:05:26 -0500 Subject: [PATCH 2/2] [ADD] base: Colombian data - adds position before to COP currency in res_currency_data - adds address_format to Colombia in res_country_data - CLA signature for kurkop Closes #10618 --- doc/cla/individual/kurkop.md | 11 +++++++++++ openerp/addons/base/res/res_country_data.xml | 1 + openerp/addons/base/res/res_currency_data.xml | 1 + 3 files changed, 13 insertions(+) create mode 100644 doc/cla/individual/kurkop.md 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 7868e4dc378..2885df1708f 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