mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
Multiple changes by Pedro Manuel Baeza
[FIX] account_chart_update: Corrected description for RST parser and english faults in it. [FIX] account_chart_update: Corrected some english terms. [IMP] account_chart_update: Changed name of menu to avoid excessive length. [IMP] account_chart_update: Removed three line comments style. [IMP] account_chart_update: Remove class instantiation. [IMP] account_chart_update: Put method descriptions according documentation standards. [IMP] account_chart_update: Updated translations. [IMP] account_chart_update: Menu path to avoid needing multi-company permission.
This commit is contained in:
@@ -31,28 +31,30 @@
|
||||
'website': "www.zikzakmedia.com",
|
||||
'depends': ["account"],
|
||||
'category': "Generic Modules/Accounting",
|
||||
'contributors': ['Joaquin Gutierrez', 'Pedro M. Baeza'],
|
||||
'contributors': ['Joaquín Gutierrez', 'Pedro M. Baeza', 'invitu'],
|
||||
'description': """
|
||||
Adds a wizard to update a company account chart from a chart template.
|
||||
======================================================================
|
||||
|
||||
This is a pretty useful tool to update OpenERP instalations after tax reforms
|
||||
on the oficial charts of accounts, or to apply fixes performed on the chart
|
||||
This is a pretty useful tool to update OpenERP installations after tax reforms
|
||||
on the official charts of accounts, or to apply fixes performed on the chart
|
||||
template.
|
||||
|
||||
The wizard:
|
||||
|
||||
- Allows the user to compare a chart and a template showing differences
|
||||
on accounts, taxes, tax codes and fiscal positions.
|
||||
on accounts, taxes, tax codes and fiscal positions.
|
||||
- It may create the new account, taxes, tax codes and fiscal positions detected
|
||||
on the template.
|
||||
on the template.
|
||||
- It can also update (overwrite) the accounts, taxes, tax codes and fiscal
|
||||
positions that got modified on the template.
|
||||
positions that got modified on the template.
|
||||
|
||||
The wizard lets the user select what kind of objects must be checked/updated,
|
||||
and whether old records must be checked for changes and updated.
|
||||
and whether old records must be checked for changes and updates.
|
||||
It will display all the accounts to be created / updated with some information
|
||||
about the detected differences, and allow the user to exclude records
|
||||
individually.
|
||||
|
||||
Any problem found while updating will be shown on the last step.
|
||||
""",
|
||||
'license': "AGPL-3",
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 7.0-20130927-231103\n"
|
||||
"Project-Id-Version: OpenERP Server 7.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-09-30 21:45+0000\n"
|
||||
"PO-Revision-Date: 2013-09-30 21:45+0000\n"
|
||||
"POT-Creation-Date: 2013-10-15 14:01+0000\n"
|
||||
"PO-Revision-Date: 2013-10-15 14:01+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -15,13 +15,18 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: view:wizard.update.charts.accounts:0
|
||||
msgid "Update chart of accounts from a template"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: field:wizard.update.charts.accounts.account,update_account_id:0
|
||||
msgid "Account to update"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:359
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:368
|
||||
#, python-format
|
||||
msgid "The code field is different.\n"
|
||||
""
|
||||
@@ -43,19 +48,14 @@ msgid "Fiscal position to update"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: help:wizard.update.charts.accounts,update_account:0
|
||||
msgid "Existing accounts are updated. Accounts are searched by code."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:753
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:716
|
||||
#, python-format
|
||||
msgid "Created tax code %s.\n"
|
||||
""
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1083
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1012
|
||||
#, python-format
|
||||
msgid "Tax %s: The collected account can not be set.\n"
|
||||
""
|
||||
@@ -80,14 +80,14 @@ msgid "Company"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1161
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1076
|
||||
#, python-format
|
||||
msgid "Fiscal position %s: The destination tax %s can not be set.\n"
|
||||
""
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:892
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:839
|
||||
#, python-format
|
||||
msgid "Tax %s: The tax code for the tax refund %s can not be set.\n"
|
||||
""
|
||||
@@ -104,7 +104,7 @@ msgid "Updated tax codes"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:630
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:617
|
||||
#, python-format
|
||||
msgid "The template has taxes the fiscal position instance does not.\n"
|
||||
""
|
||||
@@ -135,31 +135,19 @@ msgid "Taxes"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:362
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:371
|
||||
#, python-format
|
||||
msgid "The info field is different.\n"
|
||||
""
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: selection:wizard.update.charts.accounts,state:0
|
||||
msgid "Wizard Complete"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: model:ir.actions.act_window,name:account_chart_update.action_wizard_update_chart
|
||||
#: model:ir.ui.menu,name:account_chart_update.menu_wizard
|
||||
msgid "Update Chart of Accounts from a Chart Template\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: field:wizard.update.charts.accounts,new_taxes:0
|
||||
msgid "New taxes"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:762
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:723
|
||||
#, python-format
|
||||
msgid "Updated tax code %s.\n"
|
||||
""
|
||||
@@ -176,21 +164,21 @@ msgid "Tax to update"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:853
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:806
|
||||
#, python-format
|
||||
msgid "Created tax %s.\n"
|
||||
""
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:456
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:459
|
||||
#, python-format
|
||||
msgid "The base sign field is different.\n"
|
||||
""
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:438
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:441
|
||||
#, python-format
|
||||
msgid "The type field is different.\n"
|
||||
""
|
||||
@@ -208,14 +196,14 @@ msgid "Accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:888
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:835
|
||||
#, python-format
|
||||
msgid "Tax %s: The tax code for the tax %s can not be set.\n"
|
||||
""
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:625
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:612
|
||||
#, python-format
|
||||
msgid "Tax mapping not found on the fiscal position instance: %s -> %s.\n"
|
||||
""
|
||||
@@ -250,7 +238,12 @@ msgid "New template"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:432
|
||||
#: help:wizard.update.charts.accounts,code_digits:0
|
||||
msgid "No. of digits to use for account code. Make sure it is the same number as existing accounts."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:435
|
||||
#, python-format
|
||||
msgid "The sequence field is different.\n"
|
||||
""
|
||||
@@ -262,7 +255,7 @@ msgid "Updated accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:645
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:630
|
||||
#, python-format
|
||||
msgid "Account mapping not found on the fiscal position instance: %s -> %s.\n"
|
||||
""
|
||||
@@ -287,7 +280,7 @@ msgid "Updated taxes"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:462
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:465
|
||||
#, python-format
|
||||
msgid "The include base amount field is different.\n"
|
||||
""
|
||||
@@ -299,7 +292,7 @@ msgid "Chart of Accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:648
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:633
|
||||
#, python-format
|
||||
msgid "The template has accounts the fiscal position instance does not.\n"
|
||||
""
|
||||
@@ -316,14 +309,20 @@ msgid "Step 2"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1085
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1014
|
||||
#, python-format
|
||||
msgid "Tax %s: The paid account can not be set.\n"
|
||||
""
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1002
|
||||
#: model:ir.actions.act_window,name:account_chart_update.action_wizard_update_chart
|
||||
#: model:ir.ui.menu,name:account_chart_update.menu_wizard
|
||||
msgid "Update chart of accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:941
|
||||
#, python-format
|
||||
msgid "Exception creating account %s: %s - %s.\n"
|
||||
""
|
||||
@@ -335,7 +334,7 @@ msgid "Continue on errors"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:450
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:453
|
||||
#, python-format
|
||||
msgid "The python compute field is different.\n"
|
||||
""
|
||||
@@ -347,36 +346,29 @@ msgid "wizard.update.charts.accounts.tax.code"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1187
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1092
|
||||
#, python-format
|
||||
msgid "Fiscal position %s: The source account %s can not be set.\n"
|
||||
""
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: field:wizard.update.charts.accounts,code_digits:0
|
||||
msgid "# of Digits"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:886
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:833
|
||||
#, python-format
|
||||
msgid "Tax %s: The tax code for the base %s can not be set.\n"
|
||||
""
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1015
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:952
|
||||
#, python-format
|
||||
msgid "Exception writing account %s: %s - %s.\n"
|
||||
""
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1028
|
||||
#, python-format
|
||||
msgid "Account %s: The parent account %s can not be set.\n"
|
||||
""
|
||||
#: view:wizard.update.charts.accounts:0
|
||||
msgid "Note: Not all the fields are tested for changes, just the main ones"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
@@ -385,14 +377,18 @@ msgid "Update fiscal positions"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:239
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:705
|
||||
#: view:wizard.update.charts.accounts:0
|
||||
msgid "or"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:250
|
||||
#, python-format
|
||||
msgid "Update Chart of Accounts from a Chart Template "
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:534
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:531
|
||||
#, python-format
|
||||
msgid "The name is different.\n"
|
||||
""
|
||||
@@ -404,28 +400,28 @@ msgid "Log"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:777
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:736
|
||||
#, python-format
|
||||
msgid "Tax code %s: The parent tax code %s can not be set.\n"
|
||||
""
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:435
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:438
|
||||
#, python-format
|
||||
msgid "The amount field is different.\n"
|
||||
""
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:447
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:450
|
||||
#, python-format
|
||||
msgid "The child depend field is different.\n"
|
||||
""
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1011
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:948
|
||||
#, python-format
|
||||
msgid "Updated account %s.\n"
|
||||
""
|
||||
@@ -442,14 +438,26 @@ msgid "Messages and Errors"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:465
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:468
|
||||
#, python-format
|
||||
msgid "The type tax use field is different.\n"
|
||||
""
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:884
|
||||
#: selection:wizard.update.charts.accounts,state:0
|
||||
msgid "Wizard completed"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:963
|
||||
#, python-format
|
||||
msgid "Account %s: The parent account %s can not be set.\n"
|
||||
""
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:831
|
||||
#, python-format
|
||||
msgid "Tax %s: The parent tax %s can not be set.\n"
|
||||
""
|
||||
@@ -477,29 +485,34 @@ msgid "Summary of updated objects"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:365
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:374
|
||||
#, python-format
|
||||
msgid "The sign field is different.\n"
|
||||
""
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:862
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:813
|
||||
#, python-format
|
||||
msgid "Updated tax %s.\n"
|
||||
""
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:927
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:874
|
||||
#, python-format
|
||||
msgid "Exception setting the parent of account %s children: %s - %s.\n"
|
||||
""
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: help:wizard.update.charts.accounts,code_digits:0
|
||||
msgid "No. of Digits to use for account code. Make sure it is the same number as existing accounts."
|
||||
#: help:wizard.update.charts.accounts,update_account:0
|
||||
msgid "Existing accounts are updated. Accounts are searched by code."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: field:wizard.update.charts.accounts,code_digits:0
|
||||
msgid "# of digits"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
@@ -518,23 +531,18 @@ msgid "Account template"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1226
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1127
|
||||
#, python-format
|
||||
msgid "Error"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: view:wizard.update.charts.accounts:0
|
||||
msgid "Update Chart of Accounts from a Chart Template"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: view:wizard.update.charts.accounts:0
|
||||
msgid "Summary of created objects"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:537
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:534
|
||||
#, python-format
|
||||
msgid "The type is different.\n"
|
||||
""
|
||||
@@ -561,18 +569,13 @@ msgstr ""
|
||||
msgid "Existing taxes are updated. Taxes are searched by name."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: view:wizard.update.charts.accounts:0
|
||||
msgid "Note:Not all the fields are tested for changes, just the main ones"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: view:wizard.update.charts.accounts:0
|
||||
msgid "Create/Update"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:890
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:837
|
||||
#, python-format
|
||||
msgid "Tax %s: The tax code for the base refund %s can not be set.\n"
|
||||
""
|
||||
@@ -589,14 +592,14 @@ msgid "Chart Template"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:459
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:462
|
||||
#, python-format
|
||||
msgid "The tax sign field is different.\n"
|
||||
""
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1226
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1127
|
||||
#, python-format
|
||||
msgid "One or more errors detected!\n"
|
||||
"\n"
|
||||
@@ -604,7 +607,7 @@ msgid "One or more errors detected!\n"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1189
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1094
|
||||
#, python-format
|
||||
msgid "Fiscal position %s: The destination account %s can not be set.\n"
|
||||
""
|
||||
@@ -616,7 +619,7 @@ msgid "New fiscal positions"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:441
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:444
|
||||
#, python-format
|
||||
msgid "The applicable type field is different.\n"
|
||||
""
|
||||
@@ -633,7 +636,7 @@ msgid "Tax template"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:627
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:614
|
||||
#, python-format
|
||||
msgid "Tax mapping not found on the fiscal position instance: %s -> None.\n"
|
||||
""
|
||||
@@ -650,7 +653,7 @@ msgid "Existing fiscal positions are updated. Fiscal positions are searched by n
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:540
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:537
|
||||
#, python-format
|
||||
msgid "The user type is different.\n"
|
||||
""
|
||||
@@ -670,25 +673,19 @@ msgid "This wizard will update your accounts, taxes and fiscal positions accordi
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:543
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:540
|
||||
#, python-format
|
||||
msgid "The reconcile is different.\n"
|
||||
""
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:444
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:447
|
||||
#, python-format
|
||||
msgid "The domain field is different.\n"
|
||||
""
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1253
|
||||
#, python-format
|
||||
msgid "Update Accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: view:wizard.update.charts.accounts:0
|
||||
msgid "Other options"
|
||||
@@ -705,14 +702,14 @@ msgid "Records to create/update"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1191
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1096
|
||||
#, python-format
|
||||
msgid "Created or updated fiscal position %s.\n"
|
||||
""
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1159
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1074
|
||||
#, python-format
|
||||
msgid "Fiscal position %s: The source tax %s can not be set.\n"
|
||||
""
|
||||
@@ -729,7 +726,7 @@ msgid "For records searched by name (taxes, tax codes, fiscal positions), the te
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:998
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:937
|
||||
#, python-format
|
||||
msgid "Created account %s.\n"
|
||||
""
|
||||
|
||||
@@ -208,7 +208,7 @@ msgstr "Impost %s: No s'ha pogut establir el compte a pagar.\n"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: selection:wizard.update.charts.accounts,state:0
|
||||
msgid "Wizard Complete"
|
||||
msgid "Wizard completep"
|
||||
msgstr "Assistent completat"
|
||||
|
||||
#. module: account_chart_update
|
||||
|
||||
@@ -233,7 +233,7 @@ msgstr "Núm. de dígits"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: selection:wizard.update.charts.accounts,state:0
|
||||
msgid "Wizard Complete"
|
||||
msgid "Wizard completed"
|
||||
msgstr "Assistent completat"
|
||||
|
||||
#. module: account_chart_update
|
||||
|
||||
@@ -1,21 +1,24 @@
|
||||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_chart_update
|
||||
# * account_chart_update
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.10\n"
|
||||
"Project-Id-Version: OpenERP Server 7.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-09-30 21:45+0000\n"
|
||||
"PO-Revision-Date: 2013-09-30 23:52+0100\n"
|
||||
"Last-Translator: Joaquin Gutierrez <joaquing.pedrosa@gmail.com>\n"
|
||||
"POT-Creation-Date: 2013-10-15 14:02+0000\n"
|
||||
"PO-Revision-Date: 2013-10-15 16:02+0100\n"
|
||||
"Last-Translator: Pedro Manuel Baeza <pedro.baeza@serviciosbaeza.com>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-11-28 04:55+0000\n"
|
||||
"X-Generator: Launchpad (build 16309)\n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: view:wizard.update.charts.accounts:0
|
||||
msgid "Update chart of accounts from a template"
|
||||
msgstr "Actualizar plan contable desde una plantilla"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: field:wizard.update.charts.accounts.account,update_account_id:0
|
||||
@@ -23,7 +26,7 @@ msgid "Account to update"
|
||||
msgstr "Cuenta a actualizar"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:359
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:368
|
||||
#, python-format
|
||||
msgid "The code field is different.\n"
|
||||
msgstr "El campo código es diferente.\n"
|
||||
@@ -44,18 +47,13 @@ msgid "Fiscal position to update"
|
||||
msgstr "Posición fiscal a actualizar"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: help:wizard.update.charts.accounts,update_account:0
|
||||
msgid "Existing accounts are updated. Accounts are searched by code."
|
||||
msgstr "Las cuentas contables existentes serán actualizadas. Las cuentas se buscarán por código."
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:753
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:716
|
||||
#, python-format
|
||||
msgid "Created tax code %s.\n"
|
||||
msgstr "Creado código de impuesto %s.\n"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1083
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1012
|
||||
#, python-format
|
||||
msgid "Tax %s: The collected account can not be set.\n"
|
||||
msgstr "Impuesto %s: No se pudo establecer la cuenta a recibir.\n"
|
||||
@@ -79,22 +77,21 @@ msgid "Company"
|
||||
msgstr "Compañía"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1161
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1076
|
||||
#, python-format
|
||||
msgid "Fiscal position %s: The destination tax %s can not be set.\n"
|
||||
msgstr "Posición fiscal %s: No se pudo establecer la cuenta destino %s.\n"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:892
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:839
|
||||
#, python-format
|
||||
msgid "Tax %s: The tax code for the tax refund %s can not be set.\n"
|
||||
msgstr "Impuesto %s: No se pudo establecer el código de impuesto para la devolución de impuesto %s.\n"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: view:wizard.update.charts.accounts:0
|
||||
#, fuzzy
|
||||
msgid "If you leave these options set, the wizard will not just create new records, but also update records with changes (i.e. different tax amount)"
|
||||
msgstr "Si deja marcadas estas opciones, el asistente no sólo creará nuevos registros, sino que también actualizará registros con cambios (p.ej. diferente importe de impuesto)"
|
||||
msgstr "Si deja esta opción marcada, el asistente creará no sólo nuevos registros, si no que también actualizará aquellos con cambios (por ejemplo, diferente porcentaje de impuesto)"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: field:wizard.update.charts.accounts,updated_tax_codes:0
|
||||
@@ -102,7 +99,7 @@ msgid "Updated tax codes"
|
||||
msgstr "Códigos de impuesto actualizados"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:630
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:617
|
||||
#, python-format
|
||||
msgid "The template has taxes the fiscal position instance does not.\n"
|
||||
msgstr "La plantilla tiene impuestos que la instancia de posición fiscal no.\n"
|
||||
@@ -132,32 +129,18 @@ msgid "Taxes"
|
||||
msgstr "Impuestos"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:362
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:371
|
||||
#, python-format
|
||||
msgid "The info field is different.\n"
|
||||
msgstr "El campo info es diferente.\n"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: selection:wizard.update.charts.accounts,state:0
|
||||
msgid "Wizard Complete"
|
||||
msgstr "Asistente completado"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: model:ir.actions.act_window,name:account_chart_update.action_wizard_update_chart
|
||||
#: model:ir.ui.menu,name:account_chart_update.menu_wizard
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"Update Chart of Accounts from a Chart Template\n"
|
||||
"\t\t\t"
|
||||
msgstr "Actualizar plan contable a partir de una plantilla de plan contable"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: field:wizard.update.charts.accounts,new_taxes:0
|
||||
msgid "New taxes"
|
||||
msgstr "Nuevos impuestos"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:762
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:723
|
||||
#, python-format
|
||||
msgid "Updated tax code %s.\n"
|
||||
msgstr "Actualizado código de impuesto %s.\n"
|
||||
@@ -173,19 +156,19 @@ msgid "Tax to update"
|
||||
msgstr "Impuesto a actualizar"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:853
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:806
|
||||
#, python-format
|
||||
msgid "Created tax %s.\n"
|
||||
msgstr "Creado impuesto %s.\n"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:456
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:459
|
||||
#, python-format
|
||||
msgid "The base sign field is different.\n"
|
||||
msgstr "El campo signo base es diferente.\n"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:438
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:441
|
||||
#, python-format
|
||||
msgid "The type field is different.\n"
|
||||
msgstr "El campo tipo es diferente.\n"
|
||||
@@ -193,7 +176,7 @@ msgstr "El campo tipo es diferente.\n"
|
||||
#. module: account_chart_update
|
||||
#: model:ir.model,name:account_chart_update.model_wizard_update_charts_accounts_account
|
||||
msgid "wizard.update.charts.accounts.account"
|
||||
msgstr "wizard.update.charts.accounts.account"
|
||||
msgstr "Asistente de actualización de plan contable"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: view:wizard.update.charts.accounts:0
|
||||
@@ -202,13 +185,13 @@ msgid "Accounts"
|
||||
msgstr "Cuentas"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:888
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:835
|
||||
#, python-format
|
||||
msgid "Tax %s: The tax code for the tax %s can not be set.\n"
|
||||
msgstr "Impuesto %s: No se pudo establecer el código de impuesto para el impuesto %s.\n"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:625
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:612
|
||||
#, python-format
|
||||
msgid "Tax mapping not found on the fiscal position instance: %s -> %s.\n"
|
||||
msgstr "Mapeo de cuenta no encontrado en la instancia de la posición fiscal: %s -> %s.\n"
|
||||
@@ -242,7 +225,12 @@ msgid "New template"
|
||||
msgstr "Nueva plantilla"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:432
|
||||
#: help:wizard.update.charts.accounts,code_digits:0
|
||||
msgid "No. of digits to use for account code. Make sure it is the same number as existing accounts."
|
||||
msgstr "Nº de dígitos a usar para el código de cuenta. Asegúrese que este número es el mismo que el de las cuentas existentes."
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:435
|
||||
#, python-format
|
||||
msgid "The sequence field is different.\n"
|
||||
msgstr "El campo secuencia es diferente.\n"
|
||||
@@ -253,7 +241,7 @@ msgid "Updated accounts"
|
||||
msgstr "Cuentas actualizadas"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:645
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:630
|
||||
#, python-format
|
||||
msgid "Account mapping not found on the fiscal position instance: %s -> %s.\n"
|
||||
msgstr "Mapeo de cuenta no encontrado en la instancia de posición fiscal: %s -> %s.\n"
|
||||
@@ -277,7 +265,7 @@ msgid "Updated taxes"
|
||||
msgstr "Impuestos actualizados"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:462
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:465
|
||||
#, python-format
|
||||
msgid "The include base amount field is different.\n"
|
||||
msgstr "El campo incluir en importe base es diferente.\n"
|
||||
@@ -288,7 +276,7 @@ msgid "Chart of Accounts"
|
||||
msgstr "Plan contable"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:648
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:633
|
||||
#, python-format
|
||||
msgid "The template has accounts the fiscal position instance does not.\n"
|
||||
msgstr "La plantilla tiene cuentas que la instancia de posición fiscal no.\n"
|
||||
@@ -304,13 +292,19 @@ msgid "Step 2"
|
||||
msgstr "Paso 2"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1085
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1014
|
||||
#, python-format
|
||||
msgid "Tax %s: The paid account can not be set.\n"
|
||||
msgstr "Impuesto %s: No se pudo establecer la cuenta a pagar.\n"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1002
|
||||
#: model:ir.actions.act_window,name:account_chart_update.action_wizard_update_chart
|
||||
#: model:ir.ui.menu,name:account_chart_update.menu_wizard
|
||||
msgid "Update chart of accounts"
|
||||
msgstr "Actualizar plan de cuentas"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:941
|
||||
#, python-format
|
||||
msgid "Exception creating account %s: %s - %s.\n"
|
||||
msgstr "Excepción creando cuenta %s: %s - %s.\n"
|
||||
@@ -321,7 +315,7 @@ msgid "Continue on errors"
|
||||
msgstr "Continuar tras errores"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:450
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:453
|
||||
#, python-format
|
||||
msgid "The python compute field is different.\n"
|
||||
msgstr "El campo cálculo python es diferente.\n"
|
||||
@@ -332,33 +326,27 @@ msgid "wizard.update.charts.accounts.tax.code"
|
||||
msgstr "wizard.update.charts.accounts.tax.code"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1187
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1092
|
||||
#, python-format
|
||||
msgid "Fiscal position %s: The source account %s can not be set.\n"
|
||||
msgstr "Posición fiscal %s: No se pudo establecer la cuenta de origen %s.\n"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: field:wizard.update.charts.accounts,code_digits:0
|
||||
msgid "# of Digits"
|
||||
msgstr "Núm. de dígitos"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:886
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:833
|
||||
#, python-format
|
||||
msgid "Tax %s: The tax code for the base %s can not be set.\n"
|
||||
msgstr "Impuesto %s: No se pudo establecer el código de impuesto para la base %s.\n"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1015
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:952
|
||||
#, python-format
|
||||
msgid "Exception writing account %s: %s - %s.\n"
|
||||
msgstr "Excepción escribiendo cuenta %s: %s - %s.\n"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1028
|
||||
#, python-format
|
||||
msgid "Account %s: The parent account %s can not be set.\n"
|
||||
msgstr "Cuenta %s: No se pudo establecer la cuenta padre %s.\n"
|
||||
#: view:wizard.update.charts.accounts:0
|
||||
msgid "Note: Not all the fields are tested for changes, just the main ones"
|
||||
msgstr "Nota: No se comprueban todos los campos, sólo los importantes"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: field:wizard.update.charts.accounts,update_fiscal_position:0
|
||||
@@ -366,14 +354,18 @@ msgid "Update fiscal positions"
|
||||
msgstr "Actualizar posiciones fiscales"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:239
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:705
|
||||
#, fuzzy, python-format
|
||||
#: view:wizard.update.charts.accounts:0
|
||||
msgid "or"
|
||||
msgstr "o"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:250
|
||||
#, python-format
|
||||
msgid "Update Chart of Accounts from a Chart Template "
|
||||
msgstr "Actualizar plan contable a partir de una plantilla de plan contable"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:534
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:531
|
||||
#, python-format
|
||||
msgid "The name is different.\n"
|
||||
msgstr "El nombre es diferente.\n"
|
||||
@@ -384,25 +376,25 @@ msgid "Log"
|
||||
msgstr "Registro"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:777
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:736
|
||||
#, python-format
|
||||
msgid "Tax code %s: The parent tax code %s can not be set.\n"
|
||||
msgstr "Código de impuesto %s: No se pudo establecer el código de impuesto padre %s.\n"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:435
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:438
|
||||
#, python-format
|
||||
msgid "The amount field is different.\n"
|
||||
msgstr "El campo importe es diferente.\n"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:447
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:450
|
||||
#, python-format
|
||||
msgid "The child depend field is different.\n"
|
||||
msgstr "El campo impuesto en hijos es diferente.\n"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1011
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:948
|
||||
#, python-format
|
||||
msgid "Updated account %s.\n"
|
||||
msgstr "Actualizada cuenta %s.\n"
|
||||
@@ -418,13 +410,24 @@ msgid "Messages and Errors"
|
||||
msgstr "Mensajes y errores"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:465
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:468
|
||||
#, python-format
|
||||
msgid "The type tax use field is different.\n"
|
||||
msgstr "El campo aplicación impuesto es diferente.\n"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:884
|
||||
#: selection:wizard.update.charts.accounts,state:0
|
||||
msgid "Wizard completed"
|
||||
msgstr "Asistente completado"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:963
|
||||
#, python-format
|
||||
msgid "Account %s: The parent account %s can not be set.\n"
|
||||
msgstr "Cuenta %s: No se pudo establecer la cuenta padre %s.\n"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:831
|
||||
#, python-format
|
||||
msgid "Tax %s: The parent tax %s can not be set.\n"
|
||||
msgstr "Impuesto %s: No se pudo establecer el impuesto padre %s.\n"
|
||||
@@ -451,27 +454,32 @@ msgid "Summary of updated objects"
|
||||
msgstr "Resumen de objetos actualizados"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:365
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:374
|
||||
#, python-format
|
||||
msgid "The sign field is different.\n"
|
||||
msgstr "El campo signo es diferente.\n"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:862
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:813
|
||||
#, python-format
|
||||
msgid "Updated tax %s.\n"
|
||||
msgstr "Actualizado impuesto %s.\n"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:927
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:874
|
||||
#, python-format
|
||||
msgid "Exception setting the parent of account %s children: %s - %s.\n"
|
||||
msgstr "Excepción estableciendo el padre de los hijos de la cuenta %s: %s - %s.\n"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: help:wizard.update.charts.accounts,code_digits:0
|
||||
msgid "No. of Digits to use for account code. Make sure it is the same number as existing accounts."
|
||||
msgstr "Número de dígitos para utilizar en el código de cuenta. Asegúrese que sea el mismo número de dígitos que el de las cuentas existentes."
|
||||
#: help:wizard.update.charts.accounts,update_account:0
|
||||
msgid "Existing accounts are updated. Accounts are searched by code."
|
||||
msgstr "Las cuentas contables existentes serán actualizadas. Las cuentas se buscarán por código."
|
||||
|
||||
#. module: account_chart_update
|
||||
#: field:wizard.update.charts.accounts,code_digits:0
|
||||
msgid "# of digits"
|
||||
msgstr "Nº de dígitos"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: field:wizard.update.charts.accounts,update_tax_code:0
|
||||
@@ -489,23 +497,18 @@ msgid "Account template"
|
||||
msgstr "Plantilla de cuenta"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1226
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1127
|
||||
#, python-format
|
||||
msgid "Error"
|
||||
msgstr "Error"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: view:wizard.update.charts.accounts:0
|
||||
msgid "Update Chart of Accounts from a Chart Template"
|
||||
msgstr "Actualizar plan contable a partir de una plantilla de plan contable"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: view:wizard.update.charts.accounts:0
|
||||
msgid "Summary of created objects"
|
||||
msgstr "Resumen de objetos creados"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:537
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:534
|
||||
#, python-format
|
||||
msgid "The type is different.\n"
|
||||
msgstr "El tipo es diferente.\n"
|
||||
@@ -531,19 +534,13 @@ msgstr "Cancelar"
|
||||
msgid "Existing taxes are updated. Taxes are searched by name."
|
||||
msgstr "Los impuestos existentes serán actualizados. Los impuestos se buscarán por nombre."
|
||||
|
||||
#. module: account_chart_update
|
||||
#: view:wizard.update.charts.accounts:0
|
||||
#, fuzzy
|
||||
msgid "Note:Not all the fields are tested for changes, just the main ones"
|
||||
msgstr "Nota: No se buscan cambios en todos los campos, sólo en los principales."
|
||||
|
||||
#. module: account_chart_update
|
||||
#: view:wizard.update.charts.accounts:0
|
||||
msgid "Create/Update"
|
||||
msgstr "Crear/Actualizar"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:890
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:837
|
||||
#, python-format
|
||||
msgid "Tax %s: The tax code for the base refund %s can not be set.\n"
|
||||
msgstr "Impuesto %s: No se pudo establecer el código de impuesto para la base de devolución %s.\n"
|
||||
@@ -559,13 +556,13 @@ msgid "Chart Template"
|
||||
msgstr "Plantilla plan contable"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:459
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:462
|
||||
#, python-format
|
||||
msgid "The tax sign field is different.\n"
|
||||
msgstr "El campo signo de impuesto es diferente.\n"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1226
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1127
|
||||
#, python-format
|
||||
msgid ""
|
||||
"One or more errors detected!\n"
|
||||
@@ -577,7 +574,7 @@ msgstr ""
|
||||
"%s"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1189
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1094
|
||||
#, python-format
|
||||
msgid "Fiscal position %s: The destination account %s can not be set.\n"
|
||||
msgstr "Posición fiscal %s: No se pudo establecer la cuenta de destino %s.\n"
|
||||
@@ -588,7 +585,7 @@ msgid "New fiscal positions"
|
||||
msgstr "Nuevas posiciones fiscales"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:441
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:444
|
||||
#, python-format
|
||||
msgid "The applicable type field is different.\n"
|
||||
msgstr "El campo tipo aplicable es diferente.\n"
|
||||
@@ -604,7 +601,7 @@ msgid "Tax template"
|
||||
msgstr "Plantilla de impuesto"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:627
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:614
|
||||
#, python-format
|
||||
msgid "Tax mapping not found on the fiscal position instance: %s -> None.\n"
|
||||
msgstr "Mapeo de cuentas no encontrado en la instancia de posición fiscal: %s -> Ninguno.\n"
|
||||
@@ -620,7 +617,7 @@ msgid "Existing fiscal positions are updated. Fiscal positions are searched by n
|
||||
msgstr "Las posiciones fiscales existentes serán actualizadas. Las posiciones fiscales se buscarán por nombre."
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:540
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:537
|
||||
#, python-format
|
||||
msgid "The user type is different.\n"
|
||||
msgstr "El tipo de usuario es diferente.\n"
|
||||
@@ -635,28 +632,21 @@ msgstr "Asistente para actualizar el plan contable"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: view:wizard.update.charts.accounts:0
|
||||
#, fuzzy
|
||||
msgid "This wizard will update your accounts, taxes and fiscal positions according to the selected chart template"
|
||||
msgstr "Este asistente actualizará sus cuentas, impuestos y posiciones fiscales de acuerdo a la plantilla de plan contable seleccionada."
|
||||
msgstr "Este asistente actualizará sus cuentas, impuestos y posiciones fiscales de acuerdo a la plantilla de plan contable seleccionada"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:543
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:540
|
||||
#, python-format
|
||||
msgid "The reconcile is different.\n"
|
||||
msgstr "El campo reconciliar es diferente.\n"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:444
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:447
|
||||
#, python-format
|
||||
msgid "The domain field is different.\n"
|
||||
msgstr "El campo dominio es diferente.\n"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1253
|
||||
#, fuzzy, python-format
|
||||
msgid "Update Accounts"
|
||||
msgstr "Actualizar cuentas"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: view:wizard.update.charts.accounts:0
|
||||
msgid "Other options"
|
||||
@@ -673,13 +663,13 @@ msgid "Records to create/update"
|
||||
msgstr "Registros a crear/actualizar"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1191
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1096
|
||||
#, python-format
|
||||
msgid "Created or updated fiscal position %s.\n"
|
||||
msgstr "Creada o actualizada posición fiscal %s.\n"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1159
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:1074
|
||||
#, python-format
|
||||
msgid "Fiscal position %s: The source tax %s can not be set.\n"
|
||||
msgstr "Posición fiscal %s: No se pudo establecer el impuesto origen %s.\n"
|
||||
@@ -692,10 +682,10 @@ msgstr "Posiciones fiscales actualizadas"
|
||||
#. module: account_chart_update
|
||||
#: help:wizard.update.charts.accounts,lang:0
|
||||
msgid "For records searched by name (taxes, tax codes, fiscal positions), the template name will be matched against the record name on this language."
|
||||
msgstr "Para los registros de (impuestos, códigos de impuestos y posiciones fiscales) se comparan con los de la plantilla seleccionada, basándose en sus nombres."
|
||||
msgstr "Para los registros de impuestos, códigos de impuestos y posiciones fiscales, sus nombres se comparan con los de la plantilla seleccionada."
|
||||
|
||||
#. module: account_chart_update
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:998
|
||||
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:937
|
||||
#, python-format
|
||||
msgid "Created account %s.\n"
|
||||
msgstr "Creada cuenta %s.\n"
|
||||
@@ -708,101 +698,10 @@ msgstr "Actualizar el padre de las cuentas que parecen (basándose en el código
|
||||
#. module: account_chart_update
|
||||
#: help:wizard.update.charts.accounts,continue_on_errors:0
|
||||
msgid "If set, the wizard will continue to the next step even if there are minor errors (for example the parent account of a new account couldn't be set)."
|
||||
msgstr "Si marcado, el asistente continuará al paso siguiente incluso si hay errores menores (por ejemplo no se pudo establecer la cuenta padre de una nueva cuenta)."
|
||||
msgstr "Si está marcado, el asistente continuará al paso siguiente incluso si hay errores menores (por ejemplo, no se pudo establecer la cuenta padre de una nueva cuenta)."
|
||||
|
||||
#. module: account_chart_update
|
||||
#: field:wizard.update.charts.accounts.tax.code,tax_code_id:0
|
||||
msgid "Tax code template"
|
||||
msgstr "Plantilla de código de impuesto"
|
||||
|
||||
#~ msgid "Invalid model name in the action definition."
|
||||
#~ msgstr "Nombre de modelo inválido en la definición de acción."
|
||||
|
||||
#~ msgid "Ok"
|
||||
#~ msgstr "Aceptar"
|
||||
|
||||
#~ msgid "The tax group field is different.\n"
|
||||
#~ msgstr "El campo grupo de impuestos es diferente.\n"
|
||||
|
||||
#~ msgid "Invalid XML for View Architecture!"
|
||||
#~ msgstr "¡XML inválido para la estructura de la vista!"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "\n"
|
||||
#~ "Adds a wizard to update a company account chart from a chart template.\n"
|
||||
#~ "\n"
|
||||
#~ "This is a pretty useful tool to update OpenERP instalations after tax "
|
||||
#~ "reforms\n"
|
||||
#~ "on the oficial charts of accounts, or to apply fixes performed on the "
|
||||
#~ "chart\n"
|
||||
#~ "template.\n"
|
||||
#~ "\n"
|
||||
#~ "The wizard:\n"
|
||||
#~ "\n"
|
||||
#~ "- Allows the user to compare a chart and a template showing differences\n"
|
||||
#~ " on accounts, taxes, tax codes and fiscal positions.\n"
|
||||
#~ "- It may create the new account, taxes, tax codes and fiscal positions "
|
||||
#~ "detected\n"
|
||||
#~ " on the template.\n"
|
||||
#~ "- It can also update (overwrite) the accounts, taxes, tax codes and "
|
||||
#~ "fiscal\n"
|
||||
#~ " positions that got modified on the template.\n"
|
||||
#~ "\n"
|
||||
#~ "The wizard lets the user select what kind of objects must be checked/"
|
||||
#~ "updated,\n"
|
||||
#~ "and whether old records must be checked for changes and updated.\n"
|
||||
#~ "It will display all the accounts to be created / updated with some "
|
||||
#~ "information\n"
|
||||
#~ "about the detected differences, and allow the user to exclude records\n"
|
||||
#~ "individually.\n"
|
||||
#~ "Any problem found while updating will be shown on the last step.\n"
|
||||
#~ "\n"
|
||||
#~ "Authors:\n"
|
||||
#~ " Jordi Esteve (Zikzakmedia) <jesteve@zikzakmedia.com>\n"
|
||||
#~ " Borja López Soilán (Pexego) <borjals@pexego.es>\n"
|
||||
#~ msgstr ""
|
||||
#~ "\n"
|
||||
#~ "Añade un asistente para actualizar el plan de cuentas de una compañía "
|
||||
#~ "desde una plantilla.\n"
|
||||
#~ "\n"
|
||||
#~ "Es una herramienta bastante útil para actualizar instalaciones de OpenERP "
|
||||
#~ "tras reformas de impuestos\n"
|
||||
#~ "en los planes contables oficiales, o para aplicar correcciones realizadas "
|
||||
#~ "en la plantilla del\n"
|
||||
#~ "plan contable.\n"
|
||||
#~ "\n"
|
||||
#~ "El asistente:\n"
|
||||
#~ "\n"
|
||||
#~ "- Permite al usuario comparar un plan y una plantilla mostrando las "
|
||||
#~ "diferencias\n"
|
||||
#~ " en cuentas, impuestos, códigos de impuestos y posiciones fiscales.\n"
|
||||
#~ "- Puede crear las nuevas cuentas, impuestos, códigos de impuestos y "
|
||||
#~ "posiciones fiscales\n"
|
||||
#~ " detectadas en la plantilla.\n"
|
||||
#~ "- También puede actualizar (sobreescribir) las cuentas, impuestos, "
|
||||
#~ "códigos de impuestos y posiciones\n"
|
||||
#~ " fiscales que se modificaron en la plantilla.\n"
|
||||
#~ "\n"
|
||||
#~ "El asistente permite al usuario seleccionar que clase de objetos deben "
|
||||
#~ "ser comprobados/actualizados,\n"
|
||||
#~ "y si se deben buscar cambios en los registros existentes y "
|
||||
#~ "actualizarlos.\n"
|
||||
#~ "Mostrará todas las cuentas a crear / actualizar con alguna información\n"
|
||||
#~ "sobre las diferencias detectadas, permitiendo al usuario excluir "
|
||||
#~ "registros\n"
|
||||
#~ "individualmente.\n"
|
||||
#~ "Cualquier problema encontrado al actualizar se mostrará en el último "
|
||||
#~ "paso.\n"
|
||||
#~ "\n"
|
||||
#~ "Autores:\n"
|
||||
#~ " Jordi Esteve (Zikzakmedia) <jesteve@zikzakmedia.com>\n"
|
||||
#~ " Borja López Soilán (Pexego) <borjals@pexego.es>\n"
|
||||
|
||||
#~ msgid "Detect changes and update the Account Chart from a template"
|
||||
#~ msgstr "Detectar cambios y actualizar el Plan Contable desde una plantilla"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "The Object name must start with x_ and not contain any special character !"
|
||||
#~ msgstr ""
|
||||
#~ "¡El objeto debe empezar con x_ y no puede contener ningún carácter "
|
||||
#~ "especial!"
|
||||
|
||||
@@ -138,7 +138,7 @@ msgstr "El campo info es diferente.\n"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: selection:wizard.update.charts.accounts,state:0
|
||||
msgid "Wizard Complete"
|
||||
msgid "Wizard completed"
|
||||
msgstr "Asistente completado"
|
||||
|
||||
#. module: account_chart_update
|
||||
|
||||
@@ -140,7 +140,7 @@ msgstr "Le champ info est différent.\n"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: selection:wizard.update.charts.accounts,state:0
|
||||
msgid "Wizard Complete"
|
||||
msgid "Wizard completed"
|
||||
msgstr "Assistant terminé"
|
||||
|
||||
#. module: account_chart_update
|
||||
|
||||
@@ -208,7 +208,7 @@ msgstr "Imposto %s: A conta paga não pode ser definida.\n"
|
||||
|
||||
#. module: account_chart_update
|
||||
#: selection:wizard.update.charts.accounts,state:0
|
||||
msgid "Wizard Complete"
|
||||
msgid "Wizard completed"
|
||||
msgstr "Assistente Completo"
|
||||
|
||||
#. module: account_chart_update
|
||||
|
||||
@@ -201,7 +201,7 @@ msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: selection:wizard.update.charts.accounts,state:0
|
||||
msgid "Wizard Complete"
|
||||
msgid "Wizard completed"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
|
||||
@@ -19,15 +19,10 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
"""
|
||||
Account Chart Update Wizard
|
||||
"""
|
||||
|
||||
from openerp.osv import fields, orm
|
||||
from openerp.tools.translate import _
|
||||
import logging
|
||||
|
||||
|
||||
def _reopen(self, res_id, model):
|
||||
return {
|
||||
'type': 'ir.actions.act_window',
|
||||
@@ -54,10 +49,10 @@ class WizardLog:
|
||||
self.messages = []
|
||||
self.errors = []
|
||||
|
||||
"""
|
||||
Adds a message to the log.
|
||||
"""
|
||||
def add(self, message, is_error=False):
|
||||
"""
|
||||
Adds a message to the log.
|
||||
"""
|
||||
logger = logging.getLogger("account_chart_update")
|
||||
if is_error:
|
||||
logger.warning(u"Log line: %s" % message)
|
||||
@@ -66,10 +61,10 @@ class WizardLog:
|
||||
logger.debug(u"Log line: %s" % message)
|
||||
self.messages.append(message)
|
||||
|
||||
"""
|
||||
Returns whether errors where logged.
|
||||
"""
|
||||
def has_errors(self):
|
||||
"""
|
||||
Returns whether errors where logged.
|
||||
"""
|
||||
return self.errors
|
||||
|
||||
def __call__(self):
|
||||
@@ -85,10 +80,10 @@ class WizardLog:
|
||||
class wizard_update_charts_accounts(orm.TransientModel):
|
||||
_name = 'wizard.update.charts.accounts'
|
||||
|
||||
"""
|
||||
Gets the available languages for the selection.
|
||||
"""
|
||||
def _get_lang_selection_options(self, cr, uid, context={}):
|
||||
"""
|
||||
Gets the available languages for the selection.
|
||||
"""
|
||||
obj = self.pool.get('res.lang')
|
||||
ids = obj.search(cr, uid, [], context=context)
|
||||
res = obj.read(cr, uid, ids, ['code', 'name'], context)
|
||||
@@ -98,11 +93,11 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
'state': fields.selection([
|
||||
('init', 'Step 1'),
|
||||
('ready', 'Step 2'),
|
||||
('done', 'Wizard Complete')
|
||||
('done', 'Wizard completed')
|
||||
], 'Status', readonly=True),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True, ondelete='set null'),
|
||||
'chart_template_id': fields.many2one('account.chart.template', 'Chart Template', required=True, ondelete='set null'),
|
||||
'code_digits': fields.integer('# of Digits', required=True, help="No. of Digits to use for account code. Make sure it is the same number as existing accounts."),
|
||||
'code_digits': fields.integer('# of digits', required=True, help="No. of digits to use for account code. Make sure it is the same number as existing accounts."),
|
||||
'lang': fields.selection(_get_lang_selection_options, 'Language', size=5, help="For records searched by name (taxes, tax codes, fiscal positions), the template name will be matched against the record name on this language."),
|
||||
'update_tax_code': fields.boolean('Update tax codes', help="Existing tax codes are updated. Tax codes are searched by name."),
|
||||
'update_tax': fields.boolean('Update taxes', help="Existing taxes are updated. Taxes are searched by name."),
|
||||
@@ -125,11 +120,11 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
'updated_fps': fields.integer('Updated fiscal positions', readonly=True),
|
||||
'log': fields.text('Messages and Errors', readonly=True)
|
||||
}
|
||||
"""
|
||||
Redefine the search to search by company name.
|
||||
"""
|
||||
def name_search(self, cr, user, name,
|
||||
args=None, operator='ilike', context=None, limit=80):
|
||||
"""
|
||||
Redefine the search to search by company name.
|
||||
"""
|
||||
if not name:
|
||||
name = '%'
|
||||
if not args:
|
||||
@@ -142,10 +137,10 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
cr, user, [('company_id', operator, name)] + args, limit=limit)
|
||||
return self.name_get(cr, user, ids, context=context)
|
||||
|
||||
"""
|
||||
Use the company name and template as name.
|
||||
"""
|
||||
def name_get(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
Use the company name and template as name.
|
||||
"""
|
||||
if context is None:
|
||||
context = {}
|
||||
if not len(ids):
|
||||
@@ -157,10 +152,10 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
' - ' + record.chart_template_id.name))
|
||||
return res
|
||||
|
||||
"""
|
||||
Returns the default chart template.
|
||||
"""
|
||||
def _get_chart(self, cr, uid, context=None):
|
||||
"""
|
||||
Returns the default chart template.
|
||||
"""
|
||||
if context is None:
|
||||
context = {}
|
||||
ids = self.pool.get(
|
||||
@@ -169,13 +164,13 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
return ids[0]
|
||||
return False
|
||||
|
||||
"""
|
||||
Returns the default code size for the accounts.
|
||||
To figure out the number of digits of the accounts it look at the
|
||||
code size of the default receivable account of the company
|
||||
(or user's company if any company is given).
|
||||
"""
|
||||
def _get_code_digits(self, cr, uid, context=None, company_id=None):
|
||||
"""
|
||||
Returns the default code size for the accounts.
|
||||
To figure out the number of digits of the accounts it look at the
|
||||
code size of the default receivable account of the company
|
||||
(or user's company if any company is given).
|
||||
"""
|
||||
if context is None:
|
||||
context = {}
|
||||
property_obj = self.pool.get('ir.property')
|
||||
@@ -225,10 +220,10 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
'lang': lambda self, cr, uid, context: context and context.get('lang') or None,
|
||||
}
|
||||
|
||||
"""
|
||||
Update the code size when the company changes
|
||||
"""
|
||||
def onchange_company_id(self, cr, uid, ids, company_id, context=None):
|
||||
"""
|
||||
Update the code size when the company changes
|
||||
"""
|
||||
res = {
|
||||
'value': {
|
||||
'code_digits': self._get_code_digits(
|
||||
@@ -240,10 +235,10 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
}
|
||||
return res
|
||||
|
||||
"""
|
||||
Initial action that sets the initial state.
|
||||
"""
|
||||
def action_init(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
Initial action that sets the initial state.
|
||||
"""
|
||||
if context is None:
|
||||
context = {}
|
||||
wizard = self.browse(cr, uid, ids[0], context=context)
|
||||
@@ -268,10 +263,11 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
##########################################################################
|
||||
# Helper methods
|
||||
##########################################################################
|
||||
"""
|
||||
Adds a tax template -> tax id to the mapping.
|
||||
"""
|
||||
|
||||
def _map_tax_template(self, cr, uid, wizard, tax_template_mapping, tax_template, context=None):
|
||||
"""
|
||||
Adds a tax template -> tax id to the mapping.
|
||||
"""
|
||||
if tax_template and not tax_template_mapping.get(tax_template.id):
|
||||
taxes = self.pool.get('account.tax')
|
||||
tax_ids = taxes.search(cr, uid, [
|
||||
@@ -281,10 +277,10 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
if tax_ids:
|
||||
tax_template_mapping[tax_template.id] = tax_ids[0]
|
||||
|
||||
"""
|
||||
Adds a tax code template -> tax code id to the mapping.
|
||||
"""
|
||||
def _map_tax_code_template(self, cr, uid, wizard, tax_code_template_mapping, tax_code_template, context=None):
|
||||
"""
|
||||
Adds a tax code template -> tax code id to the mapping.
|
||||
"""
|
||||
if tax_code_template and not tax_code_template_mapping.get(tax_code_template.id):
|
||||
tax_codes = self.pool.get('account.tax.code')
|
||||
root_tax_code_id = wizard.chart_template_id.tax_code_root_id.id
|
||||
@@ -297,10 +293,10 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
tax_code_template_mapping[
|
||||
tax_code_template.id] = tax_code_ids[0]
|
||||
|
||||
"""
|
||||
Adds an account template -> account id to the mapping
|
||||
"""
|
||||
def _map_account_template(self, cr, uid, wizard, account_template_mapping, account_template, context=None):
|
||||
"""
|
||||
Adds an account template -> account id to the mapping
|
||||
"""
|
||||
if account_template and not account_template_mapping.get(account_template.id):
|
||||
accounts = self.pool.get('account.account')
|
||||
code = account_template.code or ''
|
||||
@@ -314,10 +310,11 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
], context=context)
|
||||
if account_ids:
|
||||
account_template_mapping[account_template.id] = account_ids[0]
|
||||
"""
|
||||
Adds a fiscal position template -> fiscal position id to the mapping.
|
||||
"""
|
||||
|
||||
def _map_fp_template(self, cr, uid, wizard, fp_template_mapping, fp_template, context=None):
|
||||
"""
|
||||
Adds a fiscal position template -> fiscal position id to the mapping.
|
||||
"""
|
||||
if fp_template and not fp_template_mapping.get(fp_template.id):
|
||||
fiscalpositions = self.pool.get('account.fiscal.position')
|
||||
fp_ids = fiscalpositions.search(cr, uid, [
|
||||
@@ -327,10 +324,10 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
if fp_ids:
|
||||
fp_template_mapping[fp_template.id] = fp_ids[0]
|
||||
|
||||
"""
|
||||
Search for, and load, tax code templates to create/update.
|
||||
"""
|
||||
def _find_tax_codes(self, cr, uid, wizard, context=None):
|
||||
"""
|
||||
Search for, and load, tax code templates to create/update.
|
||||
"""
|
||||
new_tax_codes = 0
|
||||
updated_tax_codes = 0
|
||||
tax_code_template_mapping = {}
|
||||
@@ -343,9 +340,7 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
wiz_taxcodes.unlink(
|
||||
cr, uid, wiz_taxcodes.search(cr, uid, []))
|
||||
|
||||
#
|
||||
# Search for new / updated tax codes
|
||||
#
|
||||
root_tax_code_id = wizard.chart_template_id.tax_code_root_id.id
|
||||
children_tax_code_template = taxes_codes_templates.search(cr, uid, [(
|
||||
'parent_id', 'child_of', [root_tax_code_id])], order='id')
|
||||
@@ -363,9 +358,7 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
'type': 'new',
|
||||
}, context)
|
||||
elif wizard.update_tax_code:
|
||||
#
|
||||
# Check the tax code for changes.
|
||||
#
|
||||
modified = False
|
||||
notes = ""
|
||||
tax_code = taxcodes.browse(
|
||||
@@ -384,9 +377,7 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
# TODO: We could check other account fields for changes...
|
||||
|
||||
if modified:
|
||||
#
|
||||
# Tax code to update.
|
||||
#
|
||||
updated_tax_codes += 1
|
||||
wiz_taxcodes.create(cr, uid, {
|
||||
'tax_code_id': tax_code_template.id,
|
||||
@@ -401,10 +392,11 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
'updated': updated_tax_codes,
|
||||
'mapping': tax_code_template_mapping
|
||||
}
|
||||
"""
|
||||
Search for, and load, tax templates to create/update.
|
||||
"""
|
||||
|
||||
def _find_taxes(self, cr, uid, wizard, context=None):
|
||||
"""
|
||||
Search for, and load, tax templates to create/update.
|
||||
"""
|
||||
new_taxes = 0
|
||||
updated_taxes = 0
|
||||
tax_template_mapping = {}
|
||||
@@ -415,10 +407,7 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
delay_wiz_tax = []
|
||||
# Remove previous taxes
|
||||
wiz_taxes.unlink(cr, uid, wiz_taxes.search(cr, uid, []))
|
||||
|
||||
#
|
||||
# Search for new / updated taxes
|
||||
#
|
||||
for tax_template in wizard.chart_template_id.tax_template_ids:
|
||||
# Ensure the tax template is on the map (search for the mapped tax
|
||||
# id).
|
||||
@@ -438,9 +427,7 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
else:
|
||||
delay_wiz_tax.append(vals_wiz)
|
||||
elif wizard.update_tax:
|
||||
#
|
||||
# Check the tax for changes.
|
||||
#
|
||||
modified = False
|
||||
notes = ""
|
||||
tax = taxes.browse(cr, uid, tax_id, context=context)
|
||||
@@ -483,9 +470,7 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
# TODO: We could check other tax fields for changes...
|
||||
|
||||
if modified:
|
||||
#
|
||||
# Tax code to update.
|
||||
#
|
||||
updated_taxes += 1
|
||||
wiz_taxes.create(cr, uid, {
|
||||
'tax_id': tax_template.id,
|
||||
@@ -500,10 +485,10 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
|
||||
return {'new': new_taxes, 'updated': updated_taxes, 'mapping': tax_template_mapping}
|
||||
|
||||
"""
|
||||
Search for, and load, account templates to create/update.
|
||||
"""
|
||||
def _find_accounts(self, cr, uid, wizard, context=None):
|
||||
"""
|
||||
Search for, and load, account templates to create/update.
|
||||
"""
|
||||
new_accounts = 0
|
||||
updated_accounts = 0
|
||||
account_template_mapping = {}
|
||||
@@ -517,9 +502,7 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
wiz_accounts.unlink(
|
||||
cr, uid, wiz_accounts.search(cr, uid, []))
|
||||
|
||||
#
|
||||
# Search for new / updated accounts
|
||||
#
|
||||
root_account_id = wizard.chart_template_id.account_root_id.id
|
||||
children_acc_template = accounts_template.search(cr, uid, [(
|
||||
'parent_id', 'child_of', [root_account_id])], context=context)
|
||||
@@ -538,9 +521,7 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
'type': 'new',
|
||||
}, context)
|
||||
elif wizard.update_account:
|
||||
#
|
||||
# Check the account for changes.
|
||||
#
|
||||
modified = False
|
||||
notes = ""
|
||||
account = accounts.browse(
|
||||
@@ -562,9 +543,7 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
# TODO: We could check other account fields for changes...
|
||||
|
||||
if modified:
|
||||
#
|
||||
# Account to update.
|
||||
#
|
||||
updated_accounts += 1
|
||||
wiz_accounts.create(cr, uid, {
|
||||
'account_id': account_template.id,
|
||||
@@ -576,10 +555,10 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
|
||||
return {'new': new_accounts, 'updated': updated_accounts, 'mapping': account_template_mapping}
|
||||
|
||||
"""
|
||||
Search for, and load, fiscal position templates to create/update.
|
||||
"""
|
||||
def _find_fiscal_positions(self, cr, uid, wizard, context=None):
|
||||
"""
|
||||
Search for, and load, fiscal position templates to create/update.
|
||||
"""
|
||||
new_fps = 0
|
||||
updated_fps = 0
|
||||
fp_template_mapping = {}
|
||||
@@ -592,9 +571,7 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
# Remove previous fiscal positions
|
||||
wiz_fiscalpositions.unlink(cr, uid, wiz_fiscalpositions.search(cr, uid, []))
|
||||
|
||||
#
|
||||
# Search for new / updated fiscal positions
|
||||
#
|
||||
fp_template_ids = fiscalpostitions_template.search(cr, uid, [('chart_template_id', '=', wizard.chart_template_id.id)], context=context)
|
||||
for fp_template in fiscalpostitions_template.browse(cr, uid, fp_template_ids, context=context):
|
||||
# Ensure the fiscal position template is on the map (search for the
|
||||
@@ -604,9 +581,7 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
|
||||
fp_id = fp_template_mapping.get(fp_template.id)
|
||||
if not fp_id:
|
||||
#
|
||||
# New fiscal position template.
|
||||
#
|
||||
new_fps += 1
|
||||
wiz_fiscalpositions.create(cr, uid, {
|
||||
'fiscal_position_id': fp_template.id,
|
||||
@@ -614,16 +589,12 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
'type': 'new',
|
||||
}, context)
|
||||
elif wizard.update_fiscal_position:
|
||||
#
|
||||
# Check the fiscal position for changes.
|
||||
#
|
||||
modified = False
|
||||
notes = ""
|
||||
fp = fiscalpositions.browse(cr, uid, fp_id, context=context)
|
||||
|
||||
#
|
||||
# Check fiscal position taxes for changes.
|
||||
#
|
||||
if fp_template.tax_ids and fp.tax_ids:
|
||||
for fp_tax_template in fp_template.tax_ids:
|
||||
found = False
|
||||
@@ -646,9 +617,7 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
notes += _("The template has taxes the fiscal position instance does not.\n")
|
||||
modified = True
|
||||
|
||||
#
|
||||
# Check fiscal position accounts for changes.
|
||||
#
|
||||
if fp_template.account_ids and fp.account_ids:
|
||||
for fp_account_template in fp_template.account_ids:
|
||||
found = False
|
||||
@@ -665,9 +634,7 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
modified = True
|
||||
|
||||
if modified:
|
||||
#
|
||||
# Fiscal position template to update.
|
||||
#
|
||||
updated_fps += 1
|
||||
wiz_fiscalpositions.create(cr, uid, {
|
||||
'fiscal_position_id': fp_template.id,
|
||||
@@ -679,10 +646,10 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
|
||||
return {'new': new_fps, 'updated': updated_fps, 'mapping': fp_template_mapping}
|
||||
|
||||
"""
|
||||
Searchs for records to update/create and shows them
|
||||
"""
|
||||
def action_find_records(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
Searchs for records to update/create and shows them
|
||||
"""
|
||||
if context is None:
|
||||
context = {}
|
||||
wizard = self.browse(cr, uid, ids[0], context=context)
|
||||
@@ -692,17 +659,13 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
elif context.get('lang'):
|
||||
del context['lang']
|
||||
|
||||
#
|
||||
# Search for, and load, the records to create/update.
|
||||
#
|
||||
tax_codes_res = self._find_tax_codes(cr, uid, wizard, context=context)
|
||||
taxes_res = self._find_taxes(cr, uid, wizard, context=context)
|
||||
accounts_res = self._find_accounts(cr, uid, wizard, context=context)
|
||||
fps_res = self._find_fiscal_positions(cr, uid, wizard, context=context)
|
||||
|
||||
#
|
||||
# Write the results, and go to the next step.
|
||||
#
|
||||
self.write(cr, uid, [wizard.id], {
|
||||
'state': 'ready',
|
||||
'new_tax_codes': tax_codes_res.get('new', 0),
|
||||
@@ -716,10 +679,11 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
}, context)
|
||||
|
||||
return _reopen(self, wizard.id, 'wizard.update.chart.accounts')
|
||||
"""
|
||||
Search for, and load, tax code templates to create/update.
|
||||
"""
|
||||
|
||||
def _update_tax_codes(self, cr, uid, wizard, log, context=None):
|
||||
"""
|
||||
Search for, and load, tax code templates to create/update.
|
||||
"""
|
||||
taxcodes = self.pool.get('account.tax.code')
|
||||
root_tax_code_id = wizard.chart_template_id.tax_code_root_id.id
|
||||
new_tax_codes = 0
|
||||
@@ -733,9 +697,7 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
# Ensure the parent tax code template is on the map.
|
||||
self._map_tax_code_template(cr, uid, wizard, tax_code_template_mapping, tax_code_template.parent_id, context)
|
||||
|
||||
#
|
||||
# Values
|
||||
#
|
||||
vals = {
|
||||
'name': tax_code_name,
|
||||
'code': tax_code_template.code,
|
||||
@@ -749,17 +711,13 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
modified = False
|
||||
|
||||
if wiz_tax_code.type == 'new':
|
||||
#
|
||||
# Create the tax code
|
||||
#
|
||||
tax_code_id = taxcodes.create(cr, uid, vals)
|
||||
log.add(_("Created tax code %s.\n") % tax_code_name)
|
||||
new_tax_codes += 1
|
||||
modified = True
|
||||
elif wizard.update_tax_code and wiz_tax_code.update_tax_code_id:
|
||||
#
|
||||
# Update the tax code
|
||||
#
|
||||
tax_code_id = wiz_tax_code.update_tax_code_id.id
|
||||
taxcodes.write(cr, uid, [tax_code_id], vals)
|
||||
log.add(_("Updated tax code %s.\n") % tax_code_name)
|
||||
@@ -773,9 +731,7 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
tax_code_template_mapping[tax_code_template.id] = tax_code_id
|
||||
|
||||
if modified:
|
||||
#
|
||||
# Detect errors
|
||||
#
|
||||
if tax_code_template.parent_id and not tax_code_template_mapping.get(tax_code_template.parent_id.id):
|
||||
log.add(_("Tax code %s: The parent tax code %s can not be set.\n") % (tax_code_name, tax_code_template.parent_id.name), True)
|
||||
|
||||
@@ -785,10 +741,10 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
'mapping': tax_code_template_mapping
|
||||
}
|
||||
|
||||
"""
|
||||
Search for, and load, tax templates to create/update.
|
||||
"""
|
||||
def _update_taxes(self, cr, uid, wizard, log, tax_code_template_mapping, context=None):
|
||||
"""
|
||||
Search for, and load, tax templates to create/update.
|
||||
"""
|
||||
taxes = self.pool.get('account.tax')
|
||||
|
||||
new_taxes = 0
|
||||
@@ -803,9 +759,7 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
self._map_tax_template(cr, uid, wizard, tax_template_mapping,
|
||||
tax_template.parent_id, context)
|
||||
|
||||
#
|
||||
# Ensure the referenced tax codes are on the map.
|
||||
#
|
||||
tax_code_templates_to_find = [
|
||||
tax_template.base_code_id,
|
||||
tax_template.tax_code_id,
|
||||
@@ -815,9 +769,7 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
for tax_code_template in [tmpl for tmpl in tax_code_templates_to_find if tmpl]:
|
||||
self._map_tax_code_template(cr, uid, wizard, tax_code_template_mapping, tax_code_template)
|
||||
|
||||
#
|
||||
# Values
|
||||
#
|
||||
vals_tax = {
|
||||
'name': tax_template.name,
|
||||
'sequence': tax_template.sequence,
|
||||
@@ -849,17 +801,13 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
modified = False
|
||||
|
||||
if wiz_tax.type == 'new':
|
||||
#
|
||||
# Create a new tax.
|
||||
#
|
||||
tax_id = taxes.create(cr, uid, vals_tax)
|
||||
log.add(_("Created tax %s.\n") % tax_template.name)
|
||||
new_taxes += 1
|
||||
modified = True
|
||||
elif wizard.update_tax and wiz_tax.update_tax_id:
|
||||
#
|
||||
# Update a tax.
|
||||
#
|
||||
tax_id = wiz_tax.update_tax_id.id
|
||||
taxes.write(cr, uid, [tax_id], vals_tax)
|
||||
log.add(_("Updated tax %s.\n") % tax_template.name)
|
||||
@@ -872,17 +820,13 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
tax_template_mapping[tax_template.id] = tax_id
|
||||
|
||||
if modified:
|
||||
#
|
||||
# Add to the dict of taxes waiting for accounts.
|
||||
#
|
||||
taxes_pending_for_accounts[tax_id] = {
|
||||
'account_collected_id': tax_template.account_collected_id and tax_template.account_collected_id.id or False,
|
||||
'account_paid_id': tax_template.account_paid_id and tax_template.account_paid_id.id or False,
|
||||
}
|
||||
|
||||
#
|
||||
# Detect errors
|
||||
#
|
||||
if tax_template.parent_id and not tax_template_mapping.get(tax_template.parent_id.id):
|
||||
log.add(_("Tax %s: The parent tax %s can not be set.\n") % (tax_template.name, tax_template.parent_id.name), True)
|
||||
if tax_template.base_code_id and not tax_code_template_mapping.get(tax_template.base_code_id.id):
|
||||
@@ -901,12 +845,12 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
'pending': taxes_pending_for_accounts
|
||||
}
|
||||
|
||||
"""
|
||||
Updates the parent_id of accounts that seem to be children of the
|
||||
given account (accounts that start with the same code and are brothers
|
||||
of the first account).
|
||||
"""
|
||||
def _update_children_accounts_parent(self, cr, uid, wizard, log, parent_account_id, context=None):
|
||||
"""
|
||||
Updates the parent_id of accounts that seem to be children of the
|
||||
given account (accounts that start with the same code and are brothers
|
||||
of the first account).
|
||||
"""
|
||||
account_account = self.pool.get('account.account')
|
||||
parent_account = account_account.browse(
|
||||
cr, uid, parent_account_id, context=context)
|
||||
@@ -931,10 +875,10 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
|
||||
return True
|
||||
|
||||
"""
|
||||
Search for, and load, account templates to create/update.
|
||||
"""
|
||||
def _update_accounts(self, cr, uid, wizard, log, tax_template_mapping, context=None):
|
||||
"""
|
||||
Search for, and load, account templates to create/update.
|
||||
"""
|
||||
accounts = self.pool.get('account.account')
|
||||
root_account_id = wizard.chart_template_id.account_root_id.id
|
||||
|
||||
@@ -951,9 +895,7 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
# Ensure the parent account template is on the map.
|
||||
self._map_account_template(cr, uid, wizard, account_template_mapping, account_template.parent_id, context)
|
||||
|
||||
#
|
||||
# Ensure the related tax templates are on the map.
|
||||
#
|
||||
for tax_template in account_template.tax_ids:
|
||||
self._map_tax_template(cr, uid, wizard, tax_template_mapping,
|
||||
tax_template, context)
|
||||
@@ -961,19 +903,15 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
# Get the tax ids
|
||||
tax_ids = [tax_template_mapping[tax_template.id] for tax_template in account_template.tax_ids if tax_template_mapping[tax_template.id]]
|
||||
|
||||
#
|
||||
# Calculate the account code (we need to add zeros to non-view
|
||||
# account codes)
|
||||
#
|
||||
code = account_template.code or ''
|
||||
if account_template.type != 'view':
|
||||
if len(code) > 0 and len(code) <= wizard.code_digits:
|
||||
code = '%s%s' % (
|
||||
code, '0' * (wizard.code_digits - len(code)))
|
||||
|
||||
#
|
||||
# Values
|
||||
#
|
||||
vals = {
|
||||
'name': (root_account_id == account_template.id) and wizard.company_id.name or account_template.name,
|
||||
#'sign': account_template.sign,
|
||||
@@ -993,9 +931,7 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
modified = False
|
||||
|
||||
if wiz_account.type == 'new':
|
||||
#
|
||||
# Create the account
|
||||
#
|
||||
try:
|
||||
account_id = accounts.create(cr, uid, vals)
|
||||
log.add(_("Created account %s.\n") % code)
|
||||
@@ -1005,9 +941,7 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
log.add(_("Exception creating account %s: %s - %s.\n")
|
||||
% (code, ex.name, ex.value), True)
|
||||
elif wizard.update_account and wiz_account.update_account_id:
|
||||
#
|
||||
# Update the account
|
||||
#
|
||||
account_id = wiz_account.update_account_id.id
|
||||
try:
|
||||
accounts.write(cr, uid, [account_id], vals)
|
||||
@@ -1024,24 +958,18 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
account_template_mapping[account_template.id] = account_id
|
||||
|
||||
if modified:
|
||||
#
|
||||
# Detect errors
|
||||
#
|
||||
if account_template.parent_id and not account_template_mapping.get(account_template.parent_id.id):
|
||||
log.add(_("Account %s: The parent account %s can not be set.\n") % (code, account_template.parent_id.code), True)
|
||||
|
||||
#
|
||||
# Set this account as the parent of the accounts that seem to
|
||||
# be its children (brothers starting with the same code).
|
||||
#
|
||||
if wizard.update_children_accounts_parent:
|
||||
self._update_children_accounts_parent(
|
||||
cr, uid, wizard, log, account_id, context=context)
|
||||
|
||||
#
|
||||
# Reenable the parent_store computing on account_account
|
||||
# and force the recomputation.
|
||||
#
|
||||
self.pool._init = False
|
||||
self.pool.get('account.account')._parent_store_compute(cr)
|
||||
|
||||
@@ -1051,19 +979,17 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
'mapping': account_template_mapping
|
||||
}
|
||||
|
||||
"""
|
||||
Updates the taxes (created or updated on previous steps) to set
|
||||
the references to the accounts (the taxes where created/updated first,
|
||||
when the referenced accounts where still not available).
|
||||
"""
|
||||
def _update_taxes_pending_for_accounts(self, cr, uid, wizard, log, taxes_pending_for_accounts, account_template_mapping, context=None):
|
||||
"""
|
||||
Updates the taxes (created or updated on previous steps) to set
|
||||
the references to the accounts (the taxes where created/updated first,
|
||||
when the referenced accounts where still not available).
|
||||
"""
|
||||
taxes = self.pool.get('account.tax')
|
||||
accounts_template = self.pool.get('account.account.template')
|
||||
|
||||
for key, value in taxes_pending_for_accounts.items():
|
||||
#
|
||||
# Ensure the related account templates are on the map.
|
||||
#
|
||||
if value['account_collected_id']:
|
||||
account_template = accounts_template.browse(
|
||||
cr, uid, value['account_collected_id'], context=context)
|
||||
@@ -1088,10 +1014,10 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
log.add(_("Tax %s: The paid account can not be set.\n")
|
||||
% (tax.name), True)
|
||||
|
||||
"""
|
||||
Search for, and load, fiscal position templates to create/update.
|
||||
"""
|
||||
def _update_fiscal_positions(self, cr, uid, wizard, log, tax_template_mapping, account_template_mapping, context=None):
|
||||
"""
|
||||
Search for, and load, fiscal position templates to create/update.
|
||||
"""
|
||||
fiscalpositions = self.pool.get('account.fiscal.position')
|
||||
fiscalpositions_taxes = self.pool.get('account.fiscal.position.tax')
|
||||
fiscalpositions_account = self.pool.get('account.fiscal.position.account')
|
||||
@@ -1104,9 +1030,7 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
fp_id = None
|
||||
modified = False
|
||||
if wiz_fp.type == 'new':
|
||||
#
|
||||
# Create a new fiscal position
|
||||
#
|
||||
vals_fp = {
|
||||
'company_id': wizard.company_id.id,
|
||||
'name': fp_template.name,
|
||||
@@ -1115,10 +1039,8 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
new_fps += 1
|
||||
modified = True
|
||||
elif wizard.update_fiscal_position and wiz_fp.update_fiscal_position_id:
|
||||
#
|
||||
# Update the given fiscal position (remove the tax and account
|
||||
# mappings, that will be regenerated later)
|
||||
#
|
||||
fp_id = wiz_fp.update_fiscal_position_id.id
|
||||
updated_fps += 1
|
||||
modified = True
|
||||
@@ -1134,58 +1056,38 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
fp_id = wiz_fp.update_fiscal_position_id and wiz_fp.update_fiscal_position_id.id
|
||||
|
||||
if modified:
|
||||
#
|
||||
# (Re)create the tax mappings
|
||||
#
|
||||
for fp_tax in fp_template.tax_ids:
|
||||
#
|
||||
# Ensure the related tax templates are on the map.
|
||||
#
|
||||
self._map_tax_template(cr, uid, wizard, tax_template_mapping, fp_tax.tax_src_id, context)
|
||||
if fp_tax.tax_dest_id:
|
||||
self._map_tax_template(cr, uid, wizard, tax_template_mapping, fp_tax.tax_dest_id, context)
|
||||
|
||||
#
|
||||
# Create the fp tax mapping
|
||||
#
|
||||
vals_tax = {
|
||||
'tax_src_id': tax_template_mapping.get(fp_tax.tax_src_id.id),
|
||||
'tax_dest_id': fp_tax.tax_dest_id and tax_template_mapping.get(fp_tax.tax_dest_id.id),
|
||||
'position_id': fp_id,
|
||||
}
|
||||
fiscalpositions_taxes.create(cr, uid, vals_tax)
|
||||
|
||||
#
|
||||
# Check for errors
|
||||
#
|
||||
if not tax_template_mapping.get(fp_tax.tax_src_id.id):
|
||||
log.add(_("Fiscal position %s: The source tax %s can not be set.\n") % (fp_template.name, fp_tax.tax_src_id.code), True)
|
||||
if fp_tax.tax_dest_id and not tax_template_mapping.get(fp_tax.tax_dest_id.id):
|
||||
log.add(_("Fiscal position %s: The destination tax %s can not be set.\n") % (fp_template.name, fp_tax.tax_dest_id.name), True)
|
||||
#
|
||||
# (Re)create the account mappings
|
||||
#
|
||||
for fp_account in fp_template.account_ids:
|
||||
#
|
||||
# Ensure the related account templates are on the map.
|
||||
#
|
||||
self._map_account_template(cr, uid, wizard, account_template_mapping, fp_account.account_src_id, context)
|
||||
if fp_account.account_dest_id:
|
||||
self._map_account_template(cr, uid, wizard, account_template_mapping, fp_account.account_dest_id, context)
|
||||
|
||||
#
|
||||
# Create the fp account mapping
|
||||
#
|
||||
vals_account = {
|
||||
'account_src_id': account_template_mapping.get(fp_account.account_src_id.id),
|
||||
'account_dest_id': fp_account.account_dest_id and account_template_mapping.get(fp_account.account_dest_id.id),
|
||||
'position_id': fp_id,
|
||||
}
|
||||
fiscalpositions_account.create(cr, uid, vals_account)
|
||||
|
||||
#
|
||||
# Check for errors
|
||||
#
|
||||
if not account_template_mapping.get(fp_account.account_src_id.id):
|
||||
log.add(_("Fiscal position %s: The source account %s can not be set.\n") % (fp_template.name, fp_account.account_src_id.code), True)
|
||||
if fp_account.account_dest_id and not account_template_mapping.get(fp_account.account_dest_id.id):
|
||||
@@ -1195,10 +1097,10 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
% fp_template.name)
|
||||
return {'new': new_fps, 'updated': updated_fps}
|
||||
|
||||
"""
|
||||
Action that creates/updates the selected elements.
|
||||
"""
|
||||
def action_update_records(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
Action that creates/updates the selected elements.
|
||||
"""
|
||||
if context is None:
|
||||
context = {}
|
||||
wizard = self.browse(cr, uid, ids[0], context=context)
|
||||
@@ -1210,9 +1112,7 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
|
||||
log = WizardLog()
|
||||
|
||||
#
|
||||
# Create or update the records.
|
||||
#
|
||||
tax_codes_res = self._update_tax_codes(
|
||||
cr, uid, wizard, log, context=context)
|
||||
taxes_res = self._update_taxes(
|
||||
@@ -1222,16 +1122,12 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
self._update_taxes_pending_for_accounts(cr, uid, wizard, log, taxes_res['pending'], accounts_res['mapping'], context=context)
|
||||
fps_res = self._update_fiscal_positions(cr, uid, wizard, log, taxes_res['mapping'], accounts_res['mapping'], context=context)
|
||||
|
||||
#
|
||||
# Check if errors where detected and wether we should stop.
|
||||
#
|
||||
if log.has_errors() and not wizard.continue_on_errors:
|
||||
raise orm.except_orm(_('Error'), _(
|
||||
"One or more errors detected!\n\n%s") % log.get_errors_str())
|
||||
|
||||
#
|
||||
# Store the data and go to the next step.
|
||||
#
|
||||
self.write(cr, uid, [wizard.id], {
|
||||
'state': 'done',
|
||||
'new_tax_codes': tax_codes_res.get('new', 0),
|
||||
@@ -1247,8 +1143,6 @@ class wizard_update_charts_accounts(orm.TransientModel):
|
||||
|
||||
return _reopen(self, wizard.id, 'wizard.update.chart.accounts')
|
||||
|
||||
wizard_update_charts_accounts()
|
||||
|
||||
|
||||
class wizard_update_charts_accounts_tax_code(orm.TransientModel):
|
||||
"""
|
||||
@@ -1268,9 +1162,7 @@ class wizard_update_charts_accounts_tax_code(orm.TransientModel):
|
||||
'notes': fields.text('Notes'),
|
||||
}
|
||||
_defaults = {
|
||||
}
|
||||
|
||||
wizard_update_charts_accounts_tax_code()
|
||||
}
|
||||
|
||||
|
||||
class wizard_update_charts_accounts_tax(orm.TransientModel):
|
||||
@@ -1292,9 +1184,7 @@ class wizard_update_charts_accounts_tax(orm.TransientModel):
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
}
|
||||
|
||||
wizard_update_charts_accounts_tax()
|
||||
}
|
||||
|
||||
|
||||
class wizard_update_charts_accounts_account(orm.TransientModel):
|
||||
@@ -1307,7 +1197,6 @@ class wizard_update_charts_accounts_account(orm.TransientModel):
|
||||
# The chart of accounts can have a lot of accounts, so we need an higher
|
||||
# limit for the objects in memory to let the wizard create all the items
|
||||
# at once.
|
||||
_max_count = 4096
|
||||
_columns = {
|
||||
'account_id': fields.many2one('account.account.template', 'Account template', required=True, ondelete='set null'),
|
||||
'update_chart_wizard_id': fields.many2one('wizard.update.charts.accounts', 'Update chart wizard', required=True, ondelete='cascade'),
|
||||
@@ -1320,9 +1209,7 @@ class wizard_update_charts_accounts_account(orm.TransientModel):
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
}
|
||||
|
||||
wizard_update_charts_accounts_account()
|
||||
}
|
||||
|
||||
|
||||
class wizard_update_charts_accounts_fiscal_position(orm.TransientModel):
|
||||
@@ -1343,9 +1230,6 @@ class wizard_update_charts_accounts_fiscal_position(orm.TransientModel):
|
||||
'notes': fields.text('Notes'),
|
||||
}
|
||||
_defaults = {
|
||||
}
|
||||
|
||||
|
||||
wizard_update_charts_accounts_fiscal_position()
|
||||
}
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -1,176 +1,173 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<data>
|
||||
|
||||
<!-- Wizard for Multi Charts of Accounts -->
|
||||
<!-- Wizard for Multi Charts of Accounts -->
|
||||
|
||||
<record id="view_update_multi_chart" model="ir.ui.view">
|
||||
<field name="name">Update Chart of Accounts from a Chart Template
|
||||
</field>
|
||||
<field name="model">wizard.update.charts.accounts</field>
|
||||
<!-- <field name="type">form</field> -->
|
||||
<field name="arch" type="xml">
|
||||
<form string="Update Chart of Accounts from a Chart Template" version="7.0">
|
||||
<header>
|
||||
<field name="state" select="2" widget="statusbar"
|
||||
statusbar_visible="init,ready,done" statusbar_colors='{"ready":"blue","done":"blue"}' />
|
||||
</header>
|
||||
<group attrs="{'invisible':[('state','!=','init')]}">
|
||||
<h3>
|
||||
<p><center>This wizard will update your accounts, taxes and fiscal positions according to the selected chart template</center></p>
|
||||
|
||||
</h3>
|
||||
</group>
|
||||
<group string="Chart of Accounts" attrs="{'invisible':[('state','!=','init')]}">
|
||||
<field name="company_id" on_change="onchange_company_id(company_id)"
|
||||
attrs="{'invisible':[('state','!=','init')]}" />
|
||||
<field name="code_digits" attrs="{'invisible':[('state','!=','init')]}" />
|
||||
<field name="chart_template_id" attrs="{'invisible':[('state','!=','init')]}" />
|
||||
<field name="lang" attrs="{'invisible':[('state','!=','init')]}" />
|
||||
</group>
|
||||
<group attrs="{'invisible':[('state','!=','init')]}">
|
||||
<group string="Update records?">
|
||||
<field name="update_tax_code" />
|
||||
<field name="update_tax" />
|
||||
<field name="update_account" />
|
||||
<field name="update_fiscal_position" />
|
||||
</group>
|
||||
<group string="Other options" attrs="{'invisible':[('state','!=','init')]}">
|
||||
<field name="update_children_accounts_parent" />
|
||||
<field name="continue_on_errors" />
|
||||
</group>
|
||||
</group>
|
||||
<record id="view_update_multi_chart" model="ir.ui.view">
|
||||
<field name="name">Update Chart of Accounts from a Chart Template
|
||||
</field>
|
||||
<field name="model">wizard.update.charts.accounts</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Update chart of accounts from a template" version="7.0">
|
||||
<header>
|
||||
<field name="state" select="2" widget="statusbar"
|
||||
statusbar_visible="init,ready,done" statusbar_colors='{"ready":"blue","done":"blue"}' />
|
||||
</header>
|
||||
<group attrs="{'invisible':[('state','!=','init')]}">
|
||||
<h3>
|
||||
<p><center>This wizard will update your accounts, taxes and fiscal positions according to the selected chart template</center></p>
|
||||
</h3>
|
||||
</group>
|
||||
<group string="Chart of Accounts" attrs="{'invisible':[('state','!=','init')]}">
|
||||
<field name="company_id" on_change="onchange_company_id(company_id)"
|
||||
attrs="{'invisible':[('state','!=','init')]}" />
|
||||
<field name="code_digits" attrs="{'invisible':[('state','!=','init')]}" />
|
||||
<field name="chart_template_id" attrs="{'invisible':[('state','!=','init')]}" />
|
||||
<field name="lang" attrs="{'invisible':[('state','!=','init')]}" />
|
||||
</group>
|
||||
<group attrs="{'invisible':[('state','!=','init')]}">
|
||||
<group string="Update records?">
|
||||
<field name="update_tax_code" />
|
||||
<field name="update_tax" />
|
||||
<field name="update_account" />
|
||||
<field name="update_fiscal_position" />
|
||||
</group>
|
||||
<group string="Other options" attrs="{'invisible':[('state','!=','init')]}">
|
||||
<field name="update_children_accounts_parent" />
|
||||
<field name="continue_on_errors" />
|
||||
</group>
|
||||
</group>
|
||||
|
||||
<group attrs="{'invisible':[('state','!=','init')]}">
|
||||
<h5>
|
||||
<p>If you leave these options set, the wizard will not just create new records, but also update records with changes (i.e. different tax amount)</p>
|
||||
<p>Note:Not all the fields are tested for changes, just the main ones</p>
|
||||
</h5>
|
||||
</group>
|
||||
<group attrs="{'invisible':[('state','!=','ready'),]}"
|
||||
string="Records to create/update">
|
||||
<notebook colspan="4">
|
||||
<page string="Tax codes">
|
||||
<field name="tax_code_ids">
|
||||
<tree string="Tax codes" colors="red:type=='updated'">
|
||||
<field name="tax_code_id" />
|
||||
<field name="update_tax_code_id" />
|
||||
<field name="type" invisible="1" />
|
||||
</tree>
|
||||
<form string="Tax code" version="7.0">
|
||||
<group>
|
||||
<field name="tax_code_id" />
|
||||
<field name="type" />
|
||||
<field name="update_tax_code_id" />
|
||||
<field name="notes" readonly="1" class="oe_inline" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<group attrs="{'invisible':[('state','!=','init')]}">
|
||||
<h5>
|
||||
<p>If you leave these options set, the wizard will not just create new records, but also update records with changes (i.e. different tax amount)</p>
|
||||
<p>Note: Not all the fields are tested for changes, just the main ones</p>
|
||||
</h5>
|
||||
</group>
|
||||
<group attrs="{'invisible':[('state','!=','ready'),]}"
|
||||
string="Records to create/update">
|
||||
<notebook colspan="4">
|
||||
<page string="Tax codes">
|
||||
<field name="tax_code_ids">
|
||||
<tree string="Tax codes" colors="red:type=='updated'">
|
||||
<field name="tax_code_id" />
|
||||
<field name="update_tax_code_id" />
|
||||
<field name="type" invisible="1" />
|
||||
</tree>
|
||||
<form string="Tax code" version="7.0">
|
||||
<group>
|
||||
<field name="tax_code_id" />
|
||||
<field name="type" />
|
||||
<field name="update_tax_code_id" />
|
||||
<field name="notes" readonly="1" class="oe_inline" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
|
||||
<page string="Taxes">
|
||||
<field name="tax_ids" nolabel="1">
|
||||
<tree string="Taxes" colors="red:type=='updated'">
|
||||
<field name="tax_id" />
|
||||
<field name="update_tax_id" />
|
||||
<field name="type" invisible="1" />
|
||||
</tree>
|
||||
<form string="Tax" version="7.0">
|
||||
<group>
|
||||
<field name="tax_id" />
|
||||
<field name="type" />
|
||||
<field name="update_tax_id" />
|
||||
<field name="notes" readonly="1" class="oe_inline" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Accounts">
|
||||
<field name="account_ids" nolabel="1">
|
||||
<tree string="Accounts" colors="red:type=='updated'">
|
||||
<field name="account_id" />
|
||||
<field name="update_account_id" />
|
||||
<field name="type" invisible="1" />
|
||||
</tree>
|
||||
<form string="Account" version="7.0">
|
||||
<group>
|
||||
<field name="account_id" />
|
||||
<field name="type" />
|
||||
<field name="update_account_id" />
|
||||
<field name="notes" readonly="1" class="oe_inline" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Fiscal positions">
|
||||
<field name="fiscal_position_ids" nolabel="1">
|
||||
<tree string="Fiscal positions" colors="red:type=='updated'">
|
||||
<field name="fiscal_position_id" />
|
||||
<field name="update_fiscal_position_id" />
|
||||
<field name="type" invisible="1" />
|
||||
</tree>
|
||||
<form string="Fiscal position" version="7.0">
|
||||
<group>
|
||||
<field name="fiscal_position_id" />
|
||||
<field name="type" />
|
||||
<field name="update_fiscal_position_id" />
|
||||
<field name="notes" readonly="1" class="oe_inline" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Taxes">
|
||||
<field name="tax_ids" nolabel="1">
|
||||
<tree string="Taxes" colors="red:type=='updated'">
|
||||
<field name="tax_id" />
|
||||
<field name="update_tax_id" />
|
||||
<field name="type" invisible="1" />
|
||||
</tree>
|
||||
<form string="Tax" version="7.0">
|
||||
<group>
|
||||
<field name="tax_id" />
|
||||
<field name="type" />
|
||||
<field name="update_tax_id" />
|
||||
<field name="notes" readonly="1" class="oe_inline" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Accounts">
|
||||
<field name="account_ids" nolabel="1">
|
||||
<tree string="Accounts" colors="red:type=='updated'">
|
||||
<field name="account_id" />
|
||||
<field name="update_account_id" />
|
||||
<field name="type" invisible="1" />
|
||||
</tree>
|
||||
<form string="Account" version="7.0">
|
||||
<group>
|
||||
<field name="account_id" />
|
||||
<field name="type" />
|
||||
<field name="update_account_id" />
|
||||
<field name="notes" readonly="1" class="oe_inline" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Fiscal positions">
|
||||
<field name="fiscal_position_ids" nolabel="1">
|
||||
<tree string="Fiscal positions" colors="red:type=='updated'">
|
||||
<field name="fiscal_position_id" />
|
||||
<field name="update_fiscal_position_id" />
|
||||
<field name="type" invisible="1" />
|
||||
</tree>
|
||||
<form string="Fiscal position" version="7.0">
|
||||
<group>
|
||||
<field name="fiscal_position_id" />
|
||||
<field name="type" />
|
||||
<field name="update_fiscal_position_id" />
|
||||
<field name="notes" readonly="1" class="oe_inline" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
|
||||
</notebook>
|
||||
</group>
|
||||
</notebook>
|
||||
</group>
|
||||
|
||||
<group col="4" colspan="4"
|
||||
attrs="{'invisible':[('state','!=','done'),]}">
|
||||
<separator colspan="4" string="Log" />
|
||||
<field name="log" colspan="4" nolabel="1" />
|
||||
<group colspan="4">
|
||||
<separator colspan="4" string="Summary of created objects" />
|
||||
<field name="new_tax_codes" />
|
||||
<field name="new_taxes" />
|
||||
<field name="new_accounts" />
|
||||
<field name="new_fps" />
|
||||
</group>
|
||||
<group colspan="4">
|
||||
<separator colspan="4" string="Summary of updated objects" />
|
||||
<field name="updated_tax_codes" />
|
||||
<field name="updated_taxes" />
|
||||
<field name="updated_accounts" />
|
||||
<field name="updated_fps" />
|
||||
</group>
|
||||
</group>
|
||||
<group col="4" colspan="4"
|
||||
attrs="{'invisible':[('state','!=','done'),]}">
|
||||
<separator colspan="4" string="Log" />
|
||||
<field name="log" colspan="4" nolabel="1" />
|
||||
<group colspan="4">
|
||||
<separator colspan="4" string="Summary of created objects" />
|
||||
<field name="new_tax_codes" />
|
||||
<field name="new_taxes" />
|
||||
<field name="new_accounts" />
|
||||
<field name="new_fps" />
|
||||
</group>
|
||||
<group colspan="4">
|
||||
<separator colspan="4" string="Summary of updated objects" />
|
||||
<field name="updated_tax_codes" />
|
||||
<field name="updated_taxes" />
|
||||
<field name="updated_accounts" />
|
||||
<field name="updated_fps" />
|
||||
</group>
|
||||
</group>
|
||||
|
||||
<footer>
|
||||
<div states="init">
|
||||
<button name="action_find_records" string="Next" class="oe_highlight" type="object" />
|
||||
o
|
||||
<button special="cancel" string="Cancel" class="oe_link" />
|
||||
</div>
|
||||
<div states="ready">
|
||||
<button name="action_init" string="Previous" type="object" />
|
||||
<button name="action_update_records" string="Create/Update" type="object" class="oe_highlight" />
|
||||
o
|
||||
<button special="cancel" string="Cancel" class="oe_link" />
|
||||
</div>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<footer>
|
||||
<div states="init">
|
||||
<button name="action_find_records" string="Next" class="oe_highlight" type="object" />
|
||||
or
|
||||
<button special="cancel" string="Cancel" class="oe_link" />
|
||||
</div>
|
||||
<div states="ready">
|
||||
<button name="action_init" string="Previous" type="object" />
|
||||
<button name="action_update_records" string="Create/Update" type="object" class="oe_highlight" />
|
||||
or
|
||||
<button special="cancel" string="Cancel" class="oe_link" />
|
||||
</div>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_wizard_update_chart" model="ir.actions.act_window">
|
||||
<field name="name">Update Chart of Accounts from a Chart Template
|
||||
</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">wizard.update.charts.accounts</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
<record id="action_wizard_update_chart" model="ir.actions.act_window">
|
||||
<field name="name">Update chart of accounts</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">wizard.update.charts.accounts</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem parent="account.account_template_folder" action="action_wizard_update_chart" id="menu_wizard" />
|
||||
<menuitem sequence="0" parent="account.account_account_menu" action="action_wizard_update_chart" id="menu_wizard" />
|
||||
|
||||
</data>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
25
currency_rate_date_check/__init__.py
Normal file
25
currency_rate_date_check/__init__.py
Normal file
@@ -0,0 +1,25 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Currency rate date check module for OpenERP
|
||||
# Copyright (C) 2012-2013 Akretion (http://www.akretion.com).
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from . import company
|
||||
from . import currency_rate_date_check
|
||||
|
||||
48
currency_rate_date_check/__openerp__.py
Normal file
48
currency_rate_date_check/__openerp__.py
Normal file
@@ -0,0 +1,48 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Currency rate date check module for OpenERP
|
||||
# Copyright (C) 2012-2013 Akretion (http://www.akretion.com).
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
{
|
||||
'name': 'Currency Rate Date Check',
|
||||
'version': '1.0',
|
||||
'category': 'Financial Management/Configuration',
|
||||
'license': 'AGPL-3',
|
||||
'summary': "Make sure currency rates used are always up-to-update",
|
||||
'description': """
|
||||
Currency Rate Date Check
|
||||
========================
|
||||
|
||||
This module adds a check on dates when doing currency conversion in OpenERP. It checks that the currency rate used to make the conversion is not more than N days away from the date of the amount to convert. The maximum number of days of the interval can be configured on the company form.
|
||||
|
||||
Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for any help or question about this module.
|
||||
""",
|
||||
'author': 'Akretion',
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': ['base'],
|
||||
'data': ['company_view.xml'],
|
||||
'images': [
|
||||
'images/date_check_error_popup.jpg',
|
||||
'images/date_check_company_config.jpg',
|
||||
],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
}
|
||||
42
currency_rate_date_check/company.py
Normal file
42
currency_rate_date_check/company.py
Normal file
@@ -0,0 +1,42 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Currency rate date check module for OpenERP
|
||||
# Copyright (C) 2012-2013 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp.osv import orm, fields
|
||||
|
||||
class res_company(orm.Model):
|
||||
_inherit = 'res.company'
|
||||
|
||||
_columns = {
|
||||
'currency_rate_max_delta': fields.integer(
|
||||
'Max Time Delta in Days for Currency Rates',
|
||||
help="This is the maximum interval in days between the date associated with the amount to convert and the date of the nearest currency rate available in OpenERP."),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'currency_rate_max_delta': 7,
|
||||
}
|
||||
|
||||
_sql_constraints = [
|
||||
('currency_rate_max_delta_positive',
|
||||
'CHECK (currency_rate_max_delta >= 0)',
|
||||
"The value of the field 'Max Time Delta in Days for Currency Rates' must be positive or 0."),
|
||||
]
|
||||
25
currency_rate_date_check/company_view.xml
Normal file
25
currency_rate_date_check/company_view.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
Copyright (C) 2012 Akretion (http://www.akretion.com/)
|
||||
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
The licence is in the file __openerp__.py
|
||||
-->
|
||||
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="currency_rate_date_check_form" model="ir.ui.view">
|
||||
<field name="name">currency.rate.date.check.form</field>
|
||||
<field name="model">res.company</field>
|
||||
<field name="inherit_id" ref="base.view_company_form" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="currency_id" position="after">
|
||||
<field name="currency_rate_max_delta" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
82
currency_rate_date_check/currency_rate_date_check.py
Normal file
82
currency_rate_date_check/currency_rate_date_check.py
Normal file
@@ -0,0 +1,82 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Currency rate date check module for OpenERP
|
||||
# Copyright (C) 2012-2013 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp.osv import fields, orm
|
||||
from datetime import datetime, timedelta
|
||||
from openerp.tools.translate import _
|
||||
|
||||
# Here are some explainations about the design of this module.
|
||||
# In server/openerp/addons/base/res/res_currency.py :
|
||||
# compute() -> _get_conversion_rate() -> _current_rate() -> _current_rate_computation()
|
||||
# The date used for the rate is the one in the context
|
||||
# compute() adds currency_rate_type_from and currency_rate_type_to to the context
|
||||
# _get_conversion_rate() adds currency_rate_type_id to context ; its value is currency_rate_type_to ; if it doesn't exist it's currency_rate_type_from ; if it doesn't exist either it's False
|
||||
# It already contains raise "No rate found for currency ... at the date ..."
|
||||
# _current_rate() reads currency_rate_type_id from context and uses it in the SQL request
|
||||
# This is the function used for the definition of the field.function 'rate' on res_currency
|
||||
|
||||
# Which one of the 3 functions should we inherit ? Good question...
|
||||
# It's probably better to inherit the lowest level function, i.e. _current_rate_computation()
|
||||
# Advantage : by inheriting the lowest level function, we can be sure that the check
|
||||
# always apply, even for scenarios where we read the field "rate" of the obj currency
|
||||
# => that's the solution I implement in the code below
|
||||
|
||||
|
||||
class res_currency(orm.Model):
|
||||
_inherit = 'res.currency'
|
||||
|
||||
def _current_rate_computation(self, cr, uid, ids, name, arg, raise_on_no_rate, context=None):
|
||||
if context is None: context = {}
|
||||
# We only do the check if there is an explicit date in the context and
|
||||
# there is no specific currency_rate_type_id
|
||||
if context.get('date') and not context.get('currency_rate_type_id') and not context.get('disable_rate_date_check'):
|
||||
for currency_id in ids:
|
||||
# We could get the company from the currency, but it's not a
|
||||
# 'required' field, so we should probably continue to get it from
|
||||
# the user, shouldn't we ?
|
||||
user = self.pool['res.users'].browse(cr, uid, uid, context=context)
|
||||
# if it's the company currency, don't do anything
|
||||
# (there is just one old rate at 1.0)
|
||||
if user.company_id.currency_id.id == currency_id:
|
||||
continue
|
||||
else:
|
||||
# now we do the real work !
|
||||
date = context.get('date', datetime.today().strftime('%Y-%m-%d'))
|
||||
date_datetime = datetime.strptime(date, '%Y-%m-%d')
|
||||
rate_obj = self.pool['res.currency.rate']
|
||||
selected_rate = rate_obj.search(cr, uid, [
|
||||
('currency_id', '=', currency_id),
|
||||
('name', '<=', date),
|
||||
('currency_rate_type_id', '=', None)
|
||||
], order='name desc', limit=1, context=context)
|
||||
if not selected_rate:
|
||||
continue
|
||||
|
||||
rate_date = rate_obj.read(cr, uid, selected_rate[0], ['name'], context=context)['name']
|
||||
rate_date_datetime = datetime.strptime(rate_date, '%Y-%m-%d')
|
||||
max_delta = user.company_id.currency_rate_max_delta
|
||||
if (date_datetime - rate_date_datetime).days > max_delta:
|
||||
currency_name = self.read(cr, uid, currency_id, ['name'], context=context)['name']
|
||||
raise orm.except_orm(_('Error'), _('You are requesting a rate conversion on %s for currency %s but the nearest rate before that date is dated %s and the maximum currency rate time delta for your company is %s days') % (date, currency_name, rate_date, max_delta))
|
||||
# Now we call the regular function from the "base" module
|
||||
return super(res_currency, self)._current_rate_computation(cr, uid, ids, name, arg, raise_on_no_rate, context=context)
|
||||
|
||||
54
currency_rate_date_check/i18n/currency_rate_date_check.pot
Normal file
54
currency_rate_date_check/i18n/currency_rate_date_check.pot
Normal file
@@ -0,0 +1,54 @@
|
||||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * currency_rate_date_check
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 7.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-09-23 10:05+0000\n"
|
||||
"PO-Revision-Date: 2013-09-23 10:05+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: currency_rate_date_check
|
||||
#: model:ir.model,name:currency_rate_date_check.model_res_currency
|
||||
msgid "Currency"
|
||||
msgstr ""
|
||||
|
||||
#. module: currency_rate_date_check
|
||||
#: code:addons/currency_rate_date_check/currency_rate_date_check.py:84
|
||||
#, python-format
|
||||
msgid "You are requesting a rate conversion on %s for currency %s but the nearest rate before that date is dated %s and the maximum currency rate time delta for your company is %s days"
|
||||
msgstr ""
|
||||
|
||||
#. module: currency_rate_date_check
|
||||
#: model:ir.model,name:currency_rate_date_check.model_res_company
|
||||
msgid "Companies"
|
||||
msgstr ""
|
||||
|
||||
#. module: currency_rate_date_check
|
||||
#: field:res.company,currency_rate_max_delta:0
|
||||
msgid "Max Time Delta in Days for Currency Rates"
|
||||
msgstr ""
|
||||
|
||||
#. module: currency_rate_date_check
|
||||
#: help:res.company,currency_rate_max_delta:0
|
||||
msgid "This is the maximum interval in days between the date associated with the amount to convert and the date of the nearest currency rate available in OpenERP."
|
||||
msgstr ""
|
||||
|
||||
#. module: currency_rate_date_check
|
||||
#: code:addons/currency_rate_date_check/currency_rate_date_check.py:84
|
||||
#, python-format
|
||||
msgid "Error"
|
||||
msgstr ""
|
||||
|
||||
#. module: currency_rate_date_check
|
||||
#: constraint:res.company:0
|
||||
msgid "The value must be positive or 0"
|
||||
msgstr ""
|
||||
|
||||
54
currency_rate_date_check/i18n/fr.po
Normal file
54
currency_rate_date_check/i18n/fr.po
Normal file
@@ -0,0 +1,54 @@
|
||||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * currency_rate_date_check
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 7.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-09-23 10:06+0000\n"
|
||||
"PO-Revision-Date: 2013-09-23 10:06+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: currency_rate_date_check
|
||||
#: model:ir.model,name:currency_rate_date_check.model_res_currency
|
||||
msgid "Currency"
|
||||
msgstr "Devise"
|
||||
|
||||
#. module: currency_rate_date_check
|
||||
#: code:addons/currency_rate_date_check/currency_rate_date_check.py:84
|
||||
#, python-format
|
||||
msgid "You are requesting a rate conversion on %s for currency %s but the nearest rate before that date is dated %s and the maximum currency rate time delta for your company is %s days"
|
||||
msgstr "Vous demandez une conversion de devise à la date du %s pour la devise %s mais le taux de change le plus proche qui précède cette date est daté du %s et l'écart temporel maximum pour les taux de change pour votre société est de %s jours"
|
||||
|
||||
#. module: currency_rate_date_check
|
||||
#: model:ir.model,name:currency_rate_date_check.model_res_company
|
||||
msgid "Companies"
|
||||
msgstr "Sociétés"
|
||||
|
||||
#. module: currency_rate_date_check
|
||||
#: field:res.company,currency_rate_max_delta:0
|
||||
msgid "Max Time Delta in Days for Currency Rates"
|
||||
msgstr "Ecart temporel maximum pour les taux de change (en jours)"
|
||||
|
||||
#. module: currency_rate_date_check
|
||||
#: help:res.company,currency_rate_max_delta:0
|
||||
msgid "This is the maximum interval in days between the date associated with the amount to convert and the date of the nearest currency rate available in OpenERP."
|
||||
msgstr "Intervalle de temps maximum en jours entre la date associée au montant à convertir et la date du taux de change le plus rapproché disponible dans OpenERP."
|
||||
|
||||
#. module: currency_rate_date_check
|
||||
#: code:addons/currency_rate_date_check/currency_rate_date_check.py:84
|
||||
#, python-format
|
||||
msgid "Error"
|
||||
msgstr "Erreur"
|
||||
|
||||
#. module: currency_rate_date_check
|
||||
#: constraint:res.company:0
|
||||
msgid "The value must be positive or 0"
|
||||
msgstr "La valeur doit être positive ou nulle"
|
||||
|
||||
BIN
currency_rate_date_check/images/date_check_company_config.jpg
Normal file
BIN
currency_rate_date_check/images/date_check_company_config.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
BIN
currency_rate_date_check/images/date_check_error_popup.jpg
Normal file
BIN
currency_rate_date_check/images/date_check_error_popup.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 71 KiB |
BIN
currency_rate_date_check/static/src/img/icon.png
Normal file
BIN
currency_rate_date_check/static/src/img/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
Reference in New Issue
Block a user