From 5bb98b33b1f699218c2f9fb991035f009e1a82a0 Mon Sep 17 00:00:00 2001 From: Luc De Meyer Date: Mon, 3 Sep 2018 20:50:11 +0200 Subject: [PATCH] bugfix in raise --- account_asset_management/__manifest__.py | 2 +- account_asset_management/models/account_asset.py | 1 - account_asset_management/models/account_move.py | 5 ----- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/account_asset_management/__manifest__.py b/account_asset_management/__manifest__.py index f2b3d0e04..e06ae3faa 100644 --- a/account_asset_management/__manifest__.py +++ b/account_asset_management/__manifest__.py @@ -4,7 +4,7 @@ { 'name': 'Assets Management', - 'version': '10.0.3.0.1', + 'version': '10.0.3.0.2', 'license': 'AGPL-3', 'depends': [ 'account_fiscal_year', diff --git a/account_asset_management/models/account_asset.py b/account_asset_management/models/account_asset.py index 9ee820e7b..e0450cd32 100644 --- a/account_asset_management/models/account_asset.py +++ b/account_asset_management/models/account_asset.py @@ -734,7 +734,6 @@ class AccountAsset(models.Model): """ if self.method_time != 'year': raise UserError( - _("Programming Error"), _("The '_compute_year_amount' method is only intended for " "Time Method 'Number of Years.")) diff --git a/account_asset_management/models/account_move.py b/account_asset_management/models/account_move.py index 1489c8f2b..7c822682a 100644 --- a/account_asset_management/models/account_move.py +++ b/account_asset_management/models/account_move.py @@ -30,7 +30,6 @@ class AccountMove(models.Model): ('type', 'in', ['depreciate', 'remove'])]) if deprs and not self._context.get('unlink_from_asset'): raise UserError( - _('Error!'), _("You are not allowed to remove an accounting entry " "linked to an asset." "\nYou should remove such entries from the asset.")) @@ -46,7 +45,6 @@ class AccountMove(models.Model): [('move_id', '=', move.id), ('type', '=', 'depreciate')]) if deprs: raise UserError( - _('Error!'), _("You cannot change an accounting entry " "linked to an asset depreciation line.")) return super(AccountMove, self).write(vals) @@ -70,7 +68,6 @@ class AccountMoveLine(models.Model): def create(self, vals, **kwargs): if vals.get('asset_id') and not self._context.get('allow_asset'): raise UserError( - _('Error!'), _("You are not allowed to link " "an accounting entry to an asset." "\nYou should generate such entries from the asset.")) @@ -107,12 +104,10 @@ class AccountMoveLine(models.Model): if not (self.env.context.get('allow_asset_removal') and vals.keys() == ['asset_id']): raise UserError( - _('Error!'), _("You cannot change an accounting item " "linked to an asset depreciation line.")) if vals.get('asset_id'): raise UserError( - _('Error!'), _("You are not allowed to link " "an accounting entry to an asset." "\nYou should generate such entries from the asset."))