diff --git a/account_asset_management/i18n/account_asset.pot b/account_asset_management/i18n/account_asset.pot deleted file mode 100644 index 05c51130b..000000000 --- a/account_asset_management/i18n/account_asset.pot +++ /dev/null @@ -1,735 +0,0 @@ -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# * account_asset -# -msgid "" -msgstr "" -"Project-Id-Version: OpenERP Server 7.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-06-07 19:36+0000\n" -"PO-Revision-Date: 2013-06-07 19:36+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: account_asset -#: view:account.asset.asset:0 -msgid "Assets in draft and open states" -msgstr "" - -#. module: account_asset -#: field:account.asset.category,method_end:0 -#: field:account.asset.history,method_end:0 -#: field:asset.modify,method_end:0 -msgid "Ending date" -msgstr "" - -#. module: account_asset -#: field:account.asset.asset,value_residual:0 -msgid "Residual Value" -msgstr "" - -#. module: account_asset -#: field:account.asset.category,account_expense_depreciation_id:0 -msgid "Depr. Expense Account" -msgstr "" - -#. module: account_asset -#: view:asset.asset.report:0 -msgid "Group By..." -msgstr "" - -#. module: account_asset -#: field:asset.asset.report,gross_value:0 -msgid "Gross Amount" -msgstr "" - -#. module: account_asset -#: view:account.asset.asset:0 -#: field:account.asset.depreciation.line,asset_id:0 -#: field:account.asset.history,asset_id:0 -#: field:account.move.line,asset_id:0 -#: view:asset.asset.report:0 -#: field:asset.asset.report,asset_id:0 -#: model:ir.model,name:account_asset.model_account_asset_asset -msgid "Asset" -msgstr "" - -#. module: account_asset -#: help:account.asset.asset,prorata:0 -#: help:account.asset.category,prorata:0 -msgid "Indicates that the first depreciation entry for this asset have to be done from the purchase date instead of the first January" -msgstr "" - -#. module: account_asset -#: selection:account.asset.asset,method:0 -#: selection:account.asset.category,method:0 -msgid "Linear" -msgstr "" - -#. module: account_asset -#: field:account.asset.asset,company_id:0 -#: field:account.asset.category,company_id:0 -#: view:asset.asset.report:0 -#: field:asset.asset.report,company_id:0 -msgid "Company" -msgstr "" - -#. module: account_asset -#: view:asset.modify:0 -msgid "Modify" -msgstr "" - -#. module: account_asset -#: selection:account.asset.asset,state:0 -#: view:asset.asset.report:0 -#: selection:asset.asset.report,state:0 -msgid "Running" -msgstr "" - -#. module: account_asset -#: view:account.asset.asset:0 -msgid "Set to Draft" -msgstr "" - -#. module: account_asset -#: view:asset.asset.report:0 -#: model:ir.actions.act_window,name:account_asset.action_asset_asset_report -#: model:ir.model,name:account_asset.model_asset_asset_report -#: model:ir.ui.menu,name:account_asset.menu_action_asset_asset_report -msgid "Assets Analysis" -msgstr "" - -#. module: account_asset -#: field:asset.modify,name:0 -msgid "Reason" -msgstr "" - -#. module: account_asset -#: field:account.asset.asset,method_progress_factor:0 -#: field:account.asset.category,method_progress_factor:0 -msgid "Degressive Factor" -msgstr "" - -#. module: account_asset -#: model:ir.actions.act_window,name:account_asset.action_account_asset_asset_list_normal -#: model:ir.ui.menu,name:account_asset.menu_action_account_asset_asset_list_normal -msgid "Asset Categories" -msgstr "" - -#. module: account_asset -#: view:account.asset.asset:0 -#: field:account.asset.asset,account_move_line_ids:0 -#: field:account.move.line,entry_ids:0 -#: model:ir.actions.act_window,name:account_asset.act_entries_open -msgid "Entries" -msgstr "" - -#. module: account_asset -#: view:account.asset.asset:0 -#: field:account.asset.asset,depreciation_line_ids:0 -msgid "Depreciation Lines" -msgstr "" - -#. module: account_asset -#: help:account.asset.asset,salvage_value:0 -msgid "It is the amount you plan to have that you cannot depreciate." -msgstr "" - -#. module: account_asset -#: help:account.asset.asset,method_period:0 -msgid "The amount of time between two depreciations, in months" -msgstr "" - -#. module: account_asset -#: field:account.asset.depreciation.line,depreciation_date:0 -#: view:asset.asset.report:0 -#: field:asset.asset.report,depreciation_date:0 -msgid "Depreciation Date" -msgstr "" - -#. module: account_asset -#: constraint:account.asset.asset:0 -msgid "Error ! You cannot create recursive assets." -msgstr "" - -#. module: account_asset -#: field:asset.asset.report,posted_value:0 -msgid "Posted Amount" -msgstr "" - -#. module: account_asset -#: view:account.asset.asset:0 -#: view:asset.asset.report:0 -#: model:ir.actions.act_window,name:account_asset.action_account_asset_asset_form -#: model:ir.ui.menu,name:account_asset.menu_action_account_asset_asset_form -#: model:ir.ui.menu,name:account_asset.menu_finance_assets -#: model:ir.ui.menu,name:account_asset.menu_finance_config_assets -msgid "Assets" -msgstr "" - -#. module: account_asset -#: field:account.asset.category,account_depreciation_id:0 -msgid "Depreciation Account" -msgstr "" - -#. module: account_asset -#: view:account.asset.asset:0 -#: view:account.asset.category:0 -#: view:account.asset.history:0 -#: view:asset.modify:0 -#: field:asset.modify,note:0 -msgid "Notes" -msgstr "" - -#. module: account_asset -#: field:account.asset.depreciation.line,move_id:0 -msgid "Depreciation Entry" -msgstr "" - -#. module: account_asset -#: code:addons/account_asset/account_asset.py:82 -#, python-format -msgid "Error!" -msgstr "" - -#. module: account_asset -#: view:asset.asset.report:0 -#: field:asset.asset.report,nbr:0 -msgid "# of Depreciation Lines" -msgstr "" - -#. module: account_asset -#: field:account.asset.asset,method_period:0 -msgid "Number of Months in a Period" -msgstr "" - -#. module: account_asset -#: view:asset.asset.report:0 -msgid "Assets in draft state" -msgstr "" - -#. module: account_asset -#: field:account.asset.asset,method_end:0 -#: selection:account.asset.asset,method_time:0 -#: selection:account.asset.category,method_time:0 -#: selection:account.asset.history,method_time:0 -msgid "Ending Date" -msgstr "" - -#. module: account_asset -#: field:account.asset.asset,code:0 -msgid "Reference" -msgstr "" - -#. module: account_asset -#: view:account.asset.asset:0 -msgid "Account Asset" -msgstr "" - -#. module: account_asset -#: model:ir.actions.act_window,name:account_asset.action_asset_depreciation_confirmation_wizard -#: model:ir.ui.menu,name:account_asset.menu_asset_depreciation_confirmation_wizard -msgid "Compute Assets" -msgstr "" - -#. module: account_asset -#: field:account.asset.category,method_period:0 -#: field:account.asset.history,method_period:0 -#: field:asset.modify,method_period:0 -msgid "Period Length" -msgstr "" - -#. module: account_asset -#: selection:account.asset.asset,state:0 -#: view:asset.asset.report:0 -#: selection:asset.asset.report,state:0 -msgid "Draft" -msgstr "" - -#. module: account_asset -#: view:asset.asset.report:0 -msgid "Date of asset purchase" -msgstr "" - -#. module: account_asset -#: view:account.asset.asset:0 -msgid "Change Duration" -msgstr "" - -#. module: account_asset -#: help:account.asset.asset,method_number:0 -#: help:account.asset.category,method_number:0 -#: help:account.asset.history,method_number:0 -msgid "The number of depreciations needed to depreciate your asset" -msgstr "" - -#. module: account_asset -#: view:account.asset.category:0 -msgid "Analytic Information" -msgstr "" - -#. module: account_asset -#: field:account.asset.category,account_analytic_id:0 -msgid "Analytic account" -msgstr "" - -#. module: account_asset -#: field:account.asset.asset,method:0 -#: field:account.asset.category,method:0 -msgid "Computation Method" -msgstr "" - -#. module: account_asset -#: constraint:account.asset.asset:0 -msgid "Prorata temporis can be applied only for time method \"number of depreciations\"." -msgstr "" - -#. module: account_asset -#: field:account.asset.depreciation.line,remaining_value:0 -msgid "Next Period Depreciation" -msgstr "" - -#. module: account_asset -#: help:account.asset.history,method_period:0 -msgid "Time in month between two depreciations" -msgstr "" - -#. module: account_asset -#: view:asset.modify:0 -#: model:ir.actions.act_window,name:account_asset.action_asset_modify -#: model:ir.model,name:account_asset.model_asset_modify -msgid "Modify Asset" -msgstr "" - -#. module: account_asset -#: field:account.asset.asset,salvage_value:0 -msgid "Salvage Value" -msgstr "" - -#. module: account_asset -#: field:account.asset.asset,category_id:0 -#: view:account.asset.category:0 -#: field:account.invoice.line,asset_category_id:0 -#: view:asset.asset.report:0 -msgid "Asset Category" -msgstr "" - -#. module: account_asset -#: view:account.asset.asset:0 -msgid "Assets in closed state" -msgstr "" - -#. module: account_asset -#: field:account.asset.asset,parent_id:0 -msgid "Parent Asset" -msgstr "" - -#. module: account_asset -#: view:account.asset.history:0 -#: model:ir.model,name:account_asset.model_account_asset_history -msgid "Asset history" -msgstr "" - -#. module: account_asset -#: view:account.asset.category:0 -msgid "Search Asset Category" -msgstr "" - -#. module: account_asset -#: view:asset.modify:0 -msgid "months" -msgstr "" - -#. module: account_asset -#: model:ir.model,name:account_asset.model_account_invoice_line -msgid "Invoice Line" -msgstr "" - -#. module: account_asset -#: view:account.asset.asset:0 -msgid "Depreciation Board" -msgstr "" - -#. module: account_asset -#: field:asset.asset.report,unposted_value:0 -msgid "Unposted Amount" -msgstr "" - -#. module: account_asset -#: field:account.asset.asset,method_time:0 -#: field:account.asset.category,method_time:0 -#: field:account.asset.history,method_time:0 -msgid "Time Method" -msgstr "" - -#. module: account_asset -#: view:asset.depreciation.confirmation.wizard:0 -#: view:asset.modify:0 -msgid "or" -msgstr "" - -#. module: account_asset -#: field:account.asset.asset,note:0 -#: field:account.asset.category,note:0 -#: field:account.asset.history,note:0 -msgid "Note" -msgstr "" - -#. module: account_asset -#: help:account.asset.history,method_time:0 -msgid "The method to use to compute the dates and number of depreciation lines.\n" -"Number of Depreciations: Fix the number of depreciation lines and the time between 2 depreciations.\n" -"Ending Date: Choose the time between 2 depreciations and the date the depreciations won't go beyond." -msgstr "" - -#. module: account_asset -#: help:account.asset.asset,method_time:0 -#: help:account.asset.category,method_time:0 -msgid "Choose the method to use to compute the dates and number of depreciation lines.\n" -" * Number of Depreciations: Fix the number of depreciation lines and the time between 2 depreciations.\n" -" * Ending Date: Choose the time between 2 depreciations and the date the depreciations won't go beyond." -msgstr "" - -#. module: account_asset -#: view:asset.asset.report:0 -msgid "Assets in running state" -msgstr "" - -#. module: account_asset -#: view:account.asset.asset:0 -msgid "Closed" -msgstr "" - -#. module: account_asset -#: help:account.asset.asset,state:0 -msgid "When an asset is created, the status is 'Draft'.\n" -"If the asset is confirmed, the status goes in 'Running' and the depreciation lines can be posted in the accounting.\n" -"You can manually close an asset when the depreciation is over. If the last line of depreciation is posted, the asset automatically goes in that status." -msgstr "" - -#. module: account_asset -#: field:account.asset.asset,state:0 -#: field:asset.asset.report,state:0 -msgid "Status" -msgstr "" - -#. module: account_asset -#: field:account.asset.asset,partner_id:0 -#: field:asset.asset.report,partner_id:0 -msgid "Partner" -msgstr "" - -#. module: account_asset -#: view:asset.asset.report:0 -msgid "Posted depreciation lines" -msgstr "" - -#. module: account_asset -#: field:account.asset.asset,child_ids:0 -msgid "Children Assets" -msgstr "" - -#. module: account_asset -#: view:asset.asset.report:0 -msgid "Date of depreciation" -msgstr "" - -#. module: account_asset -#: field:account.asset.history,user_id:0 -msgid "User" -msgstr "" - -#. module: account_asset -#: field:account.asset.category,account_asset_id:0 -msgid "Asset Account" -msgstr "" - -#. module: account_asset -#: view:asset.asset.report:0 -msgid "Extended Filters..." -msgstr "" - -#. module: account_asset -#: view:account.asset.asset:0 -#: view:asset.depreciation.confirmation.wizard:0 -msgid "Compute" -msgstr "" - -#. module: account_asset -#: view:account.asset.history:0 -msgid "Asset History" -msgstr "" - -#. module: account_asset -#: model:ir.model,name:account_asset.model_asset_depreciation_confirmation_wizard -msgid "asset.depreciation.confirmation.wizard" -msgstr "" - -#. module: account_asset -#: field:account.asset.asset,active:0 -msgid "Active" -msgstr "" - -#. module: account_asset -#: field:account.asset.depreciation.line,parent_state:0 -msgid "State of Asset" -msgstr "" - -#. module: account_asset -#: field:account.asset.depreciation.line,name:0 -msgid "Depreciation Name" -msgstr "" - -#. module: account_asset -#: view:account.asset.asset:0 -#: field:account.asset.asset,history_ids:0 -msgid "History" -msgstr "" - -#. module: account_asset -#: view:asset.depreciation.confirmation.wizard:0 -msgid "Compute Asset" -msgstr "" - -#. module: account_asset -#: field:asset.depreciation.confirmation.wizard,period_id:0 -msgid "Period" -msgstr "" - -#. module: account_asset -#: view:account.asset.asset:0 -msgid "General" -msgstr "" - -#. module: account_asset -#: field:account.asset.asset,prorata:0 -#: field:account.asset.category,prorata:0 -msgid "Prorata Temporis" -msgstr "" - -#. module: account_asset -#: model:ir.model,name:account_asset.model_account_invoice -msgid "Invoice" -msgstr "" - -#. module: account_asset -#: view:account.asset.asset:0 -msgid "Set to Close" -msgstr "" - -#. module: account_asset -#: view:asset.depreciation.confirmation.wizard:0 -#: view:asset.modify:0 -msgid "Cancel" -msgstr "" - -#. module: account_asset -#: selection:account.asset.asset,state:0 -#: selection:asset.asset.report,state:0 -msgid "Close" -msgstr "" - -#. module: account_asset -#: model:ir.model,name:account_asset.model_account_move_line -msgid "Journal Items" -msgstr "" - -#. module: account_asset -#: view:asset.modify:0 -msgid "Asset Durations to Modify" -msgstr "" - -#. module: account_asset -#: field:account.asset.asset,purchase_date:0 -#: view:asset.asset.report:0 -#: field:asset.asset.report,purchase_date:0 -msgid "Purchase Date" -msgstr "" - -#. module: account_asset -#: selection:account.asset.asset,method:0 -#: selection:account.asset.category,method:0 -msgid "Degressive" -msgstr "" - -#. module: account_asset -#: help:asset.depreciation.confirmation.wizard,period_id:0 -msgid "Choose the period for which you want to automatically post the depreciation lines of running assets" -msgstr "" - -#. module: account_asset -#: view:account.asset.asset:0 -msgid "Current" -msgstr "" - -#. module: account_asset -#: code:addons/account_asset/account_asset.py:82 -#, python-format -msgid "You cannot delete an asset that contains posted depreciation lines." -msgstr "" - -#. module: account_asset -#: view:account.asset.category:0 -msgid "Depreciation Method" -msgstr "" - -#. module: account_asset -#: field:account.asset.depreciation.line,amount:0 -msgid "Current Depreciation" -msgstr "" - -#. module: account_asset -#: field:account.asset.asset,name:0 -msgid "Asset Name" -msgstr "" - -#. module: account_asset -#: field:account.asset.category,open_asset:0 -msgid "Skip Draft State" -msgstr "" - -#. module: account_asset -#: view:account.asset.category:0 -msgid "Depreciation Dates" -msgstr "" - -#. module: account_asset -#: field:account.asset.asset,currency_id:0 -msgid "Currency" -msgstr "" - -#. module: account_asset -#: field:account.asset.category,journal_id:0 -msgid "Journal" -msgstr "" - -#. module: account_asset -#: field:account.asset.history,name:0 -msgid "History name" -msgstr "" - -#. module: account_asset -#: field:account.asset.depreciation.line,depreciated_value:0 -msgid "Amount Already Depreciated" -msgstr "" - -#. module: account_asset -#: help:account.asset.asset,method:0 -#: help:account.asset.category,method:0 -msgid "Choose the method to use to compute the amount of depreciation lines.\n" -" * Linear: Calculated on basis of: Gross Value / Number of Depreciations\n" -" * Degressive: Calculated on basis of: Residual Value * Degressive Factor" -msgstr "" - -#. module: account_asset -#: field:account.asset.depreciation.line,move_check:0 -#: view:asset.asset.report:0 -#: field:asset.asset.report,move_check:0 -msgid "Posted" -msgstr "" - -#. module: account_asset -#: model:ir.actions.act_window,help:account_asset.action_asset_asset_report -msgid "
\n" -" From this report, you can have an overview on all depreciation. The\n" -" tool search can also be used to personalise your Assets reports and\n" -" so, match this analysis to your needs;\n" -"
\n" -" " -msgstr "" - -#. module: account_asset -#: field:account.asset.asset,purchase_value:0 -msgid "Gross Value" -msgstr "" - -#. module: account_asset -#: field:account.asset.category,name:0 -msgid "Name" -msgstr "" - -#. module: account_asset -#: help:account.asset.category,open_asset:0 -msgid "Check this if you want to automatically confirm the assets of this category when created by invoices." -msgstr "" - -#. module: account_asset -#: field:asset.asset.report,name:0 -msgid "Year" -msgstr "" - -#. module: account_asset -#: model:ir.model,name:account_asset.model_account_asset_depreciation_line -msgid "Asset depreciation line" -msgstr "" - -#. module: account_asset -#: view:account.asset.category:0 -#: field:asset.asset.report,asset_category_id:0 -#: model:ir.model,name:account_asset.model_account_asset_category -msgid "Asset category" -msgstr "" - -#. module: account_asset -#: view:asset.asset.report:0 -#: field:asset.asset.report,depreciation_value:0 -msgid "Amount of Depreciation Lines" -msgstr "" - -#. module: account_asset -#: code:addons/account_asset/wizard/wizard_asset_compute.py:50 -#, python-format -msgid "Created Asset Moves" -msgstr "" - -#. module: account_asset -#: view:account.asset.asset:0 -msgid "Add an internal note here..." -msgstr "" - -#. module: account_asset -#: field:account.asset.depreciation.line,sequence:0 -msgid "Sequence" -msgstr "" - -#. module: account_asset -#: help:account.asset.category,method_period:0 -msgid "State here the time between 2 depreciations, in months" -msgstr "" - -#. module: account_asset -#: field:account.asset.history,date:0 -msgid "Date" -msgstr "" - -#. module: account_asset -#: field:account.asset.asset,method_number:0 -#: selection:account.asset.asset,method_time:0 -#: field:account.asset.category,method_number:0 -#: selection:account.asset.category,method_time:0 -#: field:account.asset.history,method_number:0 -#: selection:account.asset.history,method_time:0 -#: field:asset.modify,method_number:0 -msgid "Number of Depreciations" -msgstr "" - -#. module: account_asset -#: view:account.asset.asset:0 -msgid "Create Move" -msgstr "" - -#. module: account_asset -#: view:account.asset.asset:0 -msgid "Confirm Asset" -msgstr "" - -#. module: account_asset -#: model:ir.actions.act_window,name:account_asset.action_account_asset_asset_tree -#: model:ir.ui.menu,name:account_asset.menu_action_account_asset_asset_tree -msgid "Asset Hierarchy" -msgstr "" - diff --git a/account_asset_management/i18n/account_asset_management.pot b/account_asset_management/i18n/account_asset_management.pot index 9eac3f307..53ecbaea4 100644 --- a/account_asset_management/i18n/account_asset_management.pot +++ b/account_asset_management/i18n/account_asset_management.pot @@ -6,6 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-03-20 00:09+0000\n" +"PO-Revision-Date: 2020-03-20 00:09+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -241,14 +243,6 @@ msgid "" "when created by invoices." msgstr "" -#. module: account_asset_management -#: model:ir.model.fields,help:account_asset_management.field_account_asset__method -msgid "" -"Choose the method to use to compute the amount of depreciation lines.\n" -" * Linear: Calculated on basis of: Gross Value / Number of Depreciations\n" -" * Degressive: Calculated on basis of: Residual Value * Degressive Factor * Degressive-Linear (only for Time Method = Year): Degressive becomes linear when the annual linear depreciation exceeds the annual degressive depreciation" -msgstr "" - #. module: account_asset_management #: model:ir.model.fields,help:account_asset_management.field_account_asset__method_time #: model:ir.model.fields,help:account_asset_management.field_account_asset_profile__method_time @@ -258,6 +252,7 @@ msgid "" msgstr "" #. module: account_asset_management +#: model:ir.model.fields,help:account_asset_management.field_account_asset__method #: model:ir.model.fields,help:account_asset_management.field_account_asset_profile__method msgid "" "Choose the method to use to compute the depreciation lines.\n" @@ -617,6 +612,7 @@ msgid "Illegal value %s in asset.method." msgstr "" #. module: account_asset_management +#: model:ir.model.fields,help:account_asset_management.field_account_asset__prorata #: model:ir.model.fields,help:account_asset_management.field_account_asset_profile__prorata msgid "" "Indicates that the first depreciation entry for this asset has to be done " @@ -624,14 +620,6 @@ msgid "" "year." msgstr "" -#. module: account_asset_management -#: model:ir.model.fields,help:account_asset_management.field_account_asset__prorata -msgid "" -"Indicates that the first depreciation entry for this asset have to be done " -"from the depreciation start date instead of the first day of the fiscal " -"year." -msgstr "" - #. module: account_asset_management #: model_terms:ir.ui.view,arch_db:account_asset_management.account_asset_view_form msgid "Init" @@ -970,7 +958,7 @@ msgstr "" #, python-format msgid "" "The '_compute_year_amount' method is only intended for Time Method 'Number " -"of Years." +"of Years'." msgstr "" #. module: account_asset_management @@ -1024,7 +1012,7 @@ msgstr "" #: model:ir.model.fields,help:account_asset_management.field_account_asset_line__depreciation_base msgid "" "This amount represent the depreciation base of the asset (Purchase Value - " -"Salvage Value." +"Salvage Value)." msgstr "" #. module: account_asset_management diff --git a/account_asset_management/i18n/es.po b/account_asset_management/i18n/es.po index c9f0e9022..1823f05b4 100644 --- a/account_asset_management/i18n/es.po +++ b/account_asset_management/i18n/es.po @@ -19,21 +19,20 @@ # SaFi J.\n" -#~ " From this report, you can have an overview on all " -#~ "depreciations. The\n" -#~ " tool search can also be used to personalise your Assets reports " -#~ "and\n" -#~ " so, match this analysis to your needs;\n" -#~ "
\n" -#~ " " -#~ msgstr "" -#~ "\n" -#~ "Desde este informe, puede tener una visión global de todas sus " -#~ "amortizaciones. Puede\n" -#~ "utilizarse también la herramienta de búsqueda para personalizar sus " -#~ "informes de activos y,\n" -#~ "de esta forma, adaptar este análisis a sus necesidades;\n" -#~ "
" - -#~ msgid "Amount of Depreciation Lines" -#~ msgstr "Importe de las líneas de amortización" - -#~ msgid "" -#~ "Asset '%s' contains unposted lines prior to the selected period.\n" -#~ "Please post these entries first !" -#~ msgstr "" -#~ "El activo '%s' contiene líneas no asentadas previas al periodo " -#~ "seleccionado.\n" -#~ "Asiente por favor primero estos asientos." - -#~ msgid "Asset Categories" -#~ msgstr "Categorías de activo" - -#~ msgid "Asset Category" -#~ msgstr "Categoría de activo" - -#~ msgid "Asset Durations to Modify" -#~ msgstr "Duraciones de activo a modificar" - -#~ msgid "Asset Hierarchy" -#~ msgstr "Jerarquía de activos" - -#~ msgid "Asset History" -#~ msgstr "Histórico del activo" - -#~ msgid "Asset Value" -#~ msgstr "Valor del activo" - -#~ msgid "Asset category" -#~ msgstr "Categoría del activo" - -#~ msgid "Asset history" -#~ msgstr "Histórico del activo" - -#~ msgid "Assets Analysis" -#~ msgstr "Análisis de activos" - -#~ msgid "Assets in Running state" -#~ msgstr "Activos en ejecucción" - -#~ msgid "Category" -#~ msgstr "Categoría" - -#~ msgid "Change Duration" -#~ msgstr "Cambiar duración" - -#~ msgid "" -#~ "Choose the period for which you want to automatically post the " -#~ "depreciation lines of running assets" -#~ msgstr "" -#~ "Escoja el periodo para el que desea asentar automáticamente las líneas de " -#~ "amortización para los activos en ejecución" - -#~ msgid "Date of depreciation" -#~ msgstr "Fecha de amortización" - -#~ msgid "Ending date" -#~ msgstr "Fecha final" - -#~ msgid "Error!" -#~ msgstr "¡Error!" - -#~ msgid "Extended Filters..." -#~ msgstr "Filtros extendidos..." - -#~ msgid "Force Period" -#~ msgstr "Forzar periodo" - -#~ msgid "History name" -#~ msgstr "Nombre del historial" - -#~ msgid "Illegal value %s in asset.method_period." -#~ msgstr "Valor ilegal %s en asset.method_period." - -#~ msgid "Invalid action!" -#~ msgstr "Acción no válida." - -#~ msgid "Keep empty to use the period of the removal ate." -#~ msgstr "Dejar vacío para usar el periodo de la fecha de eliminación." - -#~ msgid "Modify" -#~ msgstr "Modificar" - -#~ msgid "Modify Asset" -#~ msgstr "Modificar activo" - -#~ msgid "Number of Depreciations/Years" -#~ msgstr "Número de amortizaciones/Años" - -#~ msgid "Period" -#~ msgstr "Período" - -#~ msgid "Posted Amount" -#~ msgstr "Importe asentado" - -#~ msgid "Posted depreciation lines" -#~ msgstr "Líneas de amortización asentadas" - -#~ msgid "Programming Error!" -#~ msgstr "Error de programación" - -#~ msgid "Unposted Amount" -#~ msgstr "Importe no asentado" - -#~ msgid "User" -#~ msgstr "Usuario" - -#~ msgid "onchange_account_id(account_id)" -#~ msgstr "onchange_account_id(account_id)" - -#~ msgid "or" -#~ msgstr "o" +msgid "You should manually add depreciation lines with the depreciations of previous fiscal years if the Depreciation Start Date is different from the date for which accounting entries need to be generated." +msgstr "Debe añadir manualmente las líneas de amortización con las amortizaciones de ejercicios fiscales anteriores si la fecha de inicio de amortización es diferente de la fecha para la cual se deben generar asientos contables." diff --git a/account_asset_management/models/account_asset.py b/account_asset_management/models/account_asset.py index 45ecbd2e8..10e9e174c 100644 --- a/account_asset_management/models/account_asset.py +++ b/account_asset_management/models/account_asset.py @@ -17,6 +17,12 @@ from odoo.osv import expression _logger = logging.getLogger(__name__) +READONLY_STATES = { + "open": [("readonly", True)], + "close": [("readonly", True)], + "removed": [("readonly", True)], +} + class DummyFy(object): def __init__(self, *args, **argv): @@ -39,23 +45,12 @@ class AccountAsset(models.Model): move_line_check = fields.Boolean( compute="_compute_move_line_check", string="Has accounting entries" ) - name = fields.Char( - string="Asset Name", - required=True, - readonly=True, - states={"draft": [("readonly", False)]}, - ) - code = fields.Char( - string="Reference", - size=32, - readonly=True, - states={"draft": [("readonly", False)]}, - ) + name = fields.Char(string="Asset Name", required=True, states=READONLY_STATES,) + code = fields.Char(string="Reference", size=32, states=READONLY_STATES,) purchase_value = fields.Float( string="Purchase Value", required=True, - readonly=True, - states={"draft": [("readonly", False)]}, + states=READONLY_STATES, help="This amount represent the initial value of the asset." "\nThe Depreciation Base is calculated as follows:" "\nPurchase Value - Salvage Value.", @@ -63,8 +58,7 @@ class AccountAsset(models.Model): salvage_value = fields.Float( string="Salvage Value", digits="Account", - readonly=True, - states={"draft": [("readonly", False)]}, + states=READONLY_STATES, help="The estimated value that an asset will realize upon " "its sale at the end of its useful life.\n" "This value is used to determine the depreciation amounts.", @@ -75,7 +69,7 @@ class AccountAsset(models.Model): string="Depreciation Base", store=True, help="This amount represent the depreciation base " - "of the asset (Purchase Value - Salvage Value.", + "of the asset (Purchase Value - Salvage Value).", ) value_residual = fields.Float( compute="_compute_depreciation", @@ -94,12 +88,14 @@ class AccountAsset(models.Model): comodel_name="account.asset.profile", string="Asset Profile", change_default=True, - readonly=True, required=True, - states={"draft": [("readonly", False)]}, + states=READONLY_STATES, ) group_ids = fields.Many2many( comodel_name="account.asset.group", + compute="_compute_group_ids", + readonly=False, + store=True, relation="account_asset_group_rel", column1="asset_id", column2="group_id", @@ -107,9 +103,8 @@ class AccountAsset(models.Model): ) date_start = fields.Date( string="Asset Start Date", - readonly=True, required=True, - states={"draft": [("readonly", False)]}, + states=READONLY_STATES, help="You should manually add depreciation lines " "with the depreciations of previous fiscal years " "if the Depreciation Start Date is different from the date " @@ -138,33 +133,35 @@ class AccountAsset(models.Model): ) active = fields.Boolean(default=True) partner_id = fields.Many2one( - comodel_name="res.partner", - string="Partner", - readonly=True, - states={"draft": [("readonly", False)]}, + comodel_name="res.partner", string="Partner", states=READONLY_STATES, ) method = fields.Selection( selection=lambda self: self.env["account.asset.profile"]._selection_method(), string="Computation Method", - required=True, - readonly=True, - states={"draft": [("readonly", False)]}, - default="linear", - help="Choose the method to use to compute " - "the amount of depreciation lines.\n" + compute="_compute_method", + readonly=False, + store=True, + states=READONLY_STATES, + help="Choose the method to use to compute the depreciation lines.\n" " * Linear: Calculated on basis of: " - "Gross Value / Number of Depreciations\n" + "Depreciation Base / Number of Depreciations. " + "Depreciation Base = Purchase Value - Salvage Value.\n" + " * Linear-Limit: Linear up to Salvage Value. " + "Depreciation Base = Purchase Value.\n" " * Degressive: Calculated on basis of: " - "Residual Value * Degressive Factor" + "Residual Value * Degressive Factor.\n" " * Degressive-Linear (only for Time Method = Year): " "Degressive becomes linear when the annual linear " - "depreciation exceeds the annual degressive depreciation", + "depreciation exceeds the annual degressive depreciation.\n" + " * Degressive-Limit: Degressive up to Salvage Value. " + "The Depreciation Base is equal to the asset value.", ) method_number = fields.Integer( string="Number of Years", - readonly=True, - states={"draft": [("readonly", False)]}, - default=5, + compute="_compute_method_number", + readonly=False, + store=True, + states=READONLY_STATES, help="The number of years needed to depreciate your asset", ) method_period = fields.Selection( @@ -172,47 +169,52 @@ class AccountAsset(models.Model): "account.asset.profile" ]._selection_method_period(), string="Period Length", - required=True, - readonly=True, - states={"draft": [("readonly", False)]}, - default="year", + compute="_compute_method_period", + readonly=False, + store=True, + states=READONLY_STATES, help="Period length for the depreciation accounting entries", ) method_end = fields.Date( - string="Ending Date", readonly=True, states={"draft": [("readonly", False)]} + string="Ending Date", + compute="_compute_method_end", + readonly=False, + store=True, + states=READONLY_STATES, ) method_progress_factor = fields.Float( string="Degressive Factor", - readonly=True, - states={"draft": [("readonly", False)]}, - default=0.3, + compute="_compute_method_progress_factor", + readonly=False, + store=True, + states=READONLY_STATES, ) method_time = fields.Selection( selection=lambda self: self.env[ "account.asset.profile" ]._selection_method_time(), string="Time Method", - required=True, - readonly=True, - states={"draft": [("readonly", False)]}, - default="year", + compute="_compute_method_time", + readonly=False, + store=True, + states=READONLY_STATES, help="Choose the method to use to compute the dates and " "number of depreciation lines.\n" " * Number of Years: Specify the number of years " - "for the depreciation.\n" - # " * Number of Depreciations: Fix the number of " - # "depreciation lines and the time between 2 depreciations.\n" - # " * Ending Date: Choose the time between 2 depreciations " - # "and the date the depreciations won't go beyond." + "for the depreciation.\n", ) days_calc = fields.Boolean( string="Calculate by days", - default=False, + compute="_compute_days_calc", + readonly=False, + store=True, help="Use number of days to calculate depreciation amount", ) use_leap_years = fields.Boolean( string="Use leap years", - default=False, + compute="_compute_use_leap_years", + readonly=False, + store=True, help="If not set, the system will distribute evenly the amount to " "amortize across the years, based on the number of years. " "So the amount per year will be the " @@ -224,19 +226,20 @@ class AccountAsset(models.Model): ) prorata = fields.Boolean( string="Prorata Temporis", - readonly=True, - states={"draft": [("readonly", False)]}, + compute="_compute_prorrata", + readonly=False, + store=True, + states=READONLY_STATES, help="Indicates that the first depreciation entry for this asset " - "have to be done from the depreciation start date instead " - "of the first day of the fiscal year.", + "has to be done from the depreciation start date instead of " + "the first day of the fiscal year.", ) depreciation_line_ids = fields.One2many( comodel_name="account.asset.line", inverse_name="asset_id", string="Depreciation Lines", copy=False, - readonly=True, - states={"draft": [("readonly", False)]}, + states=READONLY_STATES, ) company_id = fields.Many2one( comodel_name="res.company", @@ -253,21 +256,23 @@ class AccountAsset(models.Model): readonly=True, ) account_analytic_id = fields.Many2one( - comodel_name="account.analytic.account", string="Analytic account" + comodel_name="account.analytic.account", + string="Analytic account", + compute="_compute_account_analytic_id", + readonly=False, + store=True, ) @api.model def _default_company_id(self): return self.env.company + @api.depends("depreciation_line_ids.move_id") def _compute_move_line_check(self): for asset in self: - move_line_check = False - for line in asset.depreciation_line_ids: - if line.move_id: - move_line_check = True - break - asset.move_line_check = move_line_check + asset.move_line_check = bool( + asset.depreciation_line_ids.filtered("move_id") + ) @api.depends("purchase_value", "salvage_value", "method") def _compute_depreciation_base(self): @@ -296,20 +301,93 @@ class AccountAsset(models.Model): depreciated = value_depreciated asset.update({"value_residual": residual, "value_depreciated": depreciated}) + @api.depends("profile_id") + def _compute_group_ids(self): + for asset in self: + asset.group_ids = asset.profile_id.group_ids + + @api.depends("profile_id") + def _compute_method(self): + for asset in self: + asset.method = asset.profile_id.method + + @api.depends("profile_id", "method_end") + def _compute_method_number(self): + for asset in self: + if asset.method_end: + asset.method_number = 0 + else: + asset.method_number = asset.profile_id.method_number + + @api.depends("profile_id") + def _compute_method_period(self): + for asset in self: + asset.method_period = asset.profile_id.method_period + + @api.depends("method_number") + def _compute_method_end(self): + for asset in self: + if asset.method_number: + asset.method_end = False + + @api.depends("profile_id") + def _compute_method_progress_factor(self): + for asset in self: + asset.method_progress_factor = asset.profile_id.method_progress_factor + + @api.depends("profile_id") + def _compute_method_time(self): + for asset in self: + asset.method_time = asset.profile_id.method_time + + @api.depends("profile_id") + def _compute_days_calc(self): + for asset in self: + asset.days_calc = asset.profile_id.days_calc + + @api.depends("profile_id") + def _compute_use_leap_years(self): + for asset in self: + asset.use_leap_years = asset.profile_id.use_leap_years + + @api.depends("profile_id", "method_time") + def _compute_prorrata(self): + for asset in self: + if asset.method_time != "year": + asset.prorata = True + else: + asset.prorata = asset.profile_id.prorata + + @api.depends("profile_id") + def _compute_account_analytic_id(self): + for asset in self: + asset.account_analytic_id = asset.profile_id.account_analytic_id + @api.constrains("method", "method_time") def _check_method(self): - for asset in self: - if asset.method == "degr-linear" and asset.method_time != "year": - raise UserError( - _("Degressive-Linear is only supported for Time Method = " "Year.") - ) + if self.filtered( + lambda a: a.method == "degr-linear" and a.method_time != "year" + ): + raise UserError( + _("Degressive-Linear is only supported for Time Method = Year.") + ) @api.constrains("date_start", "method_end", "method_time") def _check_dates(self): - for asset in self: - if asset.method_time == "end": - if asset.method_end <= asset.date_start: - raise UserError(_("The Start Date must precede the Ending Date.")) + if self.filtered( + lambda a: a.method_time == "end" and a.method_end <= a.date_start + ): + raise UserError(_("The Start Date must precede the Ending Date.")) + + @api.constrains("profile_id") + def _check_profile_change(self): + if self.depreciation_line_ids.filtered("move_id"): + raise UserError( + _( + "You cannot change the profile of an asset " + "with accounting entries." + ) + ) @api.onchange("purchase_value", "salvage_value", "date_start", "method") def _onchange_purchase_salvage_value(self): @@ -327,52 +405,8 @@ class AccountAsset(models.Model): {"amount": self.depreciation_base, "line_date": self.date_start} ) - @api.onchange("profile_id") - def _onchange_profile_id(self): - for line in self.depreciation_line_ids: - if line.move_id: - raise UserError( - _( - "You cannot change the profile of an asset " - "with accounting entries." - ) - ) - profile = self.profile_id - if profile: - self.update( - { - "method": profile.method, - "method_number": profile.method_number, - "method_time": profile.method_time, - "method_period": profile.method_period, - "days_calc": profile.days_calc, - "use_leap_years": profile.use_leap_years, - "method_progress_factor": profile.method_progress_factor, - "prorata": profile.prorata, - "account_analytic_id": profile.account_analytic_id, - "group_ids": profile.group_ids, - } - ) - - @api.onchange("method_time") - def _onchange_method_time(self): - if self.method_time != "year": - self.prorata = True - - @api.onchange("method_number") - def _onchange_method_number(self): - if self.method_number and self.method_end: - self.method_end = False - - @api.onchange("method_end") - def _onchange_method_end(self): - if self.method_end and self.method_number: - self.method_number = 0 - @api.model def create(self, vals): - if vals.get("method_time") != "year" and not vals.get("prorata"): - vals["prorata"] = True asset = super().create(vals) if self.env.context.get("create_asset_from_move_line"): # Trigger compute of depreciation_base @@ -381,9 +415,6 @@ class AccountAsset(models.Model): return asset def write(self, vals): - if vals.get("method_time"): - if vals["method_time"] != "year" and not vals.get("prorata"): - vals["prorata"] = True res = super().write(vals) for asset in self: if self.env.context.get("asset_validate_from_write"): @@ -818,7 +849,7 @@ class AccountAsset(models.Model): raise UserError( _( "The '_compute_year_amount' method is only intended for " - "Time Method 'Number of Years." + "Time Method 'Number of Years'." ) ) year_amount_linear = self._get_amount_linear( diff --git a/account_asset_management/models/account_asset_line.py b/account_asset_management/models/account_asset_line.py index 532a5cbde..dbcc75ab2 100644 --- a/account_asset_management/models/account_asset_line.py +++ b/account_asset_management/models/account_asset_line.py @@ -63,6 +63,7 @@ class AccountAssetLine(models.Model): @api.depends("amount", "previous_id", "type") def _compute_values(self): + processed_lines = self.browse() dlines = self if self.env.context.get("no_compute_asset_line_ids"): # skip compute for lines in unlink @@ -93,6 +94,11 @@ class AccountAssetLine(models.Model): remaining_value -= dl.amount dl.depreciated_value = depreciated_value dl.remaining_value = remaining_value + processed_lines |= dl + # Set unprocessed lines values + for line in self - processed_lines: + line.depreciated_value = 0.0 + line.remaining_value = 0.0 @api.depends("move_id") def _compute_move_check(self): diff --git a/account_asset_management/models/account_asset_profile.py b/account_asset_management/models/account_asset_profile.py index a1b4c7f53..f1581725d 100644 --- a/account_asset_management/models/account_asset_profile.py +++ b/account_asset_management/models/account_asset_profile.py @@ -128,6 +128,9 @@ class AccountAssetProfile(models.Model): ) prorata = fields.Boolean( string="Prorata Temporis", + compute="_compute_prorrata", + readonly=False, + store=True, help="Indicates that the first depreciation entry for this asset " "has to be done from the depreciation start date instead of " "the first day of the fiscal year.", @@ -173,18 +176,20 @@ class AccountAssetProfile(models.Model): """ return [("year", _("Number of Years or end date"))] - @api.constrains("method") + @api.constrains("method", "method_time") def _check_method(self): - for profile in self: - if profile.method == "degr-linear" and profile.method_time != "year": - raise UserError( - _("Degressive-Linear is only supported for Time Method = " "Year.") - ) + if self.filtered( + lambda a: a.method == "degr-linear" and a.method_time != "year" + ): + raise UserError( + _("Degressive-Linear is only supported for Time Method = Year.") + ) - @api.onchange("method_time") - def _onchange_method_time(self): - if self.method_time != "year": - self.prorata = True + @api.depends("method_time") + def _compute_prorrata(self): + for profile in self: + if profile.method_time != "year": + profile.prorata = True @api.model def create(self, vals): diff --git a/account_asset_management/views/account_asset.xml b/account_asset_management/views/account_asset.xml index 6b167047c..8d94658c2 100644 --- a/account_asset_management/views/account_asset.xml +++ b/account_asset_management/views/account_asset.xml @@ -121,12 +121,12 @@ string="Depreciation Dates" colspan="2" /> -