Rohan Nayani(Open ERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-l10n-control-dev-account-templates-to-realobjects-conversion-yml-ron
into lp:~openerp-dev/openobject-addons/trunk-l10n-control-dev.
Requested reviews:
Rucha (Open ERP) (rpa-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-l10n-control-dev-account-templates-to-realobjects-conversion-yml-ron/+merge/74409
Hello,
Created yml for generate real objects of accounts, fiscal position, taxes
from templates.
Thanks
RON
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-l10n-control-dev-account-templates-to-realobjects-conversion-yml-ron/+merge/74409
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-l10n-control-dev.
=== modified file 'account/__openerp__.py'
--- account/__openerp__.py 2011-08-17 20:46:53 +0000
+++ account/__openerp__.py 2011-09-07 12:22:24 +0000
@@ -147,6 +147,7 @@
'test/account_bank_statement.yml',
'test/account_cash_statement.yml',
'test/account_report.yml',
+ 'test/account_templates_to_realobjects.yml'
],
=== added file 'account/test/account_templates_to_realobjects.yml'
--- account/test/account_templates_to_realobjects.yml 1970-01-01 00:00:00 +0000
+++ account/test/account_templates_to_realobjects.yml 2011-09-07 12:22:24 +0000
@@ -0,0 +1,153 @@
+-
+ In order to test the traslation flow,I start by creating a account account type.
+-
+ !record {model: account.account.type, id: account_account_type_view_acc}:
+ name: 'View'
+ code: 'view-A001'
+ close_method: none
+-
+ I creating a account chart template A.
+-
+ !record {model: account.chart.template, id: account_chart_template_test_a}:
+ name: 'Chart template Test A'
+-
+ I creating a account chart template B.
+-
+ !record {model: account.chart.template, id: account_chart_template_test_b}:
+ name: 'Chart template Test B'
+-
+ I creating a account root account template.
+-
+ !record {model: account.account.template, id: account_account_template_test_root_acc}:
+ name: 'Chart of Account Test parent'
+ code: 'Root-001'
+ type: view
+ user_type: account_account_type_view_acc
+ chart_template_id: account_chart_template_test_a
+-
+ I creating a account template A1.
+-
+ !record {model: account.account.template, id: account_account_template_test_child_a1}:
+ name: 'Chart of Account Test A1'
+ parent_id: account_account_template_test_root_acc
+ code: 'A1-001'
+ type: view
+ user_type: account_account_type_view_acc
+ chart_template_id: account_chart_template_test_a
+-
+ I creating a account template A2.
+-
+ !record {model: account.account.template, id: account_account_template_test_child_a2}:
+ name: 'Chart of Account Test A2'
+ parent_id: account_account_template_test_root_acc
+ code: 'A2-002'
+ type: view
+ user_type: account_account_type_view_acc
+ chart_template_id: account_chart_template_test_a
+
+-
+ I creating a account template B1.
+-
+ !record {model: account.account.template, id: account_account_template_test_child_b1}:
+ name: 'Chart of Account Test B1'
+ parent_id: account_account_template_test_root_acc
+ code: 'B1-001'
+ type: view
+ user_type: account_account_type_view_acc
+ chart_template_id: account_chart_template_test_b
+-
+ I creating a account template B2.
+-
+ !record {model: account.account.template, id: account_account_template_test_child_b2}:
+ name: 'Chart of Account Test B2'
+ parent_id: account_account_template_test_root_acc
+ code: 'B2-002'
+ type: view
+ user_type: account_account_type_view_acc
+ chart_template_id: account_chart_template_test_b
+-
+ I creating a account Root Tax code template.
+-
+ !record {model: account.tax.code.template, id: account_tax_code_template_test_root}:
+ name: 'Tax Template Root Test'
+-
+ I creating a account child Tax code template.
+-
+ !record {model: account.tax.code.template, id: account_tax_code_template_test_child}:
+ name: 'Tax Template child Test'
+ parent_id: account_tax_code_template_test_root
+-
+ I creating a Tax template for chart Template A.
+-
+ !record {model: account.tax.template, id: account_tax_template_temp_a}:
+ name: 'Tax 21% A'
+ sequence: 21
+ amount: 0.21
+ type: percent
+ chart_template_id: account_chart_template_test_a
+-
+ I creating a Tax template for chart Template B.
+-
+ !record {model: account.tax.template, id: account_tax_template_temp_b}:
+ name: 'Tax 12% B'
+ sequence: 12
+ amount: 0.12
+ type: percent
+ chart_template_id: account_chart_template_test_b
+-
+ I creating a account fiscal position template for chart template A.
+-
+ !record {model: account.fiscal.position.template, id: account_fiscal_position_template_test_a}:
+ name: 'Fiscal Position Template A'
+ chart_template_id: account_chart_template_test_a
+-
+ I creating a account fiscal position template For chart template B.
+-
+ !record {model: account.fiscal.position.template, id: account_fiscal_position_template_test_b}:
+ name: 'Fiscal Position Template B'
+ chart_template_id: account_chart_template_test_b
+
+-
+ I creating a account chart template A for mapping all records.
+-
+ !record {model: account.chart.template, id: account_chart_template_test_a}:
+ name: 'Chart template Test A'
+ account_root_id: account_account_template_test_root_acc
+ tax_code_root_id: account_tax_code_template_test_root
+ bank_account_view_id: account_account_template_test_root_acc
+-
+ I creating a account chart template B for mapping all records.
+-
+ !record {model: account.chart.template, id: account_chart_template_test_b}:
+ name: 'Chart template Test B'
+ parent_id: account_chart_template_test_a
+-
+ I creating a wizard.multi.charts.accounts record.
+-
+ !record {model: wizard.multi.charts.accounts, id: wizard_multi_charts_accounts_rec}:
+ company_id: base.main_company
+ chart_template_id: account_chart_template_test_b
+ sale_tax_rate: 5.00
+ purchase_tax_rate: 5.00
+ bank_accounts_id: []
+-
+ Execute wizard.
+-
+ !python {model: wizard.multi.charts.accounts}: |
+ self.execute(cr, uid, [ref("wizard_multi_charts_accounts_rec")])
+-
+ checking for account , taxes, fiscal position created properly or not.
+-
+ !python {model: account.account}: |
+ from tools.translate import _
+ search_ids_acc = self.search(cr, uid, [('name', 'in', ('Chart of Account Test A1','Chart of Account Test A2', 'Chart of Account Test B1' ,'Chart of Account Test B2'))])
+ if not len(search_ids_acc) == 4:
+ assert [], _('Accounts is not created Properly!')
+ acc_tax_obj=self.pool.get('account.tax')
+ search_tax_ids = acc_tax_obj.search(cr, uid, [('name', 'in', ('Tax 21% A','Tax 12% B'))])
+ if not len(search_tax_ids) == 2:
+ assert [], _('Taxes is not created Properly!')
+ acc_tax_obj=self.pool.get('account.fiscal.position')
+ search_fiscal_ids = acc_tax_obj.search(cr, uid, [('name', 'in', ('Fiscal Position Template A','Fiscal Position Template B'))])
+ if not len(search_fiscal_ids) == 2:
+ assert [], _('Fiscal position is not created Properly!')
\ No newline at end of file
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp