diff --git a/base_accounting_kit/__manifest__.py b/base_accounting_kit/__manifest__.py index 7edd2554c..c92ff87b5 100644 --- a/base_accounting_kit/__manifest__.py +++ b/base_accounting_kit/__manifest__.py @@ -22,7 +22,7 @@ { 'name': 'Odoo 13 Full Accounting Kit', - 'version': '13.0.4.5.3', + 'version': '13.0.4.5.4', 'category': 'Accounting', 'live_test_url': 'https://www.youtube.com/watch?v=peAp2Tx_XIs', 'summary': """ Asset and Budget Management, diff --git a/base_accounting_kit/doc/changelog.md b/base_accounting_kit/doc/changelog.md index ec82ed6a3..111280463 100644 --- a/base_accounting_kit/doc/changelog.md +++ b/base_accounting_kit/doc/changelog.md @@ -48,4 +48,9 @@ #### 13.02.2020 #### Version 13.0.4.5.3 #### RMV -- Library Removed +- Library Removed from dashboard + +#### 27.02.2020 +#### Version 13.0.4.5.4 +#### FIX +- Bug Fixed in asset 'Modify Depreciation' diff --git a/base_accounting_kit/wizard/asset_modify.py b/base_accounting_kit/wizard/asset_modify.py index 92b5abcb4..94661da6f 100644 --- a/base_accounting_kit/wizard/asset_modify.py +++ b/base_accounting_kit/wizard/asset_modify.py @@ -27,6 +27,16 @@ from odoo.addons.base.models.ir_ui_view import ( transfer_field_to_modifiers, transfer_node_to_modifiers, transfer_modifiers_to_node, ) + +def setup_modifiers(node, field=None, context=None, in_tree_view=False): + modifiers = {} + if field is not None: + transfer_field_to_modifiers(field, modifiers) + transfer_node_to_modifiers( + node, modifiers, context=context, in_tree_view=in_tree_view) + transfer_modifiers_to_node(modifiers, node) + + class AssetModify(models.TransientModel): _name = 'asset.modify' _description = 'Modify Asset' @@ -37,14 +47,6 @@ class AssetModify(models.TransientModel): method_end = fields.Date(string='Ending date') asset_method_time = fields.Char(compute='_get_asset_method_time', string='Asset Method Time', readonly=True) - def setup_modifiers(node, field=None, context=None, in_tree_view=False): - modifiers = {} - if field is not None: - transfer_field_to_modifiers(field, modifiers) - transfer_node_to_modifiers( - node, modifiers, context=context, in_tree_view=in_tree_view) - transfer_modifiers_to_node(modifiers, node) - def _get_asset_method_time(self): if self.env.context.get('active_id'): asset = self.env['account.asset.asset'].browse(self.env.context.get('active_id')) @@ -61,11 +63,11 @@ class AssetModify(models.TransientModel): if asset.method_time == 'number' and doc.xpath("//field[@name='method_end']"): node = doc.xpath("//field[@name='method_end']")[0] node.set('invisible', '1') - self.setup_modifiers(node, result['fields']['method_end']) + setup_modifiers(node, result['fields']['method_end']) elif asset.method_time == 'end' and doc.xpath("//field[@name='method_number']"): node = doc.xpath("//field[@name='method_number']")[0] node.set('invisible', '1') - self.setup_modifiers(node, result['fields']['method_number']) + setup_modifiers(node, result['fields']['method_number']) result['arch'] = etree.tostring(doc, encoding='unicode') return result