diff options
| author | AMP (OpenERP) <amp@tinyerp.com> | 2010-09-18 11:08:39 +0530 |
|---|---|---|
| committer | AMP (OpenERP) <amp@tinyerp.com> | 2010-09-18 11:08:39 +0530 |
| commit | 01d5194378e7d90642dbfcf1925a8ebfcdf6119b (patch) | |
| tree | 37dda2dcb69c135fd042f9839fdfdc6ac12814dd | |
| parent | 4f75625d6a8fd4065f3bd284ec14c7e8922176cb (diff) | |
| parent | 559185f39ddcec1bad138be6610e2b9ea909fed3 (diff) | |
[Merge]
bzr revid: amp@tinyerp.com-20100918053839-c1ob3r2pf54frh7s
149 files changed, 1956 insertions, 315 deletions
diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py index c432689de44..9bbddb1e050 100644 --- a/addons/account/__openerp__.py +++ b/addons/account/__openerp__.py @@ -134,6 +134,7 @@ module named account_voucher. 'test/account_use_model.yml', 'test/account_validate_account_move.yml', 'test/account_fiscalyear_close.yml', + 'test/account_report.yml', ], 'installable': True, 'active': False, diff --git a/addons/account/account_installer.xml b/addons/account/account_installer.xml index a262dc5eb7f..a9de51c3afb 100644 --- a/addons/account/account_installer.xml +++ b/addons/account/account_installer.xml @@ -8,13 +8,13 @@ <field name="arch" type="xml"> <data> <form position="attributes"> - <attribute name="string">Accounting Modules Configuration</attribute> + <attribute name="string">Accounting Application Configuration</attribute> </form> <separator string="title" position="attributes"> - <attribute name="string">Configure Your Accounting System</attribute> + <attribute name="string">Configure Your Accounting Chart</attribute> </separator> <xpath expr="//label[@string='description']" position="attributes"> - <attribute name="string">Configure your accounting system. By default, Chart of Account is matching to your country. If there are not chart of account certified for your county, you can install the generic chart of account.</attribute> + <attribute name="string">The default Chart of Accounts is matching your country selection. If no certified Chart of Accounts exists for your specified country, a generic one can be installed and will be selected by default.</attribute> </xpath> <xpath expr="//button[@string='Install Modules']" position="attributes"> <attribute name="string">Configure</attribute> @@ -66,13 +66,17 @@ <field name="arch" type="xml"> <data> <form position="attributes"> - <attribute name="string">Accounting Modules Configuration</attribute> + <attribute name="string">Accounting Application Configuration</attribute> </form> <separator string="title" position="attributes"> - <attribute name="string">Extra Accounting Modules</attribute> + <attribute name="string">Configure Your Accounting Application</attribute> + </separator> <xpath expr="//label[@string='description']" position="attributes"> - <attribute name="string">From this screen, you can install extra accounting modules in your accounting system. Select the modules to directly install them. If you do not think you need any of these right now, you can easily install them later.</attribute> + <attribute name="string">Add extra Accounting Addons to the ones already installed. Remember you can always install them at a later stage.</attribute> + </xpath> + <xpath expr="//button[@string='Install Modules']" position="attributes"> + <attribute name="string">Configure</attribute> </xpath> <xpath expr='//separator[@string="vsep"]' position='attributes'> <attribute name='string'></attribute> @@ -100,7 +104,7 @@ </record> <record id="action_account_installer" model="ir.actions.act_window"> - <field name="name">Accounting Modules Installation</field> + <field name="name">Accounting Application Configuration</field> <field name="type">ir.actions.act_window</field> <field name="res_model">account.installer.modules</field> <field name="view_id" ref="view_account_modules_installer"/> diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index bcd5d8b233b..3d82e27b8ce 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -2375,11 +2375,11 @@ <field name="arch" type="xml"> <data> <form position="attributes"> - <attribute name="string">Generate Chart of Accounts from a Chart Template</attribute> + <attribute name="string">Accounting Application Configuration</attribute> </form> <separator string="title" position="attributes"> <attribute name="string" - >Generate Chart of Accounts from a Chart Template</attribute> + >Generate Your Accounting Chart from a Chart Template</attribute> </separator> <xpath expr="//label[@string='description']" position="attributes"> <attribute name="string">This will automatically configure your chart of accounts, bank accounts, taxes and journals according to the selected template</attribute> diff --git a/addons/account/installer.py b/addons/account/installer.py index 415879e6de8..e2f2ca423b6 100644 --- a/addons/account/installer.py +++ b/addons/account/installer.py @@ -73,6 +73,21 @@ class account_installer(osv.osv_memory): return user.company_id.id return False + def _get_default_charts(self, cr, uid, context={}): + module_name = False + company_id = self._default_company(cr, uid, context=context) + company = self.pool.get('res.company').browse(cr, uid, company_id) + address_id = self.pool.get('res.partner').address_get(cr, uid, [company.partner_id.id]) + if address_id['default']: + address = self.pool.get('res.partner.address').browse(cr, uid, address_id['default']) + code = address.country_id.code + module_name = (code and 'l10n_' + code.lower()) or False + if module_name: + module_id = self.pool.get('ir.module.module').search(cr, uid, [('name', '=', module_name)]) + if module_id: + return module_name + return 'configurable' + _defaults = { 'date_start': lambda *a: time.strftime('%Y-01-01'), 'date_stop': lambda *a: time.strftime('%Y-12-31'), @@ -80,7 +95,8 @@ class account_installer(osv.osv_memory): 'sale_tax':lambda *a:0.0, 'purchase_tax':lambda *a:0.0, 'company_id': _default_company, - 'bank_accounts_id':_get_default_accounts + 'bank_accounts_id':_get_default_accounts, + 'charts': _get_default_charts } def on_change_tax(self, cr, uid, id, tax): diff --git a/addons/account/report/account_balance_sheet.py b/addons/account/report/account_balance_sheet.py index 49606dc2c6b..9b816b2ab5a 100644 --- a/addons/account/report/account_balance_sheet.py +++ b/addons/account/report/account_balance_sheet.py @@ -78,7 +78,7 @@ class report_balancesheet_horizontal(rml_parse.rml_parse, common_report_header): db_pool = pooler.get_pool(self.cr.dbname) #Getting Profit or Loss Balance from profit and Loss report - result_pl=self.obj_pl.get_data(data) + result_pl = self.obj_pl.get_data(data) self.res_bl = self.obj_pl.final_result() type_pool = db_pool.get('account.account.type') diff --git a/addons/account/report/account_general_journal.py b/addons/account/report/account_general_journal.py index 8cd3dad05ba..684a75b1f20 100644 --- a/addons/account/report/account_general_journal.py +++ b/addons/account/report/account_general_journal.py @@ -86,7 +86,7 @@ class journal_print(report_sxw.rml_parse, common_report_header): 'FROM account_move_line l ' 'LEFT JOIN account_journal j ON (l.journal_id=j.id) ' 'LEFT JOIN res_currency c on (l.currency_id=c.id)' - 'WHERE period_id=%s AND journal_id IN %s ' + self.query_get_clause + '' + 'WHERE period_id=%s AND journal_id IN %s ' + self.query_get_clause + ' ' 'GROUP BY j.id, j.code, j.name, l.amount_currency,c.code, l.currency_id ', (period_id, tuple(self.journal_ids))) return self.cr.dictfetchall() diff --git a/addons/account/report/tax_report.py b/addons/account/report/tax_report.py index 15607a79011..a89335f99c5 100644 --- a/addons/account/report/tax_report.py +++ b/addons/account/report/tax_report.py @@ -212,10 +212,8 @@ class tax_report(rml_parse.rml_parse): result_accounts.append(account_elem) ind+=1 - return result_accounts - report_sxw.report_sxw('report.account.vat.declaration', 'account.tax.code', 'addons/account/report/tax_report.rml', parser=tax_report, header="internal") diff --git a/addons/account/report/voucher_print.rml b/addons/account/report/voucher_print.rml index abfa714aa43..b1d7941068c 100644 --- a/addons/account/report/voucher_print.rml +++ b/addons/account/report/voucher_print.rml @@ -325,7 +325,7 @@ </tr> <tr> <td> - <para style="P9">[[ voucher.line_id and voucher.line_id.name and voucher.line_id.name[1] or removeParentNode('para') ]]</para> + <para style="P9">[[ voucher.line_id and voucher.line_id[0].name or removeParentNode('para') ]]</para> </td> <td> <para style="P2"> diff --git a/addons/account/test/account_report.yml b/addons/account/test/account_report.yml new file mode 100644 index 00000000000..0048de7af46 --- /dev/null +++ b/addons/account/test/account_report.yml @@ -0,0 +1,386 @@ +- + In order to test the PDF reports defined on an invoice, we will print an invoice +- + !python {model: account.invoice}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.account.invoice').create(cr, uid, [ref('account.test_invoice_1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-invoice.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a partner, we will print the Overdue Report +- + !python {model: res.partner}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.account.overdue').create(cr, uid, [ref('base.res_partner_asus'),ref('base.res_partner_agrolait'),ref('base.res_partner_c2c')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-report_overdue.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on Account Move, we will print the Voucher Report +- + !python {model: account.move}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.account.move.voucher').create(cr, uid, [ref('account.account_move_0')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-voucher-report.'+format), 'wb+').write(data) + +- + Demo data for Account tax code +- + !record {model: account.tax.code, id: account_tax_code_0}: + name : Tax Code Test +- + Print Tax Code entries report +- + !python {model: account.tax.code}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.account.tax.code.entries').create(cr, uid, [ref('account_tax_code_0')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-tax-code-entries.'+format), 'wb+').write(data) + +- + Print Vat Declaration Report +- + !python {model: account.tax.code}: | + import netsvc, tools, os + data_dict = {'model': 'ir.ui.menu', 'form': {'based_on': 'invoices','company_id':ref('base.main_company'),'periods':[]}} + (data, format) = netsvc.LocalService('report.account.vat.declaration').create(cr, uid, [ref("account_tax_code_0")], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-vat-declaration.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on an invoice, we will print an invoice +- + !python {model: account.invoice}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.account.invoice').create(cr, uid, [ref('account.test_invoice_1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-invoice.'+format), 'wb+').write(data) + +- + Print the Aged Partner Balance Report +- + !python {model: res.partner}: | + import netsvc, tools, os, time + import datetime + from mx.DateTime import * + start = datetime.date.fromtimestamp(time.mktime(time.strptime(time.strftime('%Y-%m-%d'), "%Y-%m-%d"))) + start = DateTime(int(start.year), int(start.month), int(start.day)) + res = {} + for i in range(5)[::-1]: + stop = start - RelativeDateTime(days=30) + res[str(i)] = { + 'name': (i!=0 and (str((5-(i+1)) * 30) + '-' + str((5-i) * 30)) or ('+'+str(4 * 30))), + 'stop': start.strftime('%Y-%m-%d'), + 'start': (i!=0 and stop.strftime('%Y-%m-%d') or False), + } + start = stop - RelativeDateTime(days=1) + obj_move = self.pool.get('account.move.line') + ctx = {} + fy_id = ref('account.data_fiscalyear') + period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) + journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] + ctx['fiscalyear'] = fy_id + ctx['journal_ids'] = journal_ids + ctx['chart_account_id'] = ref('account.chart0') + + query_line = obj_move._query_get(cr, uid, obj='l', context=ctx) + + data_dict = {'model': 'ir.ui.menu', 'form': {'chart_account_id':ref('account.chart0'),'initial_balance': 1, 'periods': period_list,'journal_ids':journal_ids, 'page_split': 0, 'date_from': time.strftime('%Y-%m-%d'), 'period_length': 30, 'amount_currency': 0,'query_line' : query_line, 'result_selection': 'customer','direction_selection': 'past','fiscalyear_id':fy_id}} + data_dict['form'].update(res) + (data, format) = netsvc.LocalService('report.account.aged_trial_balance').create(cr, uid, [], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-aged_partner_balance.'+format), 'wb+').write(data) + +- + Print the Compare Account Balance Report in Normal mode +- + !python {model: account.account}: | + import netsvc, tools, os, time + data_dict = {'model': 'account.account', 'form': {'id':ref('account.bal'),'chart_account_id':ref('account.chart0'),'select_account': False,'format_perc':0,'show_columns' :0, 'compare_pattern': 'none','account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear': [ref('account.data_fiscalyear')] ,'target_move': 'all','periods': [],'context':{'state':'all'}}} + (data, format) = netsvc.LocalService('report.account.balance.account.balance').create(cr, uid, [ref('account.bal'),ref('account.gpf')], data_dict, {'periods': []}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-compare-account_balance.'+format), 'wb+').write(data) + +- + Print the Compare Account Balance Report in Landscape mode +- + !python {model: account.account}: | + import netsvc, tools, os, time + data_dict = {'model': 'account.account', 'form': {'id':ref('account.bal'),'chart_account_id':ref('account.chart0'),'select_account': False,'format_perc':0,'show_columns' :0, 'compare_pattern': 'none','account_choice': 'moves','landscape':1,'period_manner': 'actual','fiscalyear': [ref('account.data_fiscalyear')] ,'target_move': 'all','periods': [],'context':{'state':'all'}}} + (data, format) = netsvc.LocalService('report.account.account.balance.landscape').create(cr, uid, [ref('account.bal'),ref('account.gpf')], data_dict, {'periods': []}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-compare-account_balance-landscape.'+format), 'wb+').write(data) + + +- + Print the Account Balance Sheet in Horizontal mode +- + !python {model: account.account}: | + import netsvc, tools, os, time + data_dict = {'model': 'ir.ui.menu', 'form': {'reserve_account_id':ref('account.rsa') ,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 1,'journal_ids':[],'fiscalyear': ref('account.data_fiscalyear') ,'target_move': 'all'}} + (data, format) = netsvc.LocalService('report.account.balancesheet.horizontal').create(cr, uid, [], data_dict, {'periods': []}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-account_balance_sheet_horizontal.'+format), 'wb+').write(data) + +- + Print the Account Balance Sheet in Normal mode +- + !python {model: account.account}: | + import netsvc, tools, os, time + data_dict = {'model': 'ir.ui.menu', 'form': {'reserve_account_id':ref('account.rsa') ,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':[],'fiscalyear': ref('account.data_fiscalyear') ,'target_move': 'all'}} + (data, format) = netsvc.LocalService('report.account.balancesheet').create(cr, uid, [], data_dict, {'periods': []}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-account_balance_sheet.'+format), 'wb+').write(data) + +- + Print the Account Balance Report in Normal mode - From Account Chart +- + !python {model: account.account}: | + import netsvc, tools, os, time + data_dict = {'model': 'account.account', 'form': {'chart_account_id':ref('account.chart0'),'select_account': False,'display_account':'bal_all','format_perc':0,'filter': 'filter_no','show_columns' :0, 'account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': ref('account.data_fiscalyear') ,'target_move': 'all','periods': [],'id':ref('account.bal'),'context':{'state':'all'}}} + (data, format) = netsvc.LocalService('report.account.account.balance').create(cr, uid, [ref('account.bal'),ref('account.gpf')], data_dict, {'periods': []}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-account_balance-normal.'+format), 'wb+').write(data) + print "Account Balance Report in Normal mode - From Menu" + + data_dict.update({'model': 'ir.ui.menu'}) + data_dict['form'].update({'active_ids':[ref('account.bal'),ref('account.gpf')]}) + + (data, format) = netsvc.LocalService('report.account.account.balance').create(cr, uid, [], data_dict, {'periods': []}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-account_balance-normal-menu.'+format), 'wb+').write(data) + +- + Print the Central Journal Report - From Account +- + !python {model: account.journal.period}: | + import netsvc, tools, os, time + fy_id = ref('account.data_fiscalyear') + period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) + journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] + journal_period_ids = self.pool.get('account.journal.period').search(cr, uid, [('journal_id', 'in', journal_ids), ('period_id', 'in', period_list)], context=context) + + obj_move = self.pool.get('account.move.line') + ctx = {} + ctx['fiscalyear'] = fy_id + ctx['journal_ids'] = journal_ids + ctx['chart_account_id'] = ref('account.chart0') + + query_line = obj_move._query_get(cr, uid, obj='l', context=ctx) + data_dict = {'model': 'account.journal.period', 'id':journal_period_ids[0], 'form': {'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'compare_pattern': 'none','account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':query_line,'target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }} + (data, format) = netsvc.LocalService('report.account.central.journal').create(cr, uid, journal_period_ids, data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-central_journal.'+format), 'wb+').write(data) + + print "Central Journal Report - From Menu" + data_dict.update({'model': 'ir.ui.menu'}) + data_dict['form'].update({'active_ids':journal_period_ids}) + + (data, format) = netsvc.LocalService('report.account.central.journal').create(cr, uid, [], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-central_journal-menu.'+format), 'wb+').write(data) +- + Print the General Journal Report - From Journal +- + !python {model: account.journal.period}: | + import netsvc, tools, os, time + fy_id = ref('account.data_fiscalyear') + period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) + journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] + journal_period_ids = self.pool.get('account.journal.period').search(cr, uid, [('journal_id', 'in', journal_ids), ('period_id', 'in', period_list)], context=context) + + obj_move = self.pool.get('account.move.line') + ctx = {} + ctx['fiscalyear'] = fy_id + ctx['journal_ids'] = journal_ids + ctx['chart_account_id'] = ref('account.chart0') + + query_line = obj_move._query_get(cr, uid, obj='l', context=ctx) + data_dict = {'model': 'ir.ui.menu','id':journal_period_ids[0], 'form': {'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'compare_pattern': 'none','account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':query_line,'target_move': 'all','periods': period_list,'journal_ids':journal_ids, 'active_ids':journal_period_ids}} + (data, format) = netsvc.LocalService('report.account.general.journal').create(cr, uid, journal_period_ids, data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-general_journal.'+format), 'wb+').write(data) + +- + Print the General Ledger Report in Normal Mode +- + !python {model: account.account}: | + import netsvc, tools, os, time + fy_id = ref('account.data_fiscalyear') + period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) + journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] + acc_ids = [ref('account.bal'),ref('account.gpf')] + + obj_move = self.pool.get('account.move.line') + ctx = {} + ctx['fiscalyear'] = fy_id + ctx['journal_ids'] = journal_ids + ctx['chart_account_id'] = ref('account.chart0') + + query_line = obj_move._query_get(cr, uid, obj='l', context=ctx) + + data_dict = {'model': 'account.account', 'form': {'initial_balance': 1,'initial_bal_query': query_line,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','sortby': 'sort_date','amount_currency': 0,'landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':query_line,'target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }} + (data, format) = netsvc.LocalService('report.account.general.ledger').create(cr, uid, acc_ids, data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-general_ledger.'+format), 'wb+').write(data) + + print "GL report from menu" + data_dict.update({'model': 'ir.ui.menu'}) + data_dict['form'].update({'active_ids': acc_ids}) + (data, format) = netsvc.LocalService('report.account.general.ledger').create(cr, uid, [], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-general_ledger-menu.'+format), 'wb+').write(data) +- + Print the General Ledger Report in Landscape Mode +- + !python {model: account.account}: | + import netsvc, tools, os, time + fy_id = ref('account.data_fiscalyear') + period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) + journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] + acc_ids = [ref('account.bal'),ref('account.gpf')] + + obj_move = self.pool.get('account.move.line') + ctx = {} + ctx['fiscalyear'] = fy_id + ctx['journal_ids'] = journal_ids + ctx['chart_account_id'] = ref('account.chart0') + + query_line = obj_move._query_get(cr, uid, obj='l', context=ctx) + + data_dict = {'model': 'account.account', 'form': {'initial_balance': 1,'initial_bal_query':query_line,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','sortby': 'sort_date','amount_currency': 0,'landscape':1,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':query_line,'target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }} + (data, format) = netsvc.LocalService('report.account.general.ledger_landscape').create(cr, uid, acc_ids, data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-general_ledger-landscape.'+format), 'wb+').write(data) + + print "GL report landscape mode from menu" + data_dict.update({'model': 'ir.ui.menu'}) + data_dict['form'].update({'active_ids': acc_ids}) + (data, format) = netsvc.LocalService('report.account.general.ledger_landscape').create(cr, uid, [], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-general_ledger-landscape-menu.'+format), 'wb+').write(data) + +- + Print Journal Report - From Model +- + !python {model: account.journal.period}: | + import netsvc, tools, os, time + fy_id = ref('account.data_fiscalyear') + period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) + journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] + journal_period_ids = self.pool.get('account.journal.period').search(cr, uid, [('journal_id', 'in', journal_ids), ('period_id', 'in', period_list)], context=context) + + obj_move = self.pool.get('account.move.line') + ctx = {} + ctx['fiscalyear'] = fy_id + ctx['journal_ids'] = journal_ids + ctx['chart_account_id'] = ref('account.chart0') + + query_line = obj_move._query_get(cr, uid, obj='l', context=ctx) + + data_dict = {'model': 'account.journal.period', 'id':journal_period_ids[0], 'form': {'sort_selection': 'date','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'compare_pattern': 'none','account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':query_line,'target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }} + (data, format) = netsvc.LocalService('report.account.journal.period.print').create(cr, uid, journal_period_ids, data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-print_journal.'+format), 'wb+').write(data) + + print "Journal Report - From Menu" + data_dict.update({'model': 'ir.ui.menu'}) + data_dict['form'].update({'active_ids':journal_period_ids}) + + (data, format) = netsvc.LocalService('report.account.journal.period.print').create(cr, uid, [], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-print_journal-menu.'+format), 'wb+').write(data) + +- + Print the Partner Balance Report +- + !python {model: res.partner}: | + import netsvc, tools, os, time + fy_id = ref('account.data_fiscalyear') + period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) + journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] + + obj_move = self.pool.get('account.move.line') + ctx = {} + ctx['fiscalyear'] = fy_id + ctx['journal_ids'] = journal_ids + ctx['chart_account_id'] = ref('account.chart0') + + query_line = obj_move._query_get(cr, uid, obj='l', context=ctx) + data_dict = {'model': 'ir.ui.menu', 'form': {'result_selection': 'customer','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':journal_ids,'display_partner': 'non-zero_balance','fiscalyear': fy_id ,'target_move': 'all','query_line':query_line}} + (data, format) = netsvc.LocalService('report.account.partner.balance').create(cr, uid, [], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-partner_balance.'+format), 'wb+').write(data) + +- + Print the Partner Ledger Report +- + !python {model: res.partner}: | + import netsvc, tools, os, time + fy_id = ref('account.data_fiscalyear') + period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) + journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] + + obj_move = self.pool.get('account.move.line') + ctx = {} + ctx['fiscalyear'] = fy_id + ctx['journal_ids'] = journal_ids + ctx['chart_account_id'] = ref('account.chart0') + + query_line = obj_move._query_get(cr, uid, obj='l', context=ctx) + + data_dict = {'model': 'ir.ui.menu', 'form': {'initial_bal_query':query_line,'amount_currency': 0,'reconcil': True,'initial_balance':1,'page_split': True,'result_selection': 'customer','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':journal_ids,'display_partner': 'non-zero_balance','fiscalyear': fy_id ,'target_move': 'all','query_line':query_line}} + (data, format) = netsvc.LocalService('report.account.third_party_ledger').create(cr, uid, [], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-partner_ledger.'+format), 'wb+').write(data) + +- + Print the Partner Ledger-Other Report +- + !python {model: res.partner}: | + import netsvc, tools, os, time + fy_id = ref('account.data_fiscalyear') + period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) + journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] + + obj_move = self.pool.get('account.move.line') + ctx = {} + ctx['fiscalyear'] = fy_id + ctx['journal_ids'] = journal_ids + ctx['chart_account_id'] = ref('account.chart0') + + query_line = obj_move._query_get(cr, uid, obj='l', context=ctx) + data_dict = {'model': 'ir.ui.menu', 'form': {'initial_bal_query':query_line,'amount_currency': 0,'reconcil': True,'initial_balance':1,'page_split': False,'result_selection': 'customer','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':journal_ids,'display_partner': 'non-zero_balance','fiscalyear': fy_id ,'target_move': 'all','query_line':query_line}} + (data, format) = netsvc.LocalService('report.account.third_party_ledger_other').create(cr, uid, [], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-partner_ledger-other.'+format), 'wb+').write(data) + +- + Print the Profit-Loss Report in Normal Mode +- + !python {model: account.account}: | + import netsvc, tools, os, time + fy_id = ref('account.data_fiscalyear') + period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) + journal_ids = [] + acc_ids = [ref('account.bal'),ref('account.gpf')] + data_dict = {'model': 'ir.ui.menu', 'form': {'display_type': False,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':'True ','target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal'),'active_ids':acc_ids }} + (data, format) = netsvc.LocalService('report.pl.account').create(cr, uid, [], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-profit-loss.'+format), 'wb+').write(data) + +- + Print the Profit-Loss Report in Horizontal Mode +- + !python {model: account.account}: | + import netsvc, tools, os, time + fy_id = ref('account.data_fiscalyear') + period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) + journal_ids = [] + acc_ids = [ref('account.bal'),ref('account.gpf')] + data_dict = {'model': 'ir.ui.menu', 'form': {'display_type': True,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':'True ','target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal'),'active_ids':acc_ids }} + (data, format) = netsvc.LocalService('report.pl.account.horizontal').create(cr, uid, [], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-profit-loss-horizontal.'+format), 'wb+').write(data) diff --git a/addons/account/wizard/account_report_balance_sheet_view.xml b/addons/account/wizard/account_report_balance_sheet_view.xml index 708b146ce96..e61ad6f46d5 100644 --- a/addons/account/wizard/account_report_balance_sheet_view.xml +++ b/addons/account/wizard/account_report_balance_sheet_view.xml @@ -12,6 +12,7 @@ <field name="display_account"/> <field name="target_move"/> <field name="display_type"/> + <field name="reserve_account_id"/> <newline/> </field> </field> diff --git a/addons/account_analytic_plans/__openerp__.py b/addons/account_analytic_plans/__openerp__.py index 0c3d1d07370..6e00c6b587d 100644 --- a/addons/account_analytic_plans/__openerp__.py +++ b/addons/account_analytic_plans/__openerp__.py @@ -66,6 +66,7 @@ of distribution models. 'wizard/account_crossovered_analytic_view.xml' ], 'demo_xml' : [], + 'test' : ['test/acount_analytic_plans_report.yml'], 'installable': True, 'active' : False, 'certificate': '0036417675373', diff --git a/addons/account_analytic_plans/report/crossovered_analytic.py b/addons/account_analytic_plans/report/crossovered_analytic.py index e064ddc148b..f8a975a4c25 100644 --- a/addons/account_analytic_plans/report/crossovered_analytic.py +++ b/addons/account_analytic_plans/report/crossovered_analytic.py @@ -96,17 +96,19 @@ class crossovered_analytic(report_sxw.rml_parse): self.final_list = children_list selected_ids = line_pool.search(self.cr,self.uid,[('account_id','in',self.final_list)]) - - query="SELECT sum(aal.amount) AS amt, sum(aal.unit_amount) AS qty FROM account_analytic_line AS aal, account_analytic_account AS aaa \ - WHERE aal.account_id=aaa.id AND aal.id IN ("+','.join(map(str,selected_ids))+") AND (aal.journal_id " + journal +") AND aal.date>='"+ str(form['date1']) +"'"" AND aal.date<='" + str(form['date2']) + "'" - - self.cr.execute(query) - info=self.cr.dictfetchall() - - res['ref_qty']=info[0]['qty'] - res['ref_amt']=info[0]['amt'] - self.base_amount= info[0]['amt'] - + if selected_ids: + query="SELECT sum(aal.amount) AS amt, sum(aal.unit_amount) AS qty FROM account_analytic_line AS aal, account_analytic_account AS aaa \ + WHERE aal.account_id=aaa.id AND aal.id IN ("+','.join(map(str,selected_ids))+") AND (aal.journal_id " + journal +") AND aal.date>='"+ str(form['date1']) +"'"" AND aal.date<='" + str(form['date2']) + "'" + + self.cr.execute(query) + info=self.cr.dictfetchall() + + res['ref_qty']=info[0]['qty'] + res['ref_amt']=info[0]['amt'] + self.base_amount= info[0]['amt'] + res['ref_qty']=0.0 + res['ref_amt']=0.0 + self.base_amount= 0.0 result.append(res) return result diff --git a/addons/account_analytic_plans/test/acount_analytic_plans_report.yml b/addons/account_analytic_plans/test/acount_analytic_plans_report.yml new file mode 100644 index 00000000000..debeba7daa0 --- /dev/null +++ b/addons/account_analytic_plans/test/acount_analytic_plans_report.yml @@ -0,0 +1,9 @@ +- + Print the Cross Overed Report in Normal mode +- + !python {model: account.analytic.account}: | + import netsvc, tools, os, time + data_dict = {'model': 'account.analytic.account', 'form': {'date1':time.strftime("%Y-01-01"),'date2':time.strftime('%Y-%m-%d'),'journal_ids':[6,0,(ref('account.cose_journal_sale'))],'ref':ref('account.analytic_root'),'empty_line':True,'id':ref('account.analytic_root'),'context':{}}} + (data, format) = netsvc.LocalService('report.account.analytic.account.crossovered.analytic').create(cr, uid, [ref('account.analytic_root')], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account_analytic_plans-crossovered_analyitic.'+format), 'wb+').write(data)
\ No newline at end of file diff --git a/addons/account_budget/__openerp__.py b/addons/account_budget/__openerp__.py index f47e4685246..5d6d8da0def 100644 --- a/addons/account_budget/__openerp__.py +++ b/addons/account_budget/__openerp__.py @@ -63,6 +63,7 @@ Three reports are available: 'demo_xml': ['crossovered_budget_demo.xml'], 'test':[ 'test/account_budget.yml', + 'test/account_budget_report.yml', ], 'installable': True, 'active': False, diff --git a/addons/account_budget/test/account_budget_report.yml b/addons/account_budget/test/account_budget_report.yml new file mode 100644 index 00000000000..fa086e24a64 --- /dev/null +++ b/addons/account_budget/test/account_budget_report.yml @@ -0,0 +1,27 @@ +- + Print the Analytic Budget Report in Normal mode +- + !python {model: account.analytic.account}: | + import netsvc, tools, os, time + data_dict = {'model': 'account.analytic.account', 'form': {'date1':time.strftime("%Y-01-01"),'date2':time.strftime('%Y-%m-%d'),'id':ref('account.analytic_root'),'context':{}}} + (data, format) = netsvc.LocalService('report.account.analytic.account.budget').create(cr, uid, [ref('account.analytic_root')], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account_budget-analytic_budget_report.'+format), 'wb+').write(data) +- + Print the Budget Report in Normal mode +- + !python {model: account.budget.post}: | + import netsvc, tools, os, time + data_dict = {'model': 'account.budget.post', 'form': {'date1':time.strftime("%Y-01-01"),'date2':time.strftime('%Y-%m-%d'),'id':ref('account_budget.account_budget_post_sales0'),'context':{}}} + (data, format) = netsvc.LocalService('report.account.analytic.account.budget').create(cr, uid, [ref('account_budget.account_budget_post_sales0')], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account_budget-budget_report.'+format), 'wb+').write(data) +- + Print the Cross Overed Budget Report in Normal mode +- + !python {model: crossovered.budget}: | + import netsvc, tools, os, time + data_dict = {'model': 'account.budget.post', 'form': {'date_from':time.strftime("%Y-01-01"),'date_to':time.strftime('%Y-%m-%d'),'report':'analytic-full','id':ref('account_budget.crossovered_budget_budgetoptimistic0'),'context':{}}} + (data, format) = netsvc.LocalService('report.crossovered.budget.report').create(cr, uid, [ref('account_budget.crossovered_budget_budgetoptimistic0')], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account_budget-crossovered_budget_report.'+format), 'wb+').write(data)
\ No newline at end of file diff --git a/addons/account_budget/wizard/account_budget_crossovered_report.py b/addons/account_budget/wizard/account_budget_crossovered_report.py index 9a700e90ebb..2862cd1db48 100644 --- a/addons/account_budget/wizard/account_budget_crossovered_report.py +++ b/addons/account_budget/wizard/account_budget_crossovered_report.py @@ -42,7 +42,7 @@ class account_budget_crossvered_report(osv.osv_memory): data = self.read(cr, uid, ids)[0] datas = { 'ids': context.get('active_ids',[]), - 'model': 'crossovered.budge', + 'model': 'crossovered.budget', 'form': data } datas['form']['report']='analytic-full' diff --git a/addons/account_invoice_layout/__openerp__.py b/addons/account_invoice_layout/__openerp__.py index 77a6e428de6..36eeb41b137 100644 --- a/addons/account_invoice_layout/__openerp__.py +++ b/addons/account_invoice_layout/__openerp__.py @@ -45,7 +45,8 @@ 'account_invoice_layout_report.xml', 'wizard/account_invoice_special_message.xml', ], - 'demo_xml': [], + 'demo_xml': ['account_invoice_layout_demo.xml'], + 'test':['test/account_invoice_layout_report.yml'], 'installable': True, 'active': False, 'certificate': '0057235078173', diff --git a/addons/account_invoice_layout/account_invoice_layout_demo.xml b/addons/account_invoice_layout/account_invoice_layout_demo.xml new file mode 100644 index 00000000000..cb8df67d997 --- /dev/null +++ b/addons/account_invoice_layout/account_invoice_layout_demo.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<openerp> + <data noupdate="1"> + + <record id="demo_message1" model="notify.message"> + <field name="name">OpenERP SA</field> + <field name="msg">ERP & CRM Solutions....</field> + </record> + <record id="demo_message1" model="notify.message"> + <field name="name">Tiny sprl</field> + <field name="msg">Be Expert with the Experts...</field> + </record> + </data> +</openerp>
\ No newline at end of file diff --git a/addons/account_invoice_layout/report/report_account_invoice_layout.rml b/addons/account_invoice_layout/report/report_account_invoice_layout.rml index 77781c4191d..8f7d5f561e8 100644 --- a/addons/account_invoice_layout/report/report_account_invoice_layout.rml +++ b/addons/account_invoice_layout/report/report_account_invoice_layout.rml @@ -297,7 +297,7 @@ </para> </td> <td> - <para style="terp_default_Note">Note: [[ (a['note'] and format(a['note'])) or removeParentNode('tr') ]]</para> + <para style="terp_default_Note">Note: [[ (a['note'] and format(a['note'] or '')) or removeParentNode('tr') ]]</para> <para style="terp_default_Note"> <font color="white"> </font> </para> @@ -337,7 +337,7 @@ </para> </td> <td> - <para style="terp_default_9">[[ a['type']=='text' and format(a['name']) or removeParentNode('blockTable') ]]</para> + <para style="terp_default_9">[[ a['type']=='text' and format(a['name'] or '') or removeParentNode('blockTable') ]]</para> </td> <td> <para style="terp_default_9">[[ a['type']=='text' and '' ]]</para> @@ -467,7 +467,7 @@ <blockTable colWidths="539.0" style="Table_Coment_Payment_Term"> <tr> <td> - <para style="terp_default_9">[[ format(o.comment or removeParentNode('blockTable')) ]]</para> + <para style="terp_default_9">[[ format(o.comment or '') or removeParentNode('blockTable') ]]</para> </td> </tr> </blockTable> @@ -477,7 +477,7 @@ <blockTable colWidths="539.0" style="Table_Payment_Terms"> <tr> <td> - <para style="terp_default_9">[[ format((o.payment_term and o.payment_term.note) or removeParentNode('blockTable')) ]]</para> + <para style="terp_default_9">[[ format((o.payment_term and o.payment_term.note or '') or removeParentNode('blockTable')) ]]</para> </td> </tr> </blockTable> diff --git a/addons/account_invoice_layout/test/account_invoice_layout_report.yml b/addons/account_invoice_layout/test/account_invoice_layout_report.yml new file mode 100644 index 00000000000..b7b1c1e76cc --- /dev/null +++ b/addons/account_invoice_layout/test/account_invoice_layout_report.yml @@ -0,0 +1,17 @@ +- + Print the Invoice layout report in Normal Mode +- + !python {model: account.invoice}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.account.invoice.layout').create(cr, uid, [ref('account.test_invoice_1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account_invoice_layout.'+format), 'wb+').write(data) +- + Print the Invoice Layout Report with Message in Normal mode +- + !python {model: account.invoice}: | + import netsvc, tools, os, time + data_dict = {'model': 'account.invoice', 'form': {'message':ref('account_invoice_layout.demo_message1'),'id':ref('account.test_invoice_1'),'context':{}}} + (data, format) = netsvc.LocalService('report.notify_account.invoice').create(cr, uid, [ref('account.test_invoice_1')], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account_invoice_layout_message_report.'+format), 'wb+').write(data)
\ No newline at end of file diff --git a/addons/account_payment/__openerp__.py b/addons/account_payment/__openerp__.py index f3e437face2..5114a576512 100644 --- a/addons/account_payment/__openerp__.py +++ b/addons/account_payment/__openerp__.py @@ -47,8 +47,11 @@ 'account_invoice_view.xml', 'account_payment_report.xml', ], - 'demo_xml': [], - 'test': ['test/account_payment.yml'], + 'demo_xml': ['account_payment_demo.xml'], + 'test': [ + 'test/account_payment.yml' + 'test/account_payment_report.yml' + ], 'installable': True, 'active': False, 'certificate': '0061703998541', diff --git a/addons/account_payment/account_payment_demo.xml b/addons/account_payment/account_payment_demo.xml new file mode 100644 index 00000000000..25fe4a2c55b --- /dev/null +++ b/addons/account_payment/account_payment_demo.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<openerp> + <data noupdate="1"> + <record id="partner_bank_1" model="res.partner.bank"> + <field name="name">Reserve Bank</field> + <field name="acc_number">00987654321</field> + <field name="partner_id" ref="base.res_partner_agrolait"></field> + <field name="state" eval="bank"/> + </record> + <record id="payment_mode_1" model="payment.mode"> + <field name="name">Direct Payment</field> + <field name="journal" ref="account.sales_journal"/> + <field name="bank_id" ref="account_payment.partner_bank_1"/> + <field name="company_id" ref="base.main_company"/> + </record> + <record id="payment_order_1" model="payment.order"> + <field name="reference">ORDER1</field> + <field name="mode" ref="account_payment.payment_mode_1"/> + <field name="user_id" ref="base.user_root"/> + <field name="date_prefered">now</field> + <field name="state">draft</field> + </record> + </data> +</openerp> diff --git a/addons/account_payment/test/account_payment_report.yml b/addons/account_payment/test/account_payment_report.yml new file mode 100644 index 00000000000..45022e19a73 --- /dev/null +++ b/addons/account_payment/test/account_payment_report.yml @@ -0,0 +1,8 @@ +- + In order to test the PDF reports defined on Account Payment, Print a Payment Order +- + !python {model: payment.order}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.payment.order').create(cr, uid, [ref('account_payment.payment_order_1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account_payment-payment_order_report.'+format), 'wb+').write(data)
\ No newline at end of file diff --git a/addons/account_report/__openerp__.py b/addons/account_report/__openerp__.py index 07afc6ed58f..b8029bf3563 100644 --- a/addons/account_report/__openerp__.py +++ b/addons/account_report/__openerp__.py @@ -42,7 +42,8 @@ 'wizard/account_report_print_indicators_with_pdf_view.xml', 'board_account_report_view.xml', ], - 'demo_xml': [], + 'demo_xml': ['account_report_demo.xml'], + 'test': ['test/account_report.yml'], 'installable': True, 'active': False, 'certificate': '0050976406925', diff --git a/addons/account_report/account_report_demo.xml b/addons/account_report/account_report_demo.xml new file mode 100644 index 00000000000..30f1318c592 --- /dev/null +++ b/addons/account_report/account_report_demo.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<openerp> + <data noupdate="1"> + <record id="account_report_1" model="account.report.report"> + <field name="name">Account Demo Report</field> + <field name="code">ADR</field> + <field name="type">fiscal</field> + <field name="expression">debit>0.0</field> + </record> + </data> +</openerp>
\ No newline at end of file diff --git a/addons/account_report/report/print_indicator.rml b/addons/account_report/report/print_indicator.rml index 52133cb894e..160cd435ada 100644 --- a/addons/account_report/report/print_indicator.rml +++ b/addons/account_report/report/print_indicator.rml @@ -119,7 +119,7 @@ </blockTable> <blockTable colWidths="528.0" repeatRows="1" style="Table7"> <tr> - <td><para style="P5"> <font color="white">[['..........'*(o['level']) ]]</font> <font>[[ format(o['note']) or removeParentNode('blockTable') ]]</font></para></td> + <td><para style="P5"> <font color="white">[['..........'*(o['level']) ]]</font> <font>[[ format(o['note'] or '') or removeParentNode('blockTable') ]]</font></para></td> </tr> </blockTable> </section> diff --git a/addons/account_report/test/account_report_report.yml b/addons/account_report/test/account_report_report.yml new file mode 100644 index 00000000000..d94dce1f553 --- /dev/null +++ b/addons/account_report/test/account_report_report.yml @@ -0,0 +1,17 @@ +- + In order to test the PDF reports defined on Account, Print a Financial Statement Report +- + !python {model: account.report.report}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.accounting.report').create(cr, uid, [ref('account_report.account_report_1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account_report-financial_statement_report.'+format), 'wb+').write(data) +- + Print the Indicators Report in Normal mode +- + !python {model: account.report.history }: | + import netsvc, tools, os, time + data_dict = {'model': 'ir.ui.menu', 'form': {'select_base':'year','base_selection':[ref('account.data_fiscalyear')],'context':{}}} + (data, format) = netsvc.LocalService('report.print.indicators').create(cr, uid, [], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account_report-indicators_report.'+format), 'wb+').write(data)
\ No newline at end of file diff --git a/addons/account_reporting/__openerp__.py b/addons/account_reporting/__openerp__.py index 5ac93d17984..fb05e755ac2 100644 --- a/addons/account_reporting/__openerp__.py +++ b/addons/account_reporting/__openerp__.py @@ -36,7 +36,8 @@ 'account_data.xml', 'wizard/account_reporting_balance_report_view.xml', ], - 'demo_xml': [], + 'demo_xml': ['account_reporting_demo.xml'], + 'test': ['test/account_reporting_report.yml'], 'installable': True, 'active': False, 'certificate': '0072305016797', diff --git a/addons/account_reporting/account_reporting_demo.xml b/addons/account_reporting/account_reporting_demo.xml new file mode 100644 index 00000000000..880fa51deda --- /dev/null +++ b/addons/account_reporting/account_reporting_demo.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<openerp> + <data noupdate="1"> + <record id="account_balance_sheet_1" model="account.report.bs"> + <field name="name">My Balance Sheet</field> + <field name="code">MBS</field> + </record> + </data> +</openerp>
\ No newline at end of file diff --git a/addons/account_reporting/test/account_reporting_report.yml b/addons/account_reporting/test/account_reporting_report.yml new file mode 100644 index 00000000000..9754f53cc4d --- /dev/null +++ b/addons/account_reporting/test/account_reporting_report.yml @@ -0,0 +1,9 @@ +- + Print the Balance Sheet Report in Normal mode +- + !python {model: account.report.bs }: | + import netsvc, tools, os, time + data_dict = {'model': 'account.report.bs', 'form': {'fiscalyear':ref('account.data_fiscalyear'),'periods':[ref('account.period_1'),ref('account.period_2'),ref('account.period_3')],'context':{}}} + (data, format) = netsvc.LocalService('report.account.report.bs').create(cr, uid, [ref('account_reporting.account_balance_sheet_1')], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account_reporting-balance_sheet_report.'+format), 'wb+').write(data)
\ No newline at end of file diff --git a/addons/account_voucher/__openerp__.py b/addons/account_voucher/__openerp__.py index 824ca746f37..752bb74f90c 100644 --- a/addons/account_voucher/__openerp__.py +++ b/addons/account_voucher/__openerp__.py @@ -52,6 +52,7 @@ # "test/account_voucher.yml", # "test/sales_receipt.yml", # "test/sales_payment.yml", + "test/account_voucher_report.yml" ], 'certificate': '0037580727101', "active": False, diff --git a/addons/account_voucher/test/account_voucher_report.yml b/addons/account_voucher/test/account_voucher_report.yml new file mode 100644 index 00000000000..eddb313c776 --- /dev/null +++ b/addons/account_voucher/test/account_voucher_report.yml @@ -0,0 +1,34 @@ +- + Demo for Account Voucher +- + !record {model: account.voucher, id: account_voucher_voucheraxelor0}: + account_id: account.cash + company_id: base.main_company + currency_id: base.EUR + journal_id: account.bank_journal + name: Voucher Axelor + narration: Basic PC + amount: 1000.0 + line_ids: + - account_id: account.cash + amount: 1000.0 + name: Voucher Axelor + period_id: account.period_6 + +- + In order to test the PDF reports defined on a account_voucher, we will print account voucher amount Report +- + !python {model: account.voucher}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.voucher.cash_amount').create(cr, uid, [ref("account_voucher_voucheraxelor0")], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account_voucher-amount.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a account_voucher, we will print account voucher Report +- + !python {model: account.voucher}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.voucher.cash_receipt.drcr').create(cr, uid, [ref("account_voucher_voucheraxelor0")], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account_voucher-report.'+format), 'wb+').write(data) diff --git a/addons/association/profile_association.xml b/addons/association/profile_association.xml index a149cfb0952..8460cfa6cc9 100644 --- a/addons/association/profile_association.xml +++ b/addons/association/profile_association.xml @@ -2,21 +2,21 @@ <openerp> <data> <record id="view_confirm_install_module_form" model="ir.ui.view"> - <field name="name">Association Profile : Install extra modules</field> + <field name="name">Association Application Configuration</field> <field name="model">profile.association.config.install_modules_wizard</field> <field name="type">form</field> <field name="inherit_id" ref="base.res_config_installer"/> <field name="arch" type="xml"> <data> <form position="attributes"> - <attribute name="string">Association Profile Configuration</attribute> + <attribute name="string">Association Application Configuration</attribute> </form> <xpath expr='//separator[@string="vsep"]' position='attributes'> <attribute name='string'></attribute> </xpath> <xpath expr="//label[@string='description']" position="attributes"> - <attribute name="string">Install more modules. A few modules are proposed according to the Association Profile you selected. You will be able to install them based on our requirements.</attribute> + <attribute name="string">Here are specific applications related to the Association Profile you selected.</attribute> </xpath> <xpath expr="//button[@string='Install Modules']" position="attributes"> <attribute name="string">Configure</attribute> @@ -37,7 +37,7 @@ </record> <record id="action_config_install_module" model="ir.actions.act_window"> - <field name="name">Association Profile : Install Extra Modules</field> + <field name="name">Association Application Configuration</field> <field name="type">ir.actions.act_window</field> <field name="res_model">profile.association.config.install_modules_wizard</field> <field name="view_id" ref="view_confirm_install_module_form"/> diff --git a/addons/auction/__openerp__.py b/addons/auction/__openerp__.py index 69fef0748c4..7105102b385 100644 --- a/addons/auction/__openerp__.py +++ b/addons/auction/__openerp__.py @@ -59,7 +59,9 @@ ], 'demo_xml': ['auction_demo.xml','board_auction_demo.xml'], - 'test': ['test/auction.yml'], + 'test': ['test/auction.yml', + 'test/auction_report.yml', + ], 'installable': True, 'active': False, diff --git a/addons/auction/test/auction_report.yml b/addons/auction/test/auction_report.yml new file mode 100644 index 00000000000..0219af369b4 --- /dev/null +++ b/addons/auction/test/auction_report.yml @@ -0,0 +1,125 @@ +- + In order to test the PDF reports defined on auction, we will print a auction artist +- + !python {model: auction.lots}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.auction.artists').create(cr, uid, [ref('auction.auction_deposit_1_lot_1'),ref('auction.auction_deposit_1_lot_2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'auction-auction_artist_report.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on auction, we will print a auction Bid +- + !python {model: auction.bid}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.auction.bids').create(cr, uid, [ref('auction.auction_date_1_bid_3'),ref('auction.auction_date_1_bid_4')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'auction-auction_bid_report.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on auction, we will print a lots list Report +- + !python {model: auction.lots}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.lots.list').create(cr, uid, [ref('auction.auction_deposit_3_lot_1'),ref('auction.auction_deposit_3_lot_2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'auction-auction_lots_list_report.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on auction, we will print a lots inventory Report +- + !python {model: auction.lots}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.lots.list.inventory').create(cr, uid, [ref('auction.auction_deposit_4_lot_1'),ref('auction.auction_deposit_4_lot_2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'auction-auction_lots_inventory_report.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on auction, we will print a deposit seller Report +- + !python {model: auction.lots}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.deposit.seller').create(cr, uid, [ref('auction.auction_deposit_5_lot_1'),ref('auction.auction_deposit_5_lot_2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'auction-auction_deposit_seller_report.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on auction, we will print a catalog +- + !python {model: auction.dates}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.auction.cat_flagy').create(cr, uid, [ref('auction.auction_date_1'),ref('auction.auction_date_2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'auction-auction_catalog_list.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on auction, we will print buyer form report +- + !python {model: auction.lots}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.buyer_form_report').create(cr, uid, [ref('auction.auction_deposit_6_lot_1'),ref('auction.auction_deposit_6_lot_2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'auction-auction_buyer_form.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on auction, we will print bids phones report +- + !python {model: auction.lots}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.bids.phones.details').create(cr, uid, [ref('auction.auction_deposit_7_lot_1'),ref('auction.auction_deposit_7_lot_2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'auction-auction_bids_phones_details.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a auction, we will print a Auction Total +- + !python {model: auction.lots}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.auction.total.rml').create(cr, uid, [ref('auction.auction_deposit_8_lot_1'),ref('auction.auction_deposit_8_lot_2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'auction-auction_total_report.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a auction, we will print a Auction Result +- + !python {model: auction.lots}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.auction.result').create(cr, uid, [ref('auction.auction_deposit_9_lot_1'),ref('auction.auction_deposit_9_lot_2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'auction-auction_result_report.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a auction, we will print a Auction Lot +- + !python {model: auction.lots}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.bids.lots').create(cr, uid, [ref('auction.auction_deposit_10_lot_1'),ref('auction.auction_deposit_10_lot_2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'auction-auction_lot_report.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a auction, we will print a Auction Buyer list report +- + !python {model: auction.lots}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.buyer.list').create(cr, uid, [ref('auction.auction_deposit_10_lot_1'),ref('auction.auction_deposit_10_lot_2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'auction-auction_buyer_list_report.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a auction, we will print a Auction Flagey Hussier report +- + !python {model: auction.lots}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.flagey.huissier').create(cr, uid, [ref('auction.auction_deposit_3_lot_1'),ref('auction.auction_deposit_10_lot_2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'auction-auction_flagey_hussier_report.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a auction, we will print Auction Seller Form report +- + !python {model: auction.lots}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.seller_form_report').create(cr, uid, [ref('auction.auction_deposit_3_lot_1'),ref('auction.auction_deposit_10_lot_2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'auction-auction_seller_form_report.'+format), 'wb+').write(data)
\ No newline at end of file diff --git a/addons/base_contact/base_contact_installer.py b/addons/base_contact/base_contact_installer.py index 31cebb61ba5..4f4e2b2896c 100644 --- a/addons/base_contact/base_contact_installer.py +++ b/addons/base_contact/base_contact_installer.py @@ -29,7 +29,6 @@ class base_contact_installer(osv.osv_memory): _columns = { 'name': fields.char('Name', size=64), 'migrate': fields.boolean('Migrate', help="If you select this, all addresses will be migrated."), - 'nomigrate': fields.boolean('NoMigrate', help="If you select this, all addresses will not be migrated."), } def execute(self, cr, uid, ids, context=None): @@ -54,15 +53,12 @@ class base_contact_installer(osv.osv_memory): END; $contactjob$ LANGUAGE plpgsql; CREATE TRIGGER contactjob AFTER INSERT ON res_partner_contact FOR EACH ROW EXECUTE PROCEDURE add_to_job();""") - cr.commit() cr.execute("INSERT into res_partner_contact (name, title, email, first_name, website) (SELECT coalesce(name, 'Noname'), title, email, function , to_char(id, '99999999') from res_partner_address)") - cr.commit() cr.execute("DROP TRIGGER IF EXISTS contactjob on res_partner_contact") cr.execute("DROP LANGUAGE IF EXISTS plpgsql CASCADE;") cr.execute("DROP FUNCTION IF EXISTS add_to_job()") - cr.commit() base_contact_installer() diff --git a/addons/base_contact/base_contact_installer_view.xml b/addons/base_contact/base_contact_installer_view.xml index 87a8033d837..672c43745fb 100644 --- a/addons/base_contact/base_contact_installer_view.xml +++ b/addons/base_contact/base_contact_installer_view.xml @@ -31,9 +31,7 @@ <label string="Otherwise these details will not be visible from address/contact." colspan="4"/> <label string="Do you want to migrate your Address data in Contact Data?" colspan="4" /> <group colspan="6"> - <label string="Migrate:" colspan="1"/> - <field name="migrate" string="Yes" colspan="1"/> - <field name="nomigrate" string="No" colspan="1"/> + <field name="migrate" string="Migrate" colspan="1"/> </group> </group> </group> @@ -54,6 +52,7 @@ <record id="base_contact_installer_todo" model="ir.actions.todo"> <field name="action_id" ref="action_base_contact_installer"/> <field name="sequence">3</field> + <field name="state">skip</field> </record> </data> diff --git a/addons/base_module_doc_rst/__terp__.py b/addons/base_module_doc_rst/__openerp__.py index 8a7fe96b6bd..8a7fe96b6bd 100644 --- a/addons/base_module_doc_rst/__terp__.py +++ b/addons/base_module_doc_rst/__openerp__.py diff --git a/addons/base_module_doc_rst/module_report.xml b/addons/base_module_doc_rst/module_report.xml index d8bbe51bf46..e3d4e342472 100644 --- a/addons/base_module_doc_rst/module_report.xml +++ b/addons/base_module_doc_rst/module_report.xml @@ -3,7 +3,7 @@ <data> <report auto="False" id="base.ir_module_reference_print" model="ir.module.module" name="ir.module.reference.graph" rml="base_module_doc_rst/report/ir_module_reference_graph.rml" string="Technical guide"/> - <report id="report_proximity_graph" model="ir.module.module" name="proximity.graph" string="Proximity grpah"/> + <report id="report_proximity_graph" model="ir.module.module" name="proximity.graph" string="Proximity graph"/> </data> </openerp> diff --git a/addons/base_setup/base_setup_installer.xml b/addons/base_setup/base_setup_installer.xml index db890c2dfdf..4245f3da206 100644 --- a/addons/base_setup/base_setup_installer.xml +++ b/addons/base_setup/base_setup_installer.xml @@ -8,38 +8,41 @@ <field name="arch" type="xml"> <data> <form position="attributes"> - <attribute name="string">Install OpenERP Modules</attribute> + <attribute name="string">Install Applications</attribute> </form> - <xpath expr="//label[@string='description']" - position="attributes"> - <attribute name="string">Select applications you want to install. If you don't think you need any of these right now, you can easily install them later.</attribute> + <xpath expr="//label[@string='description']" position="attributes"> + <attribute name="string">Select the Applications you want your system to cover. If you are not sure about your exact needs at this stage, you can easily install them later.</attribute> </xpath> <xpath expr='//separator[@string="vsep"]' position='attributes'> <attribute name='string'></attribute> <attribute name='rowspan'>15</attribute> </xpath> + <xpath expr="//button[@string='Install Modules']" position="attributes"> + <attribute name="string">Install</attribute> + </xpath> <separator string="title" position="attributes"> - <attribute name="string">Install Generic Modules</attribute> + <attribute name="string">Install Applications</attribute> </separator> + <group colspan="8"> - <field name="crm" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction)"/> <field name="sale" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction)"/> - <field name="project" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction)"/> <field name="knowledge" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction)"/> - <field name="stock" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction)"/> <field name="mrp" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction)"/> - <field name="account" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction)"/> <field name="purchase" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction)"/> - <field name="hr" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction)"/> <field name="point_of_sale" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction)"/> - <field name="marketing" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction)"/> <field name="profile_tools" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction)"/> - <field name="report_designer" groups="base.group_extended" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction)"/> - <separator string="Install Specific Business Modules" colspan="4"/> - <field name="association" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction)"/> - <field name="auction" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction)"/> - <field name="product_expiry" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction)"/> + <field name="crm" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/> <field name="sale" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/> + <field name="project" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/> <field name="knowledge" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/> + <field name="stock" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/> <field name="mrp" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/> + <field name="account" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/> <field name="purchase" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/> + <field name="hr" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/> <field name="point_of_sale" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/> + <field name="marketing" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/> <field name="profile_tools" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/> + <field name="report_designer" groups="base.group_extended" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/> + <separator string="Install Specific Industry Sector Applications" colspan="4"/> + <field name="association" attrs="{'readonly':['|',('auction','=',True),('product_expiry','=',True)]}" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/> + <field name="auction" attrs="{'readonly':['|',('association','=',True),('product_expiry','=',True)]}" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/> + <field name="product_expiry" attrs="{'readonly':['|',('association','=',True),('auction','=',True)]}" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/> </group> </data> </field> </record> <record id="action_base_setup_installer" model="ir.actions.act_window"> - <field name="name">Base Setup Modules Installation</field> + <field name="name">Install Applications</field> <field name="type">ir.actions.act_window</field> <field name="res_model">base.setup.installer</field> <field name="view_id" ref="view_base_setup_installer"/> diff --git a/addons/base_setup/base_setup_todo.xml b/addons/base_setup/base_setup_todo.xml index 59543200076..8151442855b 100644 --- a/addons/base_setup/base_setup_todo.xml +++ b/addons/base_setup/base_setup_todo.xml @@ -1,20 +1,20 @@ <openerp> <data> <record id="view_base_setup_company" model="ir.ui.view"> - <field name="name">Setup company information</field> + <field name="name">Company Configuration</field> <field name="model">base.setup.company</field> <field name="type">form</field> <field name="inherit_id" ref="base.res_config_view_base"/> <field name="arch" type="xml"> <data> <form position="attributes"> - <attribute name="string">Main Company Setup</attribute> + <attribute name="string">Company Configuration</attribute> </form> <xpath expr="//label[@string='description']" position="attributes"> - <attribute name="string">Information of your company will be used to customize your documents like Invoices, Sale Orders and many more.</attribute> + <attribute name="string">Your company information will be used to personalize documents issued with OpenERP such as invoices, sales orders and much more.</attribute> </xpath> <xpath expr='//separator[@string="title"]' position='attributes'> - <attribute name='string'>Configure Your Company</attribute> + <attribute name='string'>Configure Your Company Information</attribute> </xpath> <xpath expr='//separator[@string="vsep"]' position='attributes'> <attribute name='rowspan'>25</attribute> @@ -55,7 +55,7 @@ </record> <record id="action_base_setup_company" model="ir.actions.act_window"> - <field name="name">Setup company information</field> + <field name="name">Company Configuration</field> <field name="type">ir.actions.act_window</field> <field name="res_model">base.setup.company</field> <field name="view_id" ref="view_base_setup_company"/> diff --git a/addons/base_setup/installer.py b/addons/base_setup/installer.py index 5da836d7f80..77303336ab7 100644 --- a/addons/base_setup/installer.py +++ b/addons/base_setup/installer.py @@ -66,13 +66,12 @@ class base_setup_installer(osv.osv_memory): "automatic picking lists generation and more."), 'marketing':fields.boolean('Marketing', help="Helps you manage your marketing campaigns step by step."), - 'profile_tools':fields.boolean('Miscellaneous Tools', + 'profile_tools':fields.boolean('Extra Tools', help="Lets you install various interesting but non-essential tools " "like Survey, Lunch and Ideas box."), 'report_designer':fields.boolean('Advanced Reporting', help="Lets you install various tools to simplify and enhance " "OpenERP's report creation."), - 'thunderbird' :fields.boolean('Thunderbird'), # Vertical modules 'product_expiry':fields.boolean('Food Industry', help="Installs a preselected set of OpenERP applications " @@ -108,11 +107,13 @@ class base_setup_installer(osv.osv_memory): return ['account_voucher'] return None - def onchange_moduleselection(self, cr, uid, ids, *args): + def onchange_moduleselection(self, cr, uid, ids, *args, **kargs): + value = {} + # Calculate progress closed, total = self.get_current_progress(cr, uid) - progress = round(100. * closed / (total + len(filter(None, args)))) + value.update({'progress':progress}) if progress < 10.: progress = 10. - return {'value':{'progress':progress}} + return {'value':value} base_setup_installer() diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index 94f3d977842..dc7fef3ca70 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -84,6 +84,7 @@ Create dashboard for CRM that includes: 'wizard/crm_partner_to_opportunity_view.xml', 'wizard/crm_send_email_view.xml', + 'wizard/crm_add_note_view.xml', 'wizard/crm_forward_to_partner_view.xml', 'wizard/crm_merge_opportunities_view.xml', diff --git a/addons/crm/crm.py b/addons/crm/crm.py index 1ee2f295778..a16f749323d 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -499,10 +499,14 @@ class crm_case_section(osv.osv): _name = "crm.case.section" _description = "Sales Teams" - _order = "parent_id, name" + _order = "complete_name" + + def get_full_name(self, cr, uid, ids, field_name, arg, context={}): + return dict(self.name_get(cr, uid, ids, context)) _columns = { 'name': fields.char('Sales Team', size=64, required=True, translate=True), + 'complete_name': fields.function(get_full_name, method=True, type='char', size=256, readonly=True, store=True), 'code': fields.char('Code', size=8), 'active': fields.boolean('Active', help="If the active field is set to "\ "true, it will allow you to hide the sales team without removing it."), diff --git a/addons/crm/crm_action_rule.py b/addons/crm/crm_action_rule.py index 6805131155a..f7df076e24d 100644 --- a/addons/crm/crm_action_rule.py +++ b/addons/crm/crm_action_rule.py @@ -96,7 +96,8 @@ this if you want the rule to send an email to the partner."), res_count = True if action.trg_max_history: res_count = False - if len(obj.message_ids) <= action.trg_max_history: + history_ids = filter(lambda x: x.history, obj.message_ids) + if len(history_ids) <= action.trg_max_history: res_count = True ok = ok and res_count return ok @@ -120,7 +121,11 @@ this if you want the rule to send an email to the partner."), write['email_cc'] = obj.email_cc+','+obj.act_email_cc else: write['email_cc'] = obj.act_email_cc - + + # Put state change by rule in communication history + if hasattr(obj, 'state') and action.act_state: + model_obj._history(cr, uid, [obj], _(action.act_state)) + model_obj.write(cr, uid, [obj.id], write, context) emails = [] diff --git a/addons/crm/crm_installer_view.xml b/addons/crm/crm_installer_view.xml index 5599eeff5d9..5fad3f41a3d 100644 --- a/addons/crm/crm_installer_view.xml +++ b/addons/crm/crm_installer_view.xml @@ -8,15 +8,15 @@ <field name="arch" type="xml"> <data> <form position="attributes"> - <attribute name="string">CRM Modules Configuration</attribute> + <attribute name="string">CRM Application Configuration</attribute> </form> <separator string="title" position="attributes"> - <attribute name="string">Configure Your CRM System</attribute> + <attribute name="string">Configure Your CRM Application</attribute> </separator> <xpath expr="//label[@string='description']" position="attributes"> - <attribute name="string">You can enhance OpenERP's basic CRM support with a few additional OpenERP applications</attribute> + <attribute name="string">Enhance your CRM basic Application with additional Addons.</attribute> </xpath> <xpath expr='//separator[@string="vsep"]' position='attributes'> <attribute name='rowspan'>13</attribute> @@ -49,7 +49,7 @@ </record> <record id="action_crm_installer" model="ir.actions.act_window"> - <field name="name">CRM Modules Installation</field> + <field name="name">CRM Application Configuration</field> <field name="type">ir.actions.act_window</field> <field name="res_model">crm.installer</field> <field name="view_id" ref="view_crm_installer"/> diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index 6e1b851f52a..95f81e0d813 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -174,6 +174,7 @@ <field name="message_ids" colspan="4" nolabel="1" mode="tree,form"> <tree string="Communication history"> <field name="display_text" string="History Information"/> + <field name="history" invisible="1"/> <button string="Reply" attrs="{'invisible': [('history', '!=', True)]}" name="%(crm.action_crm_send_mail)d" @@ -209,11 +210,15 @@ </notebook> </form> </field> - <button colspan="2" string="Send New Email" + <button string="Add New Note" + name="%(crm.action_crm_add_note)d" + context="{'model': 'crm.lead' }" + icon="terp-document-new" type="action" /> + <button string="Send New Email" name="%(crm.action_crm_send_mail)d" context="{'mail':'new', 'model': 'crm.lead'}" icon="terp-mail-message-new" type="action" /> - <button colspan="2" string="Forward" + <button string="Forward" name="%(crm_lead_forward_to_partner_act)d" icon="terp-mail-forward" type="action" /> </page> diff --git a/addons/crm/crm_opportunity_view.xml b/addons/crm/crm_opportunity_view.xml index 0be6e34e1a6..d5a4963ed66 100644 --- a/addons/crm/crm_opportunity_view.xml +++ b/addons/crm/crm_opportunity_view.xml @@ -130,6 +130,7 @@ <field name="message_ids" colspan="4" nolabel="1" mode="tree,form"> <tree string="Communication history"> <field name="display_text" string="History Information"/> + <field name="history" invisible="1"/> <button string="Reply" attrs="{'invisible': [('history', '!=', True)]}" name="%(crm.action_crm_send_mail)d" @@ -165,11 +166,15 @@ </notebook> </form> </field> - <button colspan="2" string="Send New Email" + <button string="Add New Note" + name="%(crm.action_crm_add_note)d" + context="{'model': 'crm.lead' }" + icon="terp-document-new" type="action" /> + <button string="Send New Email" name="%(crm.action_crm_send_mail)d" context="{'mail':'new', 'model': 'crm.lead'}" icon="terp-mail-message-new" type="action" /> - <button colspan="2" string="Forward" + <button string="Forward" name="%(crm_lead_forward_to_partner_act)d" icon="terp-mail-forward" type="action" /> </page> diff --git a/addons/crm/crm_view.xml b/addons/crm/crm_view.xml index 702fd2a0c5c..1235bcc095a 100644 --- a/addons/crm/crm_view.xml +++ b/addons/crm/crm_view.xml @@ -532,6 +532,7 @@ <field name="message_ids" colspan="4" nolabel="1" mode="tree,form"> <tree string="Communication history"> <field name="display_text" string="History Information"/> + <field name="history" invisible="1"/> <button string="Reply" attrs="{'invisible': [('history', '!=', True)]}" name="%(crm.action_crm_send_mail)d" @@ -567,11 +568,15 @@ </notebook> </form> </field> - <button colspan="2" string="Send New Email" + <button string="Add New Note" + name="%(crm.action_crm_add_note)d" + context="{'model': 'crm.lead' }" + icon="terp-document-new" type="action" /> + <button string="Send New Email" name="%(crm.action_crm_send_mail)d" context="{'mail':'new', 'model': 'crm.case.custom'}" icon="terp-mail-message-new" type="action" /> - <button colspan="2" string="Forward to Partner" + <button string="Forward to Partner" name="%(crm_lead_forward_to_partner_act)d" icon="terp-mail-forward" type="action" /> </page> diff --git a/addons/crm/wizard/__init__.py b/addons/crm/wizard/__init__.py index 03ddbc43622..7b23d0eac3d 100644 --- a/addons/crm/wizard/__init__.py +++ b/addons/crm/wizard/__init__.py @@ -21,6 +21,7 @@ import crm_send_email import crm_forward_to_partner +import crm_add_note import crm_lead_to_partner import crm_lead_to_opportunity diff --git a/addons/crm/wizard/crm_add_note.py b/addons/crm/wizard/crm_add_note.py new file mode 100644 index 00000000000..9a8d4f2d4f3 --- /dev/null +++ b/addons/crm/wizard/crm_add_note.py @@ -0,0 +1,62 @@ +from crm import crm +from osv import fields, osv +from tools.translate import _ +import base64 + +AVAILABLE_STATES = crm.AVAILABLE_STATES + [('unchanged', 'Unchanged')] + + +class crm_add_note(osv.osv_memory): + """Adds a new note to the case.""" + _name = 'crm.add.note' + _description = "Add New Note" + + _columns = { + 'body': fields.text('Note Body', required=True), + 'state': fields.selection(AVAILABLE_STATES, string='Set New State To', + required=True), + 'attachment_ids' : fields.one2many('crm.send.mail.attachment', 'wizard_id'), + } + + def action_add(self, cr, uid, ids, context=None): + if not context: + context = {} + + if not context.get('active_model'): + raise osv.except_osv(_('Error'), _('Can not add note!')) + + model = context.get('active_model') + case_pool = self.pool.get(model) + + for obj in self.browse(cr, uid, ids, context=context): + case_list = case_pool.browse(cr, uid, context['active_ids'], + context=context) + case = case_list[0] + user_obj = self.pool.get('res.users') + user_name = user_obj.browse(cr, uid, [uid], context=context)[0].name + attach = [ + (x.name, base64.decodestring(x.binary)) for x in obj.attachment_ids + ] + case_pool.history(cr, uid, [case], _("Note"), history=False, + details=obj.body, email_from=user_name, attach=attach) + + if obj.state == 'unchanged': + pass + elif obj.state == 'done': + case_pool.case_close(cr, uid, [case.id]) + elif obj.state == 'draft': + case_pool.case_reset(cr, uid, [case.id]) + elif obj.state in ['cancel', 'open', 'pending']: + act = 'case_' + obj.state + getattr(case_pool, act)(cr, uid, [case.id]) + + return {} + + def default_get(self, cr, uid, fields, context=None): + """ + This function gets default values + """ + return {'state': u'unchanged'} + + +crm_add_note() diff --git a/addons/crm/wizard/crm_add_note_view.xml b/addons/crm/wizard/crm_add_note_view.xml new file mode 100644 index 00000000000..f218a4252c1 --- /dev/null +++ b/addons/crm/wizard/crm_add_note_view.xml @@ -0,0 +1,53 @@ +<?xml version="1.0"?> +<openerp> + <data> + +<!-- Add New Note view --> + + <record model="ir.ui.view" id="crm_add_new_note_view"> + <field name="name">crm.new.add.note.form</field> + <field name="model">crm.add.note</field> + <field name="type">form</field> + <field name="arch" type="xml"> + <form string="Add Note" col="4"> + <separator string="Add Note" colspan="6"/> + <notebook colspan="6"> + <page string="Note"> + <field name="body" nolabel="1" colspan="4" default_focus="1"/> + </page> + <page string="Attachments"> + <field name="attachment_ids" colspan="4" nolabel="1"> + <form string="Attachment"> + <field name="binary" filename="name" /> + <field name="name" /> + </form> + <tree string="Attachments"> + <field name="name" /> + </tree> + </field> + </page> + </notebook> + <separator string="" colspan="6"/> + <group colspan="6" col="4" > + <field name="state" /> + <button string="_Cancel" icon="gtk-cancel" special="cancel" /> + <button name="action_add" type="object" string="_Add" icon="gtk-ok" /> + </group> + </form> + </field> + </record> + +<!-- Add New Note action --> + + <record model="ir.actions.act_window" id="action_crm_add_note"> + <field name="name">Add Note</field> + <field name="res_model">crm.add.note</field> + <field name="view_type">form</field> + <field name="view_mode">form</field> + <field name="view_id" ref="crm_add_new_note_view"/> + <field name="target">new</field> + </record> + + </data> +</openerp> + diff --git a/addons/crm/wizard/crm_send_email.py b/addons/crm/wizard/crm_send_email.py index ae4e87f30ad..aadd607c154 100644 --- a/addons/crm/wizard/crm_send_email.py +++ b/addons/crm/wizard/crm_send_email.py @@ -28,6 +28,10 @@ import itertools import tools import re + +AVAILABLE_STATES = crm.AVAILABLE_STATES + [('unchanged', 'Unchanged')] + + class crm_send_new_email_attachment(osv.osv_memory): _name = 'crm.send.mail.attachment' @@ -51,7 +55,7 @@ class crm_send_new_email(osv.osv_memory): 'email_cc' : fields.char('CC', size=512, help="These addresses will receive a copy of this email. To modify the permanent CC list, edit the global CC field of this case"), 'subject': fields.char('Subject', size=512, required=True), 'body': fields.text('Message Body', required=True), - 'state': fields.selection(crm.AVAILABLE_STATES, string='Set New State To', required=True), + 'state': fields.selection(AVAILABLE_STATES, string='Set New State To', required=True), 'attachment_ids' : fields.one2many('crm.send.mail.attachment', 'wizard_id'), } diff --git a/addons/crm_claim/crm_claim_view.xml b/addons/crm_claim/crm_claim_view.xml index 1938b6bf056..44b1eb34fd8 100644 --- a/addons/crm_claim/crm_claim_view.xml +++ b/addons/crm_claim/crm_claim_view.xml @@ -205,10 +205,14 @@ </notebook> </form> </field> - <button colspan="4" string="Send New Email" - name="%(crm.action_crm_send_mail)d" - context="{'mail':'new', 'model': 'crm.claim'}" - icon="terp-mail-message-new" type="action" /> + <button string="Add New Note" + name="%(crm.action_crm_add_note)d" + context="{'model': 'crm.lead' }" + icon="terp-document-new" type="action" /> + <button string="Send New Email" + name="%(crm.action_crm_send_mail)d" + context="{'mail':'new', 'model': 'crm.claim'}" + icon="terp-mail-message-new" type="action" /> </page> <page string="Extra Info" groups="base.group_extended"> <field name="id" select="1"/> diff --git a/addons/crm_fundraising/crm_fundraising_view.xml b/addons/crm_fundraising/crm_fundraising_view.xml index 1e8b4072bab..84af1b141c9 100644 --- a/addons/crm_fundraising/crm_fundraising_view.xml +++ b/addons/crm_fundraising/crm_fundraising_view.xml @@ -161,6 +161,7 @@ <field name="message_ids" colspan="4" nolabel="1" mode="tree,form"> <tree string="Communication history"> <field name="display_text" string="History Information"/> + <field name="history" invisible="1"/> <button string="Reply" attrs="{'invisible': [('history', '!=', True)]}" name="%(crm.action_crm_send_mail)d" @@ -196,7 +197,11 @@ </notebook> </form> </field> - <button colspan="4" string="Send New Email" + <button string="Add New Note" + name="%(crm.action_crm_add_note)d" + context="{'model': 'crm.lead' }" + icon="terp-document-new" type="action" /> + <button string="Send New Email" name="%(crm.action_crm_send_mail)d" context="{'mail':'new', 'model': 'crm.fundraising'}" icon="terp-mail-message-new" type="action" /> diff --git a/addons/crm_helpdesk/crm_helpdesk_view.xml b/addons/crm_helpdesk/crm_helpdesk_view.xml index 31ba54f426f..375b758f9c7 100644 --- a/addons/crm_helpdesk/crm_helpdesk_view.xml +++ b/addons/crm_helpdesk/crm_helpdesk_view.xml @@ -98,6 +98,7 @@ <field name="message_ids" colspan="4" nolabel="1" mode="tree,form"> <tree string="Communication history"> <field name="display_text" string="History Information"/> + <field name="history" invisible="1"/> <button string="Reply" attrs="{'invisible': [('history', '!=', True)]}" name="%(crm.action_crm_send_mail)d" @@ -133,7 +134,11 @@ </notebook> </form> </field> - <button colspan="4" string="Send New Email" + <button string="Add New Note" + name="%(crm.action_crm_add_note)d" + context="{'model': 'crm.lead' }" + icon="terp-document-new" type="action" /> + <button string="Send New Email" name="%(crm.action_crm_send_mail)d" context="{'mail':'new', 'model': 'crm.helpdesk'}" icon="terp-mail-message-new" type="action" /> diff --git a/addons/delivery/__openerp__.py b/addons/delivery/__openerp__.py index 193bd0bcaee..ad88d552e6b 100644 --- a/addons/delivery/__openerp__.py +++ b/addons/delivery/__openerp__.py @@ -40,7 +40,7 @@ 'partner_view.xml' ], 'demo_xml': ['delivery_demo.xml'], - 'test':['test/delivery_test.yml',], + 'test':['test/delivery_test.yml','test/delivery_report.yml'], 'installable': True, 'active': False, 'certificate': '0033981912253', diff --git a/addons/delivery/test/delivery_report.yml b/addons/delivery/test/delivery_report.yml new file mode 100644 index 00000000000..ed3a859f23d --- /dev/null +++ b/addons/delivery/test/delivery_report.yml @@ -0,0 +1,8 @@ +- + In order to test the PDF reports defined on a Delievry, we will print a Delivery Order report +- + !python {model: stock.picking}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.sale.shipping').create(cr, uid, [ref('stock.stock_picking_1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'delievry-shipping'+format), 'wb+').write(data) diff --git a/addons/document/wizard/document_configuration_view.xml b/addons/document/wizard/document_configuration_view.xml index c6f40deb429..d922a4bcc1c 100644 --- a/addons/document/wizard/document_configuration_view.xml +++ b/addons/document/wizard/document_configuration_view.xml @@ -8,10 +8,10 @@ <field name="arch" type="xml"> <data> <form position="attributes"> - <attribute name="string">Auto Configure</attribute> + <attribute name="string">Knowledge Application Configuration</attribute> </form> <separator string="title" position="attributes"> - <attribute name="string">Resource Directory Configuration </attribute> + <attribute name="string">Configure Resource Directory</attribute> </separator> <xpath expr="//label[@string='description']" position="attributes"> <attribute name="string">Choose the following Resouces to auto directory configuration.</attribute> diff --git a/addons/document_ftp/wizard/ftp_configuration_view.xml b/addons/document_ftp/wizard/ftp_configuration_view.xml index df3aee360af..27df92ff515 100644 --- a/addons/document_ftp/wizard/ftp_configuration_view.xml +++ b/addons/document_ftp/wizard/ftp_configuration_view.xml @@ -15,10 +15,10 @@ <field name="arch" type="xml"> <data> <form position="attributes"> - <attribute name="string">FTP Server Configuration</attribute> + <attribute name="string">Knowledge Application Configuration</attribute> </form> <separator string="title" position="attributes"> - <attribute name="string">FTP Server Configuration</attribute> + <attribute name="string">Configure FTP Server</attribute> </separator> <xpath expr="//label[@string='description']" position="attributes"> <attribute name="string">Choose the address for the Document Management System's FTP server.</attribute> @@ -30,7 +30,7 @@ <group string="res_config_contents" position="replace"> <field name="host"/> </group> - <xpath expr="//button[@name='action_skip']" position="replace"/> + <xpath expr="//button[@name='action_skip']" position="replace"/> </data> </field> </record> diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml index e82da17e0f0..deb11c14575 100644 --- a/addons/event/event_view.xml +++ b/addons/event/event_view.xml @@ -373,6 +373,7 @@ <field name="message_ids" colspan="4" nolabel="1" mode="tree,form"> <tree string="Communication history"> <field name="display_text" string="History Information"/> + <field name="history" invisible="1"/> <button string="Reply" attrs="{'invisible': [('history', '!=', True)]}" name="%(crm.action_crm_send_mail)d" @@ -408,7 +409,11 @@ </notebook> </form> </field> - <button colspan="4" string="Send New Email" + <button string="Add New Note" + name="%(crm.action_crm_add_note)d" + context="{'model': 'crm.lead' }" + icon="terp-document-new" type="action" /> + <button string="Send New Email" name="%(crm.action_crm_send_mail)d" context="{'mail':'new', 'model': 'event.registration'}" icon="terp-mail-message-new" type="action" /> diff --git a/addons/hr/hr_installer.xml b/addons/hr/hr_installer.xml index 6ae8890a11f..ef7e3e4aad7 100644 --- a/addons/hr/hr_installer.xml +++ b/addons/hr/hr_installer.xml @@ -10,16 +10,16 @@ <field name="arch" type="xml"> <data> <form position="attributes"> - <attribute name="string">Human Resources Modules Configuration</attribute> + <attribute name="string">Human Resources Application Configuration</attribute> </form> <separator string="title" position="attributes"> - <attribute name="string">Select Human Resources Modules To Install</attribute> + <attribute name="string">Configure Your Human Resources Application</attribute> </separator> <xpath expr='//separator[@string="vsep"]' position='attributes'> <attribute name='string'></attribute> </xpath> <xpath expr="//label[@string='description']" position="attributes"> - <attribute name="string">You can enhance the base HR addon by installing few HR-related applications.</attribute> + <attribute name="string">You can enhance the base HR Application by installing few HR-related modules.</attribute> </xpath> <group colspan="8"> <field name="hr_holidays"/> @@ -40,7 +40,7 @@ </record> <record id="action_hr_installer" model="ir.actions.act_window"> - <field name="name">Human Resources Modules Installation</field> + <field name="name">Human Resources Application Configuration</field> <field name="type">ir.actions.act_window</field> <field name="res_model">hr.installer</field> <field name="view_id" ref="view_hr_installer"/> diff --git a/addons/hr_attendance/__openerp__.py b/addons/hr_attendance/__openerp__.py index 5a79566bcde..3714050cbdb 100644 --- a/addons/hr_attendance/__openerp__.py +++ b/addons/hr_attendance/__openerp__.py @@ -43,7 +43,9 @@ 'wizard/hr_attendance_sign_in_out_view.xml', ], 'demo_xml': ['hr_attendance_demo.xml'], - 'test': ['test/test_hr_attendance.yml'], + 'test': ['test/test_hr_attendance.yml', + 'test/hr_attendance_report.yml' + ], 'installable': True, 'active': False, 'certificate': '0063495605613', diff --git a/addons/hr_attendance/test/hr_attendance_report.yml b/addons/hr_attendance/test/hr_attendance_report.yml new file mode 100644 index 00000000000..d26f6ddb9bc --- /dev/null +++ b/addons/hr_attendance/test/hr_attendance_report.yml @@ -0,0 +1,19 @@ +- + In order to test the PDF reports defined on HR Attendance, we will print a report of HR Attendance By Month +- + !python {model: hr.employee}: | + import netsvc, tools, os, time + data_dict = {'model': 'hr.employee', 'form': {'month': time.gmtime()[1], 'year': time.gmtime()[0]}} + (data, format) = netsvc.LocalService('report.hr.attendance.bymonth').create(cr, uid, [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')], data_dict, {'active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')]}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'hr_attendance-by_month_report.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on HR Attendance, we will print a report of HR Attendance Error +- + !python {model: hr.employee}: | + import netsvc, tools, os, time + data_dict = {'model': 'hr.employee', 'form': {'init_date': time.strftime('%Y-01-01'), 'end_date':time.strftime('%Y-%m-%d'), 'emp_ids': [ref('hr.employee1')], 'max_delay': 120}} + (data, format) = netsvc.LocalService('report.hr.attendance.error').create(cr, uid, [ref('hr.employee1')], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'hr_attendance-error_report.'+format), 'wb+').write(data) diff --git a/addons/hr_evaluation/__openerp__.py b/addons/hr_evaluation/__openerp__.py index 63ea9a7bc22..f42321dc75c 100644 --- a/addons/hr_evaluation/__openerp__.py +++ b/addons/hr_evaluation/__openerp__.py @@ -40,6 +40,7 @@ ], "update_xml": [ "security/ir.model.access.csv", + "security/hr_evaluation_security.xml", "wizard/hr_evaluation_mail_view.xml", "hr_evaluation_view.xml", "report/hr_evaluation_report_view.xml" diff --git a/addons/hr_evaluation/security/hr_evaluation_security.xml b/addons/hr_evaluation/security/hr_evaluation_security.xml new file mode 100644 index 00000000000..49b0e19177b --- /dev/null +++ b/addons/hr_evaluation/security/hr_evaluation_security.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<openerp> + <data> + <record id="survey.menu_surveys" model="ir.ui.menu"> + <field eval="[(4,ref('base.group_hr_manager'))]" name="groups_id"/> + </record> + <record id="survey.menu_define_survey" model="ir.ui.menu"> + <field eval="[(4,ref('base.group_hr_manager'))]" name="groups_id"/> + </record> + <record id="survey.menu_survey_form" model="ir.ui.menu"> + <field eval="[(4,ref('base.group_hr_manager'))]" name="groups_id"/> + </record> + <record id="survey.menu_survey_page_form1" model="ir.ui.menu"> + <field eval="[(4,ref('base.group_hr_manager'))]" name="groups_id"/> + </record> + <record id="survey.menu_survey_type_form1" model="ir.ui.menu"> + <field eval="[(4,ref('base.group_hr_manager'))]" name="groups_id"/> + </record> + <record id="survey.menu_answer_surveys" model="ir.ui.menu"> + <field eval="[(4,ref('base.group_hr_manager'))]" name="groups_id"/> + </record> + <record id="survey.menu_run_survey_form" model="ir.ui.menu"> + <field eval="[(4,ref('base.group_hr_manager'))]" name="groups_id"/> + </record> + </data> +</openerp>
\ No newline at end of file diff --git a/addons/hr_evaluation/security/ir.model.access.csv b/addons/hr_evaluation/security/ir.model.access.csv index dd9737133b5..47cb2dbebd1 100644 --- a/addons/hr_evaluation/security/ir.model.access.csv +++ b/addons/hr_evaluation/security/ir.model.access.csv @@ -12,7 +12,26 @@ "access_hr_evaluation_plan_phase_system","hr_evaluation.plan.phase.system","model_hr_evaluation_plan_phase","base.group_system",1,1,1,1 "access_hr_evaluation_evaluation_system","hr_evaluation.evaluation.system","model_hr_evaluation_evaluation","base.group_system",1,0,0,0 "access_hr_evaluation_interview_system","hr.evaluation.interview.system","model_hr_evaluation_interview","base.group_system",1,0,0,0 +<<<<<<< TREE "access_hr_evaluation_evaluation_employee","hr_evaluation.evaluation.employee","model_hr_evaluation_evaluation","base.group_user",1,0,0,0 "access_hr_evaluation_interview_employee","hr.evaluation.interview.employee","model_hr_evaluation_interview","base.group_user",1,0,0,0 "access_hr_evaluation_user","hr_evaluation.user","model_hr_evaluation_plan","base.group_hr_user",1,0,0,0 "access_hr_evaluation_employee","hr_evaluation.employee","model_hr_evaluation_plan","base.group_user",1,0,0,0 +======= +"access_survey_type_hr_manager","survey.type","survey.model_survey_type","base.group_hr_manager",1,1,1,1 +"access_survey_hr_manager","survey.hr.manager","survey.model_survey","base.group_hr_manager",1,1,1,1 +"access_survey_history_manager","survey.history","survey.model_survey_history","base.group_hr_manager",1,1,1,1 +"access_survey_page_hr_manager","survey.page","survey.model_survey_page","base.group_hr_manager",1,1,1,1 +"access_survey_question_hr_manager","survey.question","survey.model_survey_question","base.group_hr_manager",1,1,1,1 +"access_survey_question_column_heading_hr_manager","survey.question.column.heading","survey.model_survey_question_column_heading","base.group_hr_manager",1,1,1,1 +"access_survey_answer_hr_manager","survey.answer","survey.model_survey_answer","base.group_hr_manager",1,1,1,1 +"access_survey_response_hr_manager","survey.response","survey.model_survey_response","base.group_hr_manager",1,1,1,1 +"access_survey_response_line_hr_manager","survey.response.line","survey.model_survey_response_line","base.group_hr_manager",1,1,1,1 +"access_survey_tbl_column_heading_hr_manager","survey.tbl.column.heading","survey.model_survey_tbl_column_heading","base.group_hr_manager",1,1,1,1 +"access_survey_response_answer_hr_manager","survey.response.answer","survey.model_survey_response_answer","base.group_hr_manager",1,1,1,1 +"access_survey_request_hr_manager","survey.request","survey.model_survey_request","base.group_hr_manager",1,1,1,1 +"access_survey_hr_user","survey.hr.user","survey.model_survey","base.group_hr_user",1,1,1,0 +"access_survey_answer_hr_user","survey.answer.hr.user","survey.model_survey_answer","base.group_hr_user",1,1,1,0 +"access_survey_response_answer_hr_user","survey.response.answer.hr.user","survey.model_survey_response_answer","base.group_hr_user",1,1,1,0 +"access_survey_type_hr_user","survey.type.hr.user","survey.model_survey_type","base.group_hr_user",1,1,1,0 +"access_survey_question_hr_user","survey.question.hr.user","survey.model_survey_question","base.group_hr_user",1,1,1,0>>>>>>> MERGE-SOURCE diff --git a/addons/hr_expense/__openerp__.py b/addons/hr_expense/__openerp__.py index 60e4d50a702..c9df8587153 100644 --- a/addons/hr_expense/__openerp__.py +++ b/addons/hr_expense/__openerp__.py @@ -56,7 +56,9 @@ 'demo_xml': [ 'hr_expense_demo.xml', ], - 'test': ['test/test_hr_expense.yml'], + 'test': ['test/test_hr_expense.yml', + 'test/hr_expense_report.yml', + ], 'installable': True, 'active': False, 'certificate': '0062479841789', diff --git a/addons/hr_expense/test/hr_expense_report.yml b/addons/hr_expense/test/hr_expense_report.yml new file mode 100644 index 00000000000..4c81ceb5976 --- /dev/null +++ b/addons/hr_expense/test/hr_expense_report.yml @@ -0,0 +1,8 @@ +- + In order to test the PDF reports defined on a HR Expense, we will print a HR Expense +- + !python {model: hr.expense.expense}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.hr.expense').create(cr, uid, [ref('hr_expense.hr_expense_expense_septemberexpenses0'),ref('hr_expense.hr_expense_expense_septemberexpenses1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'hr_expense-report.'+format), 'wb+').write(data)
\ No newline at end of file diff --git a/addons/hr_holidays/__openerp__.py b/addons/hr_holidays/__openerp__.py index 7facdda62d7..1f11388e96f 100644 --- a/addons/hr_holidays/__openerp__.py +++ b/addons/hr_holidays/__openerp__.py @@ -66,7 +66,9 @@ 'board_hr_manager_holidays_view.xml', ], 'demo_xml': ['hr_holidays_demo.xml',], - 'test': ['test/test_hr_holiday.yml'], + 'test': ['test/test_hr_holiday.yml', + 'test/hr_holidays_report.yml', + ], 'installable': True, 'active': False, 'certificate': '0086579209325', diff --git a/addons/hr_holidays/test/hr_holidays_report.yml b/addons/hr_holidays/test/hr_holidays_report.yml new file mode 100644 index 00000000000..9faf7358b53 --- /dev/null +++ b/addons/hr_holidays/test/hr_holidays_report.yml @@ -0,0 +1,14 @@ +- + In order to test the PDF reports defined on a HR Holidays, we will print HR Holidays +- + !python {model: hr.holidays}: | + import netsvc, tools, os, time + data_dict = {'model': 'ir.ui.menu', 'form': {'date_from': time.strftime('%Y-%m-01'), 'depts' : [ref('hr.dep_sales')],'holiday_type' : 'Validated' }} + (data, format) = netsvc.LocalService('report.holidays.summary').create(cr, uid, [], data_dict, {'active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')]}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'hr_holidays-dept_summary_report.'+format), 'wb+').write(data) + + data_dict = {'model': 'hr.employee', 'form': {'date_from': time.strftime('%Y-%m-01'), 'depts' : [ref('hr.dep_sales')],'holiday_type' : 'Validated','emp':[ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')] }} + (data, format) = netsvc.LocalService('report.holidays.summary').create(cr, uid, [], data_dict, {'active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')]}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'hr_holidays-employee_summary_report.'+format), 'wb+').write(data)
\ No newline at end of file diff --git a/addons/hr_payroll/__openerp__.py b/addons/hr_payroll/__openerp__.py index b7886da2df0..ab814ed80c2 100644 --- a/addons/hr_payroll/__openerp__.py +++ b/addons/hr_payroll/__openerp__.py @@ -60,6 +60,7 @@ 'test/payslip.yml', 'test/payment_advice.yml', 'test/payroll_register.yml', + 'test/hr_payroll_report.yml', ], 'demo_xml': [ 'hr_payroll_demo.xml' diff --git a/addons/hr_payroll/hr_payroll_demo.xml b/addons/hr_payroll/hr_payroll_demo.xml index f68cd2796a3..02efe0c53e8 100644 --- a/addons/hr_payroll/hr_payroll_demo.xml +++ b/addons/hr_payroll/hr_payroll_demo.xml @@ -73,6 +73,7 @@ <field name="name">First Contract</field> <field name="type_id" ref="hr_contract.hr_contract_type_emp"/> <field name="date_start" eval="time.strftime('%Y-%m')+'-1'"/> + <field name="date_end" eval="time.strftime('%Y')+'-12-31'"/> <field name="struct_id" ref="hr_payroll.structure_001"/> <field name="employee_id" ref="hr_employee_bonamy0"/> <field name="notes">This is a First Contract</field> diff --git a/addons/hr_payroll/test/hr_payroll_report.yml b/addons/hr_payroll/test/hr_payroll_report.yml new file mode 100644 index 00000000000..35020d30ceb --- /dev/null +++ b/addons/hr_payroll/test/hr_payroll_report.yml @@ -0,0 +1,39 @@ +- + In order to test the PDF reports defined on HR Payroll, we will print Employees' Salary Structure +- + !python {model: hr.employee}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.salary.structure').create(cr, uid, [ref('hr_payroll.hr_employee_bonamy0')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-salary_structure.'+format), 'wb+').write(data) + +- + Print HR Payslip +- + !python {model: hr.payslip}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.payslip.pdf').create(cr, uid, [ref('hr_payroll.hr_payslip_salaryslipofbonamyforjune0')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-payslip_report.'+format), 'wb+').write(data) + +- + Print HR Employee Salary Details +- + !python {model: hr.payslip}: | + import netsvc, tools, os, time + emp_ids = [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3'),ref('hr_payroll.hr_employee_bonamy0')] + data_dict = {'model': 'ir.ui.menu', 'form': {'fiscalyear_id': ref('account.data_fiscalyear'), 'employee_ids': emp_ids, 'ids':emp_ids }} + (data, format) = netsvc.LocalService('report.employees.salary').create(cr, uid, [], data_dict, {'active_ids': emp_ids}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-employee_salary_detail_report.'+format), 'wb+').write(data) +- + Print HR Employee Salary Details Annual basis +- + !python {model: hr.payslip}: | + import netsvc, tools, os, time + emp_ids = [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3'),ref('hr_payroll.hr_employee_bonamy0')] + data_dict = {'model': 'hr.payslip', 'form': {'fiscalyear_id': ref('account.data_fiscalyear'), 'salary_on': 'current_month', 'employee_ids': emp_ids, 'ids':emp_ids}} + (data, format) = netsvc.LocalService('report.year.salary').create(cr, uid, [], data_dict,{'active_ids': emp_ids} ) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-employee_yearly_salary_detail_report.'+format), 'wb+').write(data) + diff --git a/addons/hr_payroll/test/payment_advice.yml b/addons/hr_payroll/test/payment_advice.yml index a571cf63272..2d9fb8465c5 100644 --- a/addons/hr_payroll/test/payment_advice.yml +++ b/addons/hr_payroll/test/payment_advice.yml @@ -53,3 +53,12 @@ from tools.translate import _ advice_id=self.browse(cr, uid, ref("hr_payroll_advice_advice0")) assert(advice_id.state == 'confirm'), _('State not changed!') + +- + Print Payroll Advice +- + !python {model: hr.payroll.advice}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.payroll.advice').create(cr, uid, [ref('hr_payroll_advice_advice0')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-payroll-advice.'+format), 'wb+').write(data) diff --git a/addons/hr_payroll/test/payroll_register.yml b/addons/hr_payroll/test/payroll_register.yml index b8935fb287c..7327688d22a 100644 --- a/addons/hr_payroll/test/payroll_register.yml +++ b/addons/hr_payroll/test/payroll_register.yml @@ -1,6 +1,5 @@ - I test the 'Payroll Register' in order to check the hr_payroll in OpenERP -- I create a new employee “Keith” - !record {model: hr.employee, id: hr_employee_keith0}: @@ -62,3 +61,12 @@ from tools.translate import _ reg_brw=self.browse(cr, uid, ref("hr_payroll_register_payroll0")) assert(reg_brw.state == 'hr_check'), _('State not changed!') + +- + Print HR Payroll Register +- + !python {model: hr.payroll.register}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.hr.payroll.register.sheet').create(cr, uid, [ref('hr_payroll_register_payroll0')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-register_report.'+format), 'wb+').write(data) diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 8aaf6f9cbd7..5ecb50a828c 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -144,6 +144,7 @@ <field name="message_ids" colspan="4" nolabel="1" mode="tree,form"> <tree string="Communication history"> <field name="display_text" string="History Information"/> + <field name="history" invisible="1"/> <button string="Reply" attrs="{'invisible': [('history', '!=', True)]}" name="%(crm.action_crm_send_mail)d" @@ -179,13 +180,14 @@ </notebook> </form> </field> - <button colspan="2" string="Send New Email" + <button string="Add New Note" + name="%(crm.action_crm_add_note)d" + context="{'model': 'crm.lead' }" + icon="terp-document-new" type="action" /> + <button string="Send New Email" name="%(crm.action_crm_send_mail)d" context="{'mail':'new', 'model': 'hr.applicant'}" icon="terp-mail-message-new" type="action" /> - <button colspan="2" string="Forward" - name="%(crm.crm_lead_forward_to_partner_act)d" - icon="terp-mail-forward" type="action" /> </page> <page string="Notes"> <field name="description" nolabel="1" colspan="4"/> diff --git a/addons/hr_recruitment/report/hr_recruitment_report_view.xml b/addons/hr_recruitment/report/hr_recruitment_report_view.xml index a789206b518..edb00d1f727 100644 --- a/addons/hr_recruitment/report/hr_recruitment_report_view.xml +++ b/addons/hr_recruitment/report/hr_recruitment_report_view.xml @@ -130,7 +130,7 @@ <field name="context">{'search_default_month':1,'search_default_User':1,'search_default_user_id':uid,'group_by_no_leaf':1,'group_by':[]}</field> <field name="search_view_id" ref="view_hr_recruitment_report_search"/> </record> - <menuitem id="hr.menu_hr_reporting" name="Reporting" parent="hr.menu_hr_root" sequence="10"/> + <menuitem id="hr.menu_hr_reporting" name="Reporting" parent="hr.menu_hr_root" sequence="10" groups="base.group_hr_manager"/> <menuitem action="action_hr_recruitment_report_all" id="menu_hr_recruitment_report_all" parent="hr.menu_hr_reporting" sequence="1"/> </data> diff --git a/addons/hr_timesheet/__openerp__.py b/addons/hr_timesheet/__openerp__.py index c7207b6761c..90ddc25fff6 100644 --- a/addons/hr_timesheet/__openerp__.py +++ b/addons/hr_timesheet/__openerp__.py @@ -50,7 +50,9 @@ to set up a management by affair. 'wizard/hr_timesheet_sign_in_out_view.xml', ], 'demo_xml': ['hr_timesheet_demo.xml'], - 'test': ['test/test_hr_timesheet.yml'], + 'test': ['test/test_hr_timesheet.yml', + 'test/hr_timesheet_report.yml', + ], 'installable': True, 'active': False, 'certificate': '0071405533469', diff --git a/addons/hr_timesheet/hr_timesheet_view.xml b/addons/hr_timesheet/hr_timesheet_view.xml index cf5ed18c0fa..9a0384bc0a6 100644 --- a/addons/hr_timesheet/hr_timesheet_view.xml +++ b/addons/hr_timesheet/hr_timesheet_view.xml @@ -31,17 +31,31 @@ <field name="type">form</field> <field name="arch" type="xml"> <form string="Timesheet Lines"> - <field colspan="4" name="name"/> + <group colspan="4" col="6"> + <field name="name"/> <field name="user_id" on_change="on_change_user_id(user_id)" required="1" select="1"/> <field name="date" select="1" on_change="on_change_date(date)"/> - <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)"/> - <newline/> - <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" required="1" domain="[('type','=','service')]"/> - <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)"/> - <field domain="[('type','=','normal'),('state', '<>', 'close'),('parent_id','!=',False)]" name="account_id" select="1" groups="base.group_extended"/> - <field name="amount"/> - <field name="general_account_id"/> - <field name="journal_id"/> + </group> + <notebook colspan="4"> + <page string="Information"> + <group colspan="2" col="2"> + <separator string="Product" colspan="2"/> + <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" required="1" domain="[('type','=','service')]"/> + <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)"/> + <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)"/> + </group> + <group colspan="2" col="2"> + <separator string="Accounting" colspan="2"/> + <field domain="[('type','=','normal'),('state', '<>', 'close'),('parent_id','!=',False)]" name="account_id" select="1" groups="base.group_extended"/> + <field name="amount"/> + <field name="general_account_id"/> + <field name="journal_id"/> + </group> + <group colspan="2" col="2"> + <separator string="Invoicing" colspan="2"/> + </group> + </page> + </notebook> </form> </field> </record> diff --git a/addons/hr_timesheet/security/ir.model.access.csv b/addons/hr_timesheet/security/ir.model.access.csv index 886cbc41e28..7c9efac13c8 100644 --- a/addons/hr_timesheet/security/ir.model.access.csv +++ b/addons/hr_timesheet/security/ir.model.access.csv @@ -7,8 +7,12 @@ "access_product_uom_hr_timesheet","product.uom.hr.timesheet","product.model_product_uom","base.group_hr_user",1,0,0,0 "access_hr_analytic_timesheet_manager","hr.analytic.timesheet.manager","model_hr_analytic_timesheet","base.group_hr_manager",1,1,1,1 "access_hr_analytic_timesheet_system","hr.analytic.timesheet.system","model_hr_analytic_timesheet","base.group_system",1,0,0,0 +<<<<<<< TREE "access_hr_account_analytic_line_manager","account.account.analytic.line.manager","account.model_account_analytic_line","base.group_hr_manager",1,1,1,1 "access_account_analytic_journal_manager","account.account.analytic.journal.manager","account.model_account_analytic_journal","base.group_hr_manager",1,1,1,1 "access_product_product_manager","product.product.manager","product.model_product_product","base.group_hr_manager",1,1,1,1 "access_product_template_hr_timesheet_manager","product.template.hr.timesheet.manager","product.model_product_template","base.group_hr_manager",1,1,1,1 "access_product_uom_hr_timesheet_manager","product.uom.hr.timesheet.manager","product.model_product_uom","base.group_hr_manager",1,1,1,1 +======= +"access_hr_analytic_timesheet_employee","hr.analytic.timesheet.employee","model_hr_analytic_timesheet","base.group_user",1,1,1,0 +>>>>>>> MERGE-SOURCE diff --git a/addons/hr_timesheet/test/hr_timesheet_report.yml b/addons/hr_timesheet/test/hr_timesheet_report.yml new file mode 100644 index 00000000000..811858eb7f2 --- /dev/null +++ b/addons/hr_timesheet/test/hr_timesheet_report.yml @@ -0,0 +1,23 @@ +- + In order to test the PDF reports defined on HR Timesheet User Report, we will print a HR Timesheet User Report +- + !python {model: hr.employee}: | + import netsvc, tools, os, time + month = time.gmtime()[1] + year = time.gmtime()[0] + data_dict = {'model': 'ir.ui.menu', 'form': {'month': month, 'year' : year, 'user_id' : uid }} + (data, format) = netsvc.LocalService('report.hr.analytical.timesheet').create(cr, uid, [], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'hr_timesheet-user_report.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on HR Timesheet Users Report, we will print a HR Timesheet Users Report +- + !python {model: hr.employee}: | + import netsvc, tools, os, time + month = time.gmtime()[1] + year = time.gmtime()[0] + data_dict = {'model': 'ir.ui.menu', 'form': {'month': month, 'year' : year, 'user_ids' : [uid] }} + (data, format) = netsvc.LocalService('report.hr.analytical.timesheet_users').create(cr, uid, [], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'hr_timesheet-users_report.'+format), 'wb+').write(data)
\ No newline at end of file diff --git a/addons/hr_timesheet_invoice/__openerp__.py b/addons/hr_timesheet_invoice/__openerp__.py index f9be64cc454..f45490867c2 100644 --- a/addons/hr_timesheet_invoice/__openerp__.py +++ b/addons/hr_timesheet_invoice/__openerp__.py @@ -47,7 +47,9 @@ reports, eso.""", ], 'demo_xml': ['hr_timesheet_invoice_demo.xml', ], - 'test': ['test/test_hr_timesheet_invoice.yml'], + 'test': ['test/test_hr_timesheet_invoice.yml', + 'test/hr_timesheet_invoice_report.yml', + ], 'installable': True, 'active': False, 'certificate': '0056091842381', diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml index 276c19d7043..545199c3e38 100644 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml +++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml @@ -21,6 +21,7 @@ </field> </record> +<<<<<<< TREE <!--record id="view_account_analytic_account_form" model="ir.ui.view"> <field name="name">account.analytic.account.form</field> <field name="model">account.analytic.account</field> @@ -33,16 +34,18 @@ </field> </record--> +======= +>>>>>>> MERGE-SOURCE <record id="hr_timesheet_line_form" model="ir.ui.view"> <field name="name">hr.analytic.timesheet.form</field> <field name="model">hr.analytic.timesheet</field> <field name="type">form</field> <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_form"/> <field name="arch" type="xml"> - <field name="journal_id" position="after"> + <xpath expr='//separator[@string="Invoicing"]' position='after'> <field name="to_invoice"/> <field name="invoice_id"/> - </field> + </xpath> </field> </record> diff --git a/addons/hr_timesheet_invoice/security/ir.model.access.csv b/addons/hr_timesheet_invoice/security/ir.model.access.csv index 619fc6344cf..7089e184f98 100644 --- a/addons/hr_timesheet_invoice/security/ir.model.access.csv +++ b/addons/hr_timesheet_invoice/security/ir.model.access.csv @@ -12,3 +12,5 @@ "access_report_analytic_account_close_system","report.analytic.account.close system","model_report_analytic_account_close","base.group_system",1,1,1,1 "access_report_account_analytic_line_to_invoice_system","report.account.analytic.line.to.invoice system","model_report_account_analytic_line_to_invoice","base.group_system",1,1,1,1 "access_report_timesheet_line","report.timesheet.line","model_report_timesheet_line","base.group_hr_manager",1,0,0,0 +"access_account_invoice_hr_user","account.invoice.hr.user","account.model_account_invoice","base.group_hr_user",1,1,1,0 +"access_account_fiscalyear_hr_user","account.fiscalyear.hr.user","account.model_account_fiscalyear","base.group_hr_user",1,1,1,0 diff --git a/addons/hr_timesheet_invoice/test/hr_timesheet_invoice_report.yml b/addons/hr_timesheet_invoice/test/hr_timesheet_invoice_report.yml new file mode 100644 index 00000000000..ecdd486a65e --- /dev/null +++ b/addons/hr_timesheet_invoice/test/hr_timesheet_invoice_report.yml @@ -0,0 +1,20 @@ +- + In order to test the PDF reports defined on HR Timesheet Account Analytic Profit, we will print report of HR Timesheet Account Analytic Profit +- + !python {model: account.analytic.line}: | + import netsvc, tools, os, time + data_dict = {'model': 'ir.ui.menu', 'form': {'date_from': time.strftime('%Y-%m-01'), 'employee_ids': [[6,0,[ref('hr.employee1'), ref('hr.employee2'),ref('hr.employee3')]]], 'journal_ids': [[6,0,[ref('account.cose_journal_sale'),ref('account.exp'),ref('account.sit')]]], 'date_to': time.strftime('%Y-%m-%d')}} + (data, format) = netsvc.LocalService('report.account.analytic.profit').create(cr, uid, [], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'hr_timesheet_invoice-account_analytic_profit_report.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on HR Cost Ledger, we will print report of HR Cost Ledger +- + !python {model: account.analytic.account}: | + import netsvc, tools, os, time + acc_ids = [ref('account.analytic_absences'),ref('account.analytic_internal'),ref('account.analytic_sednacom'),ref('account.analytic_thymbra'),ref('account.analytic_partners_camp_to_camp')] + data_dict = {'model': 'ir.ui.menu', 'form': {'date1': time.strftime('%Y-01-01'), 'date2': time.strftime('%Y-%m-%d')}} + (data, format) = netsvc.LocalService('report.hr.timesheet.invoice.account.analytic.account.cost_ledger').create(cr, uid, acc_ids, data_dict, {'active_ids': acc_ids}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'hr_timesheet_invoice-cost_ledger_report.'+format), 'wb+').write(data) diff --git a/addons/hr_timesheet_sheet/security/ir.model.access.csv b/addons/hr_timesheet_sheet/security/ir.model.access.csv index 3ca4d966f78..de19d325f5f 100644 --- a/addons/hr_timesheet_sheet/security/ir.model.access.csv +++ b/addons/hr_timesheet_sheet/security/ir.model.access.csv @@ -6,7 +6,7 @@ "access_hr_timesheet_sheet_sheet_manager","hr_timesheet_sheet.sheet.manager","model_hr_timesheet_sheet_sheet","base.group_hr_manager",1,1,1,1 "access_hr_timesheet_sheet_sheet_system","hr_timesheet_sheet.sheet.system","model_hr_timesheet_sheet_sheet","base.group_system",1,0,0,0 "access_timesheet_report_manager","timesheet.report.manager","model_timesheet_report","base.group_hr_manager",1,1,1,1 -"access_hr_timesheet_sheet_sheet_employee","hr_timesheet_sheet.sheet.employee","model_hr_timesheet_sheet_sheet","base.group_user",1,0,0,0 +"access_hr_timesheet_sheet_sheet_employee","hr_timesheet_sheet.sheet.employee","model_hr_timesheet_sheet_sheet","base.group_user",1,1,1,0 "access_hr_timesheet_sheet_sheet_day_manager","hr_timesheet_sheet.sheet.day.manager","model_hr_timesheet_sheet_sheet_day","base.group_hr_manager",1,1,1,1 "access_hr_timesheet_sheet_sheet_account_manager","hr_timesheet_sheet.sheet.account.manager","model_hr_timesheet_sheet_sheet_account","base.group_hr_manager",1,1,1,1 "access_hr_timesheet_sheet_sheet_day_employee","hr_timesheet_sheet.sheet.day.employee","model_hr_timesheet_sheet_sheet_day","base.group_user",1,0,0,0 diff --git a/addons/knowledge/knowledge_installer.xml b/addons/knowledge/knowledge_installer.xml index 7f99329688d..681bf2253d5 100644 --- a/addons/knowledge/knowledge_installer.xml +++ b/addons/knowledge/knowledge_installer.xml @@ -8,19 +8,19 @@ <field name="arch" type="xml"> <data> <form position="attributes"> - <attribute name="string">Knowledge Modules Configuration</attribute> + <attribute name="string">Knowledge Application Configuration</attribute> </form> <separator string="title" position="attributes"> <attribute name="string" - >Knowledge Management</attribute> + >Configure Your Knowledge Application</attribute> </separator> <xpath expr='//separator[@string="vsep"]' position='attributes'> <attribute name='string'></attribute> </xpath> <xpath expr="//label[@string='description']" position="attributes"> - <attribute name="string">You can select various OpenERP applications which will help you and your employees to store and share information.</attribute> + <attribute name="string">Share information within the company with these specific Addons.</attribute> </xpath> <group colspan="8" position="replace"> <group colspan="4"> @@ -40,7 +40,7 @@ </record> <record id="action_knowledge_installer" model="ir.actions.act_window"> - <field name="name">Knowledge Modules Installation</field> + <field name="name">Knowledge Application Configuration</field> <field name="type">ir.actions.act_window</field> <field name="res_model">knowledge.installer</field> <field name="view_id" ref="view_knowledge_installer"/> diff --git a/addons/l10n_ch/__openerp__.py b/addons/l10n_ch/__openerp__.py index de378528b33..1af2e70ca59 100644 --- a/addons/l10n_ch/__openerp__.py +++ b/addons/l10n_ch/__openerp__.py @@ -94,6 +94,9 @@ TODO : "account_journal_view.xml", "security/ir.model.access.csv", ], + 'test' : [ + 'test/l10n_ch_report.yml', + ], "active": False, "installable": True, } diff --git a/addons/l10n_ch/test/l10n_ch_report.yml b/addons/l10n_ch/test/l10n_ch_report.yml new file mode 100644 index 00000000000..49c058a4bc8 --- /dev/null +++ b/addons/l10n_ch/test/l10n_ch_report.yml @@ -0,0 +1,17 @@ +- + In order to test the PDF reports defined on a l10n_ch, we will print BVR Report +- + !python {model: account.invoice}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.l10n_ch.bvr').create(cr, uid, [ref('account.test_invoice_1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'l10ch-bvr_report.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a l10n_ch, we will print a BVR Invoice Report +- + !python {model: account.invoice}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.l10n_ch.invoice.bvr').create(cr, uid, [ref('account.test_invoice_1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'l10ch-bvr_invoice_report.'+format), 'wb+').write(data) diff --git a/addons/l10n_fr/__openerp__.py b/addons/l10n_fr/__openerp__.py index f96945a8bc8..0de26734781 100644 --- a/addons/l10n_fr/__openerp__.py +++ b/addons/l10n_fr/__openerp__.py @@ -48,8 +48,9 @@ Credits: Sistheo Zeekom CrysaLEAD "security/ir.model.access.csv", "wizard/fr_report_bilan_view.xml", "wizard/fr_report_compute_resultant_view.xml", - + ], + "test": ['test/l10n_fr_report.yml'], "demo_xml" : [], "certificate" : "00435321693876313629", "active": False, diff --git a/addons/l10n_fr/test/l10n_fr_report.yml b/addons/l10n_fr/test/l10n_fr_report.yml new file mode 100644 index 00000000000..ddc95595175 --- /dev/null +++ b/addons/l10n_fr/test/l10n_fr_report.yml @@ -0,0 +1,26 @@ +- + In order to test Generate Fiscalyear Opening Entries wizard of OpenERP I first create a fiscalyear "Fiscal Year 2011" to which the entries will move +- + !record {model: account.fiscalyear, id: account_fiscalyear_01}: + code: FY2011 + company_id: base.main_company + date_start: '2012-01-01' + date_stop: '2012-12-31' + name: Fiscal Year 2012 +- + In order to test the PDF reports defined on a l10n_fr, we will print an Account Move Line Report for l10n_fr +- + !python {model: account.move.line}: | + import netsvc, tools, os, time + (data, format) = netsvc.LocalService('report.l10n.fr.bilan').create(cr, uid, [], {'model':'account.move.line', 'form':{'fiscalyear_id': ref('account_fiscalyear_01')}}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'l10n_fr-bilan_report.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a l10n_fr, we will print a Compute Resultant Report for l10n_fr +- + !python {model: account.move.line}: | + import netsvc, tools, os,time + (data, format) = netsvc.LocalService('report.l10n.fr.compute_resultant').create(cr, uid, [], {'model':'account.move.line', 'form':{'fiscalyear_id': ref('account.data_fiscalyear')}}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'l10n_fr-compute_resultant_report.'+format), 'wb+').write(data) diff --git a/addons/l10n_lu/__openerp__.py b/addons/l10n_lu/__openerp__.py index 739f36c9ce4..d1f6ba49905 100644 --- a/addons/l10n_lu/__openerp__.py +++ b/addons/l10n_lu/__openerp__.py @@ -41,6 +41,7 @@ This module installs: 'account.tax.template.csv', 'wizard/print_vat_view.xml' ], + 'test': ['test/l10n_lu_report.yml'], 'demo_xml': ['account.report.report.csv'], 'installable': True, 'active': False, diff --git a/addons/l10n_lu/test/l10n_lu_report.yml b/addons/l10n_lu/test/l10n_lu_report.yml new file mode 100644 index 00000000000..43b1ce35df1 --- /dev/null +++ b/addons/l10n_lu/test/l10n_lu_report.yml @@ -0,0 +1,14 @@ +- + It is demo data for the account.tax.code +- + !record {model: account.tax.code, id: account_tax_code_id_r1}: + name: a + +- + In order to test the PDF reports defined on a l10u_lu, we will print a VAT Report +- + !python {model: res.partner}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.l10n_lu.tax.report.print').create(cr, uid, [], {'model':'ir.ui.menu', 'form':{'tax_code_id': ref('account_tax_code_id_r1'), 'period_id': ref('account.period_1')}}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'l10n_lu-vat_report.'+format), 'wb+').write(data) diff --git a/addons/lunch/__openerp__.py b/addons/lunch/__openerp__.py index ab540ad10d3..2e5c2489339 100644 --- a/addons/lunch/__openerp__.py +++ b/addons/lunch/__openerp__.py @@ -49,9 +49,8 @@ 'report/report_lunch_order_view.xml', ], "demo_xml": ['lunch_demo.xml'], - "test": ['test/test_lunch.yml'], + "test": ['test/test_lunch.yml', 'test/lunch_report.yml'], "installable": True, } -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file diff --git a/addons/lunch/test/lunch_report.yml b/addons/lunch/test/lunch_report.yml new file mode 100644 index 00000000000..2043afe7796 --- /dev/null +++ b/addons/lunch/test/lunch_report.yml @@ -0,0 +1,8 @@ +- + In order to test the PDF reports defined on a Lunch, we will print a Lunch Order Report +- + !python {model: lunch.order}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.lunch.order').create(cr, uid, [ref('lunch.lunch_order_0'),ref('lunch.lunch_order_1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'lunch-lunch_order_report.'+format), 'wb+').write(data) diff --git a/addons/mail_gateway/mail_gateway.py b/addons/mail_gateway/mail_gateway.py index 3a40aac2649..c8d75a3a873 100644 --- a/addons/mail_gateway/mail_gateway.py +++ b/addons/mail_gateway/mail_gateway.py @@ -122,6 +122,10 @@ class mailgate_thread(osv.osv): obj = self.pool.get('mailgate.message') for case in cases: + attachments = [] + for att in attach: + attachments.append(att_obj.create(cr, uid, {'name': att[0], 'datas': base64.encodestring(att[1])})) + partner_id = hasattr(case, 'partner_id') and (case.partner_id and case.partner_id.id or False) or False if not partner_id and case._name == 'res.partner': partner_id = case.id @@ -132,13 +136,12 @@ class mailgate_thread(osv.osv): 'partner_id': partner_id, 'res_id': case.id, 'date': time.strftime('%Y-%m-%d %H:%M:%S'), - 'message_id': message_id, + 'message_id': message_id, + 'description': details or (hasattr(case, 'description') and case.description or False), + 'attachment_ids': [(6, 0, attachments)] } - attachments = [] - if history: - for att in attach: - attachments.append(att_obj.create(cr, uid, {'name': att[0], 'datas': base64.encodestring(att[1])})) + if history: for param in (email, email_cc, email_bcc): if isinstance(param, list): param = ", ".join(param) diff --git a/addons/marketing/marketing_view.xml b/addons/marketing/marketing_view.xml index 7f679e7e1fd..b96ba8fb7e3 100644 --- a/addons/marketing/marketing_view.xml +++ b/addons/marketing/marketing_view.xml @@ -12,14 +12,14 @@ <field name="arch" type="xml"> <data> <form position="attributes"> - <attribute name="string">Marketing Modules Configuration</attribute> + <attribute name="string">Marketing Application Configuration</attribute> </form> <separator string="title" position="attributes"> - <attribute name="string">Select Marketing Modules to Install</attribute> + <attribute name="string">Configure Your Marketing Application</attribute> </separator> <xpath expr="//label[@string='description']" position="attributes"> - <attribute name="string">OpenERP provides tools to automate your leads process, design marketing campaigns and profile efficiently your customers.</attribute> + <attribute name="string">OpenERP provides Addons to better manage your sales and marketing processes. Select the ones you would be interested in.</attribute> </xpath> <xpath expr='//separator[@string="vsep"]' position='attributes'> <attribute name='rowspan'>13</attribute> @@ -39,7 +39,7 @@ </record> <record id="action_marketing_installer" model="ir.actions.act_window"> - <field name="name">Marketing Modules Installation</field> + <field name="name">Marketing Applications Configuration</field> <field name="type">ir.actions.act_window</field> <field name="res_model">marketing.installer</field> <field name="view_id" ref="view_marketing_installer"/> diff --git a/addons/mrp/__openerp__.py b/addons/mrp/__openerp__.py index f8630065598..c56466501e0 100644 --- a/addons/mrp/__openerp__.py +++ b/addons/mrp/__openerp__.py @@ -92,7 +92,8 @@ 'test/mrp_packs.yml', 'test/mrp_phantom_bom.yml', 'test/mrp_production_order.yml', - + 'test/mrp_report.yml', + ], 'installable': True, 'active': False, diff --git a/addons/mrp/mrp_installer.xml b/addons/mrp/mrp_installer.xml index bcec9af75f6..d317cf6face 100644 --- a/addons/mrp/mrp_installer.xml +++ b/addons/mrp/mrp_installer.xml @@ -8,15 +8,15 @@ <field name="arch" type="xml"> <data> <form position="attributes"> - <attribute name="string">MRP Modules Configuration</attribute> + <attribute name="string">MRP Application Configuration</attribute> </form> <separator string="title" position="attributes"> - <attribute name="string">Manufacturing Resource Planning</attribute> + <attribute name="string">Configure Your Manufacturing Resource Planning Application</attribute> </separator> <xpath expr="//label[@string='description']" position="attributes"> - <attribute name="string">After having installed the core manufacturing application, you can extend it depending on the needs of your MRP's organization</attribute> + <attribute name="string">Add more functionalities to the core Manufacturing Application with the following addons.</attribute> </xpath> <xpath expr='//separator[@string="vsep"]' position='attributes'> <attribute name='string'></attribute> @@ -36,7 +36,7 @@ </record> <record id="action_mrp_installer" model="ir.actions.act_window"> - <field name="name">MRP Modules Installation</field> + <field name="name">MRP Applications Configuration</field> <field name="type">ir.actions.act_window</field> <field name="res_model">mrp.installer</field> <field name="view_id" ref="view_mrp_installer"/> diff --git a/addons/mrp/test/mrp_report.yml b/addons/mrp/test/mrp_report.yml new file mode 100644 index 00000000000..db9a83d495b --- /dev/null +++ b/addons/mrp/test/mrp_report.yml @@ -0,0 +1,35 @@ +- + In order to test the PDF reports defined on a MRP, we will print a BOM Structure Report +- + !python {model: mrp.bom}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.bom.structure').create(cr, uid, [ref('mrp.mrp_bom_0'),ref('mrp.mrp_bom_1'),ref('mrp.mrp_bom_2'),ref('mrp.mrp_bom_23'),ref('mrp.mrp_bom_1901'),ref('mrp.mrp_bom_assemblysection0'),ref('mrp.mrp_bom_sidepanel0'),ref('mrp.mrp_bom_defaultbomforshelfofcm1'),ref('mrp.mrp_bom_sidepanel3')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'mrp-bom_structure_report.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a MRP, we will print Production Order Report +- + !python {model: mrp.production}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.mrp.production.order').create(cr, uid, [ref('mrp.mrp_production_mo1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'mrp-production_order_report.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a MRP, we will print Product Price Report +- + !python {model: product.product}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.product.price').create(cr, uid, [1,2,3,5], {'model':'product.product', 'form':{'number': 1}}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'mrp-product_price_report.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a MRP, we will print Workcenter Load Report +- + !python {model: mrp.workcenter}: | + import netsvc, tools, os, time + (data, format) = netsvc.LocalService('report.mrp.workcenter.load').create(cr, uid, [ref('mrp_workcenter_0'),ref('mrp_workcenter_1')], {'model':'mrp.workcenter', 'form':{'time_unit': 'day', 'measure_unit': 'hours'}}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'mrp-workcenter_load_report.'+format), 'wb+').write(data) diff --git a/addons/mrp_operations/__openerp__.py b/addons/mrp_operations/__openerp__.py index d4d5cf98d08..5170cc4c627 100644 --- a/addons/mrp_operations/__openerp__.py +++ b/addons/mrp_operations/__openerp__.py @@ -61,7 +61,7 @@ 'process/mrp_operation_process.xml' ], 'demo_xml': ['mrp_operation_data.xml'], - 'test': ['test/mrp_operations.yml'], + 'test': ['test/mrp_operations.yml', 'test/mrp_operations_report.yml'], 'installable': True, 'active': False, 'certificate': '0056233813133', diff --git a/addons/mrp_operations/test/mrp_operations_report.yml b/addons/mrp_operations/test/mrp_operations_report.yml new file mode 100644 index 00000000000..f0a646adf4e --- /dev/null +++ b/addons/mrp_operations/test/mrp_operations_report.yml @@ -0,0 +1,17 @@ +- + In order to test the PDF reports defined on a MRP Operations, we will print a Barcode Report +- + !python {model: mrp_operations.operation.code}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.mrp.code.barcode').create(cr, uid, [ref('mrp_operations.mrp_op_1'),ref('mrp_operations.mrp_op_2'),ref('mrp_operations.mrp_op_3'),ref('mrp_operations.mrp_op_4'),ref('mrp_operations.mrp_op_5')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'mrp_operations-barcode_report.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a MRP Operations, we will print Workcenter's Barcode Report +- + !python {model: mrp.workcenter}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.mrp.wc.barcode').create(cr, uid, [ref('mrp.mrp_workcenter_0'),ref('mrp.mrp_workcenter_1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'mrp_operations-workcenter_barcode_report.'+format), 'wb+').write(data) diff --git a/addons/mrp_repair/__openerp__.py b/addons/mrp_repair/__openerp__.py index c9a4068f925..4313ae1a062 100644 --- a/addons/mrp_repair/__openerp__.py +++ b/addons/mrp_repair/__openerp__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # @@ -15,7 +15,7 @@ # 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/>. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # ############################################################################## @@ -31,13 +31,13 @@ * Invoicing (products and/or services) * Warranty concept * Repair quotation report - * Notes for the technician and for the final customer + * Notes for the technician and for the final customer """, 'author': 'OpenERP SA', 'depends': ['mrp', 'sale', 'account'], 'update_xml': [ 'security/ir.model.access.csv', - 'mrp_repair_sequence.xml', + 'mrp_repair_sequence.xml', 'wizard/mrp_repair_cancel_view.xml', 'wizard/mrp_repair_make_invoice_view.xml', 'mrp_repair_view.xml', @@ -45,7 +45,7 @@ 'mrp_repair_report.xml', ], 'demo_xml': [], - 'test': ['test/test_mrp_repair.yml'], + 'test': ['test/test_mrp_repair.yml', 'test/mrp_repair_report.yml'], 'installable': True, 'active': False, 'certificate': '0060814381277', diff --git a/addons/mrp_repair/report/order.rml b/addons/mrp_repair/report/order.rml index dae2a25ec0e..21ac0dec954 100644 --- a/addons/mrp_repair/report/order.rml +++ b/addons/mrp_repair/report/order.rml @@ -386,7 +386,7 @@ <blockTable colWidths="534.0" style="Table8"> <tr> <td> - <para style="P3">[[ format(o.quotation_notes) or removeParentNode('blockTable') ]]</para> + <para style="P3">[[ format(o.quotation_notes or '') or removeParentNode('blockTable') ]]</para> </td> </tr> </blockTable> diff --git a/addons/mrp_repair/test/mrp_repair_report.yml b/addons/mrp_repair/test/mrp_repair_report.yml new file mode 100644 index 00000000000..cc6600c6704 --- /dev/null +++ b/addons/mrp_repair/test/mrp_repair_report.yml @@ -0,0 +1,8 @@ +- + In order to test the PDF reports defined on a MRP Repair, we will print an Order Report +- + !python {model: mrp.repair}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.repair.order').create(cr, uid, [ref('mrp_repair.mrp_repair_rma0')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'mrp_repair-order_report.'+format), 'wb+').write(data) diff --git a/addons/outlook/installer.py b/addons/outlook/installer.py index aeda5e4e754..f042ce9c94e 100755 --- a/addons/outlook/installer.py +++ b/addons/outlook/installer.py @@ -40,7 +40,7 @@ class outlook_installer(osv.osv_memory): _columns = { 'name':fields.char('File name', size=34), 'doc_name':fields.char('File name', size=64), - 'outlook':fields.boolean('Outlook Module ', help="Allows you to select an object that you’d like to add to your email and its attachments."), + 'outlook':fields.boolean('Outlook Plug-in ', help="Allows you to select an object that you’d like to add to your email and its attachments."), 'plugin_file':fields.binary('Outlook Plug-in', readonly=True, help="outlook plug-in file. Save as this file and install this plug-in in outlook."), 'doc_file':fields.binary('Installation Manual', help="The documentation file :- how to install Outlook Plug-in.", readonly=True), 'description':fields.text('Description', readonly=True) diff --git a/addons/outlook/outlook_installer.xml b/addons/outlook/outlook_installer.xml index 1b20945d816..99b440bf89a 100755 --- a/addons/outlook/outlook_installer.xml +++ b/addons/outlook/outlook_installer.xml @@ -12,13 +12,19 @@ <attribute name="string">Outlook Plug-In Configuration</attribute> </form> <separator string="title" position="attributes"> - <attribute name="string">Outlook</attribute> + <attribute name="string">Outlook Plug-In</attribute> </separator> <xpath expr="//label[@string='description']" position="attributes"> <attribute name="string">This plug-in allows you to link your e-mail to OpenERP's documents. You can attach it to any existing one in OpenERP or create a new one.</attribute> </xpath> - <xpath expr="//button[@string='Install Modules']" position="attributes"> - <attribute name="string">Configure</attribute> + <xpath expr="//button[@string='Install Modules']" position="replace"> + <button colspan="1" icon="gtk-close" special="cancel" string="_Close" invisible="not context.get('menu',False)"/> + <button name="action_next" icon="gtk-go-forward" + type="object" string="Configure" colspan="1" invisible="context.get('menu',False)"/> + </xpath> + <xpath expr="//button[@string='Skip']" position="replace"> + <button name="action_skip" icon="gtk-jump-to" special="cancel" + type="object" string="Skip" colspan="1" invisible="context.get('menu',False)"/> </xpath> <xpath expr='//separator[@string="vsep"]' position='attributes'> <attribute name='string'></attribute> @@ -43,7 +49,7 @@ </record> <record id="action_outlook_installer" model="ir.actions.act_window"> - <field name="name">Outlook Module Installation</field> + <field name="name">Outlook Plug-In Configuration</field> <field name="type">ir.actions.act_window</field> <field name="res_model">outlook.installer</field> <field name="view_id" ref="view_outlook_installer"/> @@ -57,53 +63,15 @@ <field name="sequence">4</field> </record> - <!-- Configuration wizard. --> - - <record id="view_outlook_wizard" model="ir.ui.view"> - <field name="name">outlook.wizard</field> - <field name="model">outlook.installer</field> - <field name="type">form</field> - <field name="arch" type="xml"> - <form string= "Outlook Plug-In Configuration"> - <group colspan="4"> - <separator string="Configure Outlook Module" colspan="4"/> - <group colspan="4" col="10"> - <group colspan="2"> - <image name="gtk-dialog-info"/> - <newline/> - <label align="0.0" string="This Module allows you to select an object that you would like to add to your email and its attachments from MS Outlook. You can select a partner, a task, a project, an analytical account, or any other object and Archived selected mail in mailgate.messages with attachments" width="200"/> - </group> - <group colspan="8"> - <field name="outlook" invisible="1"/> - <field name="name" invisible="1"/> - <field name="doc_name" invisible="1"/> - <newline/> - <field name="plugin_file" filename="name"/> - <newline/> - <field name="doc_file" filename="doc_name"/> - <newline/> - <separator string="Outlook plugin installation note." colspan="4"/> - <field name="description" nolabel="1" colspan="8"/> - </group> - </group> - </group> - <separator string="" colspan="4"/> - <group colspan="4"> - <label align="0.0" string="" colspan="3"/> - <button colspan="1" icon="gtk-close" special="cancel" string="_Close"/> - </group> - </form> - </field> - </record> - <record id="action_outlook_wizard" model="ir.actions.act_window"> - <field name="name">Outlook Module Installation</field> + <field name="name">Outlook Plug-In Configuration</field> <field name="type">ir.actions.act_window</field> <field name="res_model">outlook.installer</field> - <field name="view_id" ref="view_outlook_wizard"/> + <field name="view_id" ref="view_outlook_installer"/> <field name="view_type">form</field> <field name="view_mode">form</field> <field name="target">new</field> + <field name="context">{'menu':True}</field> </record> <menuitem id="base.menu_base_config_mail" @@ -118,7 +86,7 @@ <menuitem id="menu_base_config_plugins_outlook" action="action_outlook_wizard" - name="Outlook" + name="Outlook Plug-In" parent="base.menu_base_config_plugins" sequence="10" /> </data> diff --git a/addons/point_of_sale/__openerp__.py b/addons/point_of_sale/__openerp__.py index cab0fb40dc0..ad466b12522 100644 --- a/addons/point_of_sale/__openerp__.py +++ b/addons/point_of_sale/__openerp__.py @@ -73,7 +73,9 @@ Main features : 'statement_report.xml', ], 'demo_xml': ['pos_demo.xml','singer_statement_demo.xml','multi_company_stock_data.xml',], - 'test':['test/pos_test.yml',], + 'test':['test/pos_test.yml', + 'test/pos_report.yml', + ], 'installable': True, } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/point_of_sale/pos_demo.xml b/addons/point_of_sale/pos_demo.xml index 14710cf8f37..18029826008 100644 --- a/addons/point_of_sale/pos_demo.xml +++ b/addons/point_of_sale/pos_demo.xml @@ -1,6 +1,74 @@ <?xml version="1.0"?> <openerp> <data> - + + <!--Resource: pos.order--> + + <record id="order_pos1" model="pos.order"> + <field model="sale.shop" name="shop_id" search="[]"/> + <field model="res.users" name="user_salesman_id" search="[]"/> + <field name="user_id" ref="base.user_root"/> + <field model="res.partner" name="partner_id" search="[]"/> + <field name="price_type">tax_excluded</field> + <field model="product.pricelist" name="pricelist_id" search="[]"/> + </record> + + <record id="order_pos2" model="pos.order"> + <field model="sale.shop" name="shop_id" search="[]"/> + <field model="res.users" name="user_salesman_id" search="[]"/> + <field name="user_id" ref="base.user_root"/> + <field model="res.partner" name="partner_id" search="[]"/> + <field name="price_type">tax_excluded</field> + <field model="product.pricelist" name="pricelist_id" search="[]"/> + </record> + + <!--Resource: pos.order.line--> + + <record id="line1_pos" model="pos.order.line"> + <field name="order_id" ref="order_pos1"/> + <field name="date_planned">2010/09/15</field> + <field name="name">[PC3] Medium PC</field> + <field name="product_id" ref="product.product_product_pc3"/> + <field model="res.company" name="company_id" search="[]"/> + <field model="product.uom" name="product_uom" search="[]"/> + <field name="price_unit">450</field> + <field name="qty">2</field> + <field name="notice">No Discount</field> + </record> + + <record id="line12_pos" model="pos.order.line"> + <field name="order_id" ref="order_pos1"/> + <field name="date_planned">2010/09/15</field> + <field name="name">[PC2] Basic+ PC (assembly on order)</field> + <field name="product_id" ref="product.product_product_pc2"/> + <field model="res.company" name="company_id" search="[]"/> + <field model="product.uom" name="product_uom" search="[]"/> + <field name="price_unit">450</field> + <field name="qty">2</field> + <field name="notice">No Discount</field> + </record> + + <record id="line2_pos" model="pos.order.line"> + <field name="order_id" ref="order_pos2"/> + <field name="date_planned">2010/09/15</field> + <field name="name">[PC1] Basic PC</field> + <field name="product_id" ref="product.product_product_pc1"/> + <field model="res.company" name="company_id" search="[]"/> + <field model="product.uom" name="product_uom" search="[]"/> + <field name="price_unit">450</field> + <field name="qty">5</field> + <field name="discount">0.10</field> + <field name="notice">Discount Applied</field> + </record> + + <record id="account_bank_statement_st0" model="account.bank.statement"> + <field name="name">St. 05/19</field> + <field name="balance_end_real">0.0</field> + <field name="date">2010-05-19</field> + <field name="journal_id" ref="account.bank_journal"/> + <field name="period_id" ref="account.period_5"/> + <field name="state">draft</field> + </record> + </data> </openerp> diff --git a/addons/point_of_sale/report/pos_payment_report_user.py b/addons/point_of_sale/report/pos_payment_report_user.py index 48ea148d8d1..dc829859c3e 100644 --- a/addons/point_of_sale/report/pos_payment_report_user.py +++ b/addons/point_of_sale/report/pos_payment_report_user.py @@ -40,13 +40,13 @@ class pos_payment_report_user(report_sxw.rml_parse): "from pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt " \ "where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id " \ "and po.state in ('paid','invoiced') and to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::date = current_date " \ - "and po.user_id IN %s",(tuple(ids), ) - self.cr.execute (sql) + "and po.user_id IN %s" + self.cr.execute (sql, (tuple(ids), )) data=self.cr.dictfetchall() return data - def __pos_payment_user__total__(self,form): + def __pos_payment_user__total__(self, form): res=[] - ids = form['user_id'][0][-1] + ids = form['user_id'] self.cr.execute ("select sum(pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0)) " \ "from pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt " \ "where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id " \ diff --git a/addons/point_of_sale/report/pos_users_product.py b/addons/point_of_sale/report/pos_users_product.py index 3a284f1957f..141445bcafe 100644 --- a/addons/point_of_sale/report/pos_users_product.py +++ b/addons/point_of_sale/report/pos_users_product.py @@ -42,7 +42,7 @@ class pos_user_product(report_sxw.rml_parse): a_l=[] for r in data: a_l.append(r['id']) - if len(a): + if len(a_l): sql2="""SELECT sum(qty) as qty,l.price_unit*sum(l.qty) as amt,t.name as name from product_product p, product_template t, pos_order_line l where order_id IN %s and p.product_tmpl_id=t.id and l.product_id=p.id group by t.name, l.price_unit""",(tuple(a_l),) self.cr.execute(sql2) data = self.cr.dictfetchall() diff --git a/addons/point_of_sale/test/pos_report.yml b/addons/point_of_sale/test/pos_report.yml new file mode 100644 index 00000000000..1747fb60305 --- /dev/null +++ b/addons/point_of_sale/test/pos_report.yml @@ -0,0 +1,136 @@ +- + In order to test the PDF reports defined on a Point Of Sale, we will print a POS Detail Summary Report +- + !python {model: pos.order}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.pos.details_summary').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-details_summary report'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a Point Of Sale, we will print a POS Invoice Report +- + !python {model: pos.order}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.pos.invoice').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-invoice report'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a Point Of Sale, we will print a POS Lines Report +- + !python {model: pos.order}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.pos.lines').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-lines report'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a Point of Sale, we will print a POS Receipt Report +- + !python {model: pos.order}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.pos.receipt').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-receipt report'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a Point of Sale, we will print a POS Receipt With Reimbursement Report +- + !python {model: pos.order}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.pos.receipt.with.remboursment').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-receipt with reimbursement report'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a point of sale, we will print a POS Receipt Without Reimbursement Report +- + !python {model: pos.order}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.pos.receipt.without.remboursment').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-receipt without reimbursement report'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on a Point Of Sale, we will print a POS Payment Report Report +- + !python {model: ir.ui.menu}: | + import netsvc, tools, os, time + (data, format) = netsvc.LocalService('report.pos.payment.report.date').create(cr, uid, [1], {'model':'ir.ui.menu', 'form':{'date_start': time.strftime('%Y-%m-%d'), 'date_end': time.strftime('%Y-%m-%d'), 'user_id': [ref('base.user_root')] }}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'point_of_sale- pos sales lines report'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on a Point Of Sale, we will print a POS Details Report +- + !python {model: ir.ui.menu}: | + import netsvc, tools, os, time + (data, format) = netsvc.LocalService('report.pos.details').create(cr, uid, [], {'model':'ir.ui.menu', 'form':{'date_start': time.strftime('%Y-%m-%d'), 'date_end': time.strftime('%Y-%m-%d') }}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'point_of_sale- pos details report'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on a Point Of Sale, we will print a Account Statement Report +- + !python {model: account.bank.statement}: | + import netsvc, tools, os, time + (data, format) = netsvc.LocalService('report.account.statement').create(cr, uid, [ref('point_of_sale.account_bank_statement_st0')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-account_statement_report'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on a Point Of Sale, we will print a POS User Product Report +- + !python {model: account.bank.statement}: | + import netsvc, tools, os, time + (data, format) = netsvc.LocalService('report.pos.user.product').create(cr, uid, [ref('point_of_sale.account_bank_statement_st0')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-user_product_report'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on a Point Of Sale, we will print a POS All Close Cashbox Of the Day Report +- + !python {model: account.bank.statement}: | + import netsvc, tools, os, time + (data, format) = netsvc.LocalService('report.all.closed.cashbox.of.the.day').create(cr, uid, [ref('point_of_sale.account_bank_statement_st0')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-all_closed_cash_box_of_the_day_report'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on a Point of Sale, we will print a POS Sales User Report +- + !python {model: pos.order}: | + import netsvc, tools, os, time + data_dict = {'model':'ir.ui.menu', 'form':{'date_start': time.strftime('%Y-%m-%d'), 'date_end': time.strftime('%Y-%m-%d'),'user_id':[ref('base.user_root')] }} + (data, format) = netsvc.LocalService('report.pos.sales.user').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-sales_user_report'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on a Point of Sale, we will print a POS Sales User Today Report +- + !python {model: pos.order}: | + import netsvc, tools, os, time + data_dict = {'model':'ir.ui.menu', 'form':{'user_id':[ref('base.user_root')] }} + (data, format) = netsvc.LocalService('report.pos.sales.user.today').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-sales_user_today_report'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on a Point of Sale, we will print a POS Payment Report +- + !python {model: pos.order}: | + import netsvc, tools, os, time + (data, format) = netsvc.LocalService('report.pos.payment.report').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-payment_report'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on a Point of Sale, we will print a POS Payment User Report +- + !python {model: pos.order}: | + import netsvc, tools, os, time + data_dict = {'model':'ir.ui.menu', 'form':{'user_id':[ref('base.user_root'),ref('base.user_demo')] }} + (data, format) = netsvc.LocalService('report.pos.payment.report.user').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-payment_user_report'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on a Point of Sale, we will print a POS Today's Sales of Current User Report +- + !python {model: pos.order}: | + import netsvc, tools, os, time + (data, format) = netsvc.LocalService('report.pos.sales.user.today.current.user').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-sales_today_current_user_report'+format), 'wb+').write(data)
\ No newline at end of file diff --git a/addons/product/__openerp__.py b/addons/product/__openerp__.py index 0a0cfceff20..5d099489859 100644 --- a/addons/product/__openerp__.py +++ b/addons/product/__openerp__.py @@ -58,6 +58,7 @@ 'company_view.xml', 'process/product_process.xml' ], + 'test':['test/product_report.yml'], 'installable': True, 'active': False, 'certificate': '0068861431437', diff --git a/addons/product/test/product_report.yml b/addons/product/test/product_report.yml new file mode 100644 index 00000000000..6e80083f66b --- /dev/null +++ b/addons/product/test/product_report.yml @@ -0,0 +1,17 @@ +- + In order to test the PDF reports defined on Products, we will print a Products Pricelists Report +- + !python {model: product.product}: | + import netsvc, tools, os + data_dict = {'model': 'product.price_list'} + data_dict['form'] = { + 'qty1': 1, + 'qty2': 5, + 'qty3': 10, + 'qty4': 0, + 'qty5': 0, + 'price_list':ref('product.list0') + } + (data, format) = netsvc.LocalService('report.product.pricelist').create(cr, uid, [ref('product.product_product_pc1'), ref('product.product_product_pc3')], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'product-product_pricelist'+format), 'wb+').write(data) diff --git a/addons/profile_tools/misc_tools_installer.xml b/addons/profile_tools/misc_tools_installer.xml index 2fcb2a3e0c4..c9b5f744b77 100644 --- a/addons/profile_tools/misc_tools_installer.xml +++ b/addons/profile_tools/misc_tools_installer.xml @@ -8,18 +8,18 @@ <field name="arch" type="xml"> <data> <form position="attributes"> - <attribute name="string">Tools Modules Configuration</attribute> + <attribute name="string">Extra Tools Configuration</attribute> </form> <xpath expr='//separator[@string="vsep"]' position='attributes'> <attribute name='string'></attribute> </xpath> <separator string="title" position="attributes"> - <attribute name="string">Tools</attribute> + <attribute name="string">Configure Extra Tools</attribute> </separator> <xpath expr="//label[@string='description']" position="attributes"> - <attribute name="string">Here are applications which, while they do not directly contribute to your business, can help you to improve your organization.</attribute> + <attribute name="string">Here are applications that can help you improve your organization without being key in its management.</attribute> </xpath> <xpath expr="//button[@string='Install Modules']" position="attributes"> <attribute name="string">Configure</attribute> @@ -36,7 +36,7 @@ </record> <record id="action_misc_tools_installer" model="ir.actions.act_window"> - <field name="name">Tools Modules Installation</field> + <field name="name">Tools Configuration</field> <field name="type">ir.actions.act_window</field> <field name="res_model">misc_tools.installer</field> <field name="view_id" ref="view_misc_tools_installer"/> diff --git a/addons/project/project_installer.xml b/addons/project/project_installer.xml index d19c8467de2..e12fa4d3815 100644 --- a/addons/project/project_installer.xml +++ b/addons/project/project_installer.xml @@ -9,10 +9,10 @@ <field name="arch" type="xml"> <data> <form position="attributes"> - <attribute name="string">Project Modules Configuration</attribute> + <attribute name="string">Project Application Configuration</attribute> </form> <separator string="title" position="attributes"> - <attribute name="string">Project Management</attribute> + <attribute name="string">Configure Your Project Management Application</attribute> </separator> <xpath expr='//separator[@string="vsep"]' position='attributes'> <attribute name='string'></attribute> @@ -40,7 +40,7 @@ </record> <record id="action_project_installer" model="ir.actions.act_window"> - <field name="name">Project Modules Installation</field> + <field name="name">Project Application Configuration</field> <field name="type">ir.actions.act_window</field> <field name="res_model">project.installer</field> <field name="view_id" ref="view_project_installer"/> diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index f1e4d34f54c..f3dcca16edc 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -80,6 +80,7 @@ <field name="message_ids" colspan="4" nolabel="1" mode="tree,form"> <tree string="Communication history"> <field name="display_text" string="History Information"/> + <field name="history" invisible="1"/> <button string="Reply" attrs="{'invisible': [('history', '!=', True)]}" name="%(crm.action_crm_send_mail)d" @@ -116,7 +117,11 @@ </form> </field> <separator colspan="4"/> - <button colspan="4" string="Send New Email" + <button string="Add New Note" + name="%(crm.action_crm_add_note)d" + context="{'model': 'crm.lead' }" + icon="terp-document-new" type="action" /> + <button string="Send New Email" name="%(crm.action_crm_send_mail)d" context="{'mail':'new', 'model': 'project.issue'}" icon="terp-mail-message-new" type="action" /> diff --git a/addons/project_planning/__openerp__.py b/addons/project_planning/__openerp__.py index 4624de97f8c..3f378cc21be 100644 --- a/addons/project_planning/__openerp__.py +++ b/addons/project_planning/__openerp__.py @@ -55,6 +55,7 @@ At the end of the month, the planning manager can also check if the encoded time ], 'test': [ 'test/planning_states.yml' + 'test/planning_report.yml' ], 'installable': True, 'active': False, diff --git a/addons/project_planning/project_planning_demo.xml b/addons/project_planning/project_planning_demo.xml index 9a64217f252..1c12e5c53cf 100644 --- a/addons/project_planning/project_planning_demo.xml +++ b/addons/project_planning/project_planning_demo.xml @@ -8,5 +8,13 @@ <field name="manager_id" ref="base.user_root"/> <field name="member_ids" eval="[(6,0,[ref('base.user_demo')])]"/> </record> + <record id="project_plannning_1" model="report_account_analytic.planning"> + <field name="name">Project_Planning</field> + <field name="business_days">20</field> + <field name="date_from">2010-01-01'</field> + <field name="date_to">2010-12-31</field> + <field name="state">draft</field> + <field name="member_ids" ref="base.user_demo"/> + </record> </data> </openerp> diff --git a/addons/project_planning/test/project_plannning_report.yml b/addons/project_planning/test/project_plannning_report.yml new file mode 100644 index 00000000000..a7597af86e8 --- /dev/null +++ b/addons/project_planning/test/project_plannning_report.yml @@ -0,0 +1,8 @@ +- + In order to test the PDF reports defined on a Project Planning, we will print Project Planning Report +- + !python {model: report_account_analytic.planning}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.report_account_analytic.planning.print').create(cr, uid, [ref('project_planning.project_plannning_1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'project_planning-project_planning_report'+format), 'wb+').write(data)
\ No newline at end of file diff --git a/addons/project_scrum/__openerp__.py b/addons/project_scrum/__openerp__.py index 847263ba7d3..3350419af30 100644 --- a/addons/project_scrum/__openerp__.py +++ b/addons/project_scrum/__openerp__.py @@ -60,6 +60,7 @@ "board_project_scrum_view.xml", ], 'demo_xml': ['project_scrum_demo.xml'], + 'test': ['test/project_scrum_report.yml'], 'installable': True, 'active': False, } diff --git a/addons/project_scrum/test/project_scrum_report.yml b/addons/project_scrum/test/project_scrum_report.yml new file mode 100644 index 00000000000..7fb3e9c07fc --- /dev/null +++ b/addons/project_scrum/test/project_scrum_report.yml @@ -0,0 +1,9 @@ +- + In order to test the PDF reports defined on a Project Scrum, we will print Project Scrum Sprint Burndown Report +- + !python {model: project.scrum.sprint}: | + import netsvc, tools, os + data_dict = {'model': 'project.scrum.sprint', 'id':ref('project_scrum.scrum_sprint_0')} + (data, format) = netsvc.LocalService('report.scrum.sprint.burndown').create(cr, uid, [ref('project_scrum.scrum_sprint_0')], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'project_scrum-project_scrum_sprint_burndown.'+format), 'wb+').write(data)
\ No newline at end of file diff --git a/addons/purchase/__openerp__.py b/addons/purchase/__openerp__.py index c7b4de7decc..7af6dbceff0 100644 --- a/addons/purchase/__openerp__.py +++ b/addons/purchase/__openerp__.py @@ -60,6 +60,7 @@ 'test/purchase_from_picking.yml', 'purchase_unit_test.xml', 'test/procurement_buy.yml', + 'test/purchase_report.yml', ], 'demo': ['purchase_demo.xml'], 'installable': True, diff --git a/addons/purchase/purchase_demo.xml b/addons/purchase/purchase_demo.xml index 1168fd29679..f6c2931a626 100644 --- a/addons/purchase/purchase_demo.xml +++ b/addons/purchase/purchase_demo.xml @@ -1,6 +1,64 @@ <?xml version="1.0" encoding="utf-8"?> <openerp> <data noupdate="1"> + + <!--Resource: purchase.order--> + + <record id="order_purchase1" model="purchase.order"> + <field model="stock.location" name="location_id" search="[]"/> + <field model="product.pricelist" name="pricelist_id" search="[]"/> + <field name="user_id" ref="base.user_root"/> + <field model="res.partner" name="partner_id" search="[]"/> + <field model="res.partner.address" name="partner_address_id" search="[]"/> + </record> + + <record id="order_purchase2" model="purchase.order"> + <field model="stock.location" name="location_id" search="[]"/> + <field model="product.pricelist" name="pricelist_id" search="[]"/> + <field name="user_id" ref="base.user_demo"/> + <field model="res.partner" name="partner_id" search="[]"/> + <field model="res.partner.address" name="partner_address_id" search="[]"/> + </record> + + <!--Resource: purchase.order.line--> + + <record id="line1_purchase" model="purchase.order.line"> + <field name="order_id" ref="order_purchase1"/> + <field name="date_planned">2010/09/15</field> + <field name="name">New server config + material</field> + <field model="product.product" name="product_id" search="[]"/> + <field model="product.uom" name="product_uom" search="[]"/> + <field name="price_unit">150</field> + <field name="product_qty">5</field> + <field name="type">make_to_stock</field> + </record> + + <record id="line2_purchase" model="purchase.order.line"> + <field name="order_id" ref="order_purchase1"/> + <field name="date_planned">2010/09/15</field> + <field name="name">[PC1] Basic PC</field> + <field name="product_id" ref="product.product_product_pc1"/> + <field name="product_uom" ref="product.product_uom_unit"/> + <field name="price_unit">450</field> + <field name="product_qty">2</field> + <field name="product_uom_qty">3</field> + <field name="product_uos_qty">3</field> + <field name="type">make_to_stock</field> + </record> + + <record id="line3_purchase" model="purchase.order.line"> + <field name="order_id" ref="order_purchase2"/> + <field name="date_planned">2010/09/15</field> + <field name="name">[PC3] Medium PC</field> + <field name="product_id" ref="product.product_product_pc1"/> + <field name="product_uom" ref="product.product_uom_unit"/> + <field name="price_unit">900</field> + <field name="product_qty">1</field> + <field name="type">make_to_stock</field> + </record> + + <workflow action="purchase_confirm" model="purchase.order" ref="order_purchase2"/> </data> </openerp> +
\ No newline at end of file diff --git a/addons/purchase/test/purchase_report.yml b/addons/purchase/test/purchase_report.yml new file mode 100644 index 00000000000..bbc15b1e936 --- /dev/null +++ b/addons/purchase/test/purchase_report.yml @@ -0,0 +1,16 @@ +- + In order to test the PDF reports defined on a Purchase Order, we will print a Request Quotation report +- + !python {model: purchase.order}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.purchase.quotation').create(cr, uid, [ref('purchase.order_purchase1'),ref('purchase.order_purchase2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'purchase-request_quotation'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on a Purchase Order, we will print Purchase Order report +- + !python {model: purchase.order}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.purchase.order').create(cr, uid, [ref('purchase.order_purchase1'),ref('purchase.order_purchase2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'purchase-purchase_order_report'+format), 'wb+').write(data)
\ No newline at end of file diff --git a/addons/purchase/wizard/purchase_installer.xml b/addons/purchase/wizard/purchase_installer.xml index b39dbc6003b..539edb3ec2f 100644 --- a/addons/purchase/wizard/purchase_installer.xml +++ b/addons/purchase/wizard/purchase_installer.xml @@ -2,25 +2,25 @@ <openerp> <data> <record id="view_purchase_install_module_form" model="ir.ui.view"> - <field name="name">Purchase Requisition</field> + <field name="name">Purchases Application Configuration</field> <field name="model">purchase.installer</field> <field name="type">form</field> <field name="inherit_id" ref="base.res_config_installer"/> <field name="arch" type="xml"> <data> <form position="attributes"> - <attribute name="string"> Purchase Modules Configuration</attribute> + <attribute name="string">Purchases Application Configuration</attribute> </form> <xpath expr='//separator[@string="vsep"]' position='attributes'> <attribute name='string'></attribute> </xpath> <separator string="title" position="attributes"> <attribute name="string" - >Configure Your Purchase System</attribute> + >Configure Your Purchases Management Application</attribute> </separator> <xpath expr="//label[@string='description']" position="attributes"> - <attribute name="string">In this page, you can extend your purchase system with purchase requisition facility and analytic distribution of purchase orders.</attribute> + <attribute name="string">Extend your Purchases Management Application with purchase requisition facility and analytic distribution of purchase orders.</attribute> </xpath> <xpath expr="//button[@string='Install Modules']" position="attributes"> <attribute name="string">Configure</attribute> @@ -34,7 +34,7 @@ </record> <record id="action_purchase_install_module" model="ir.actions.act_window"> - <field name="name">Purchase Profile : Install Extra Modules</field> + <field name="name">Purchases Application Configuration</field> <field name="type">ir.actions.act_window</field> <field name="res_model">purchase.installer</field> <field name="view_id" ref="view_purchase_install_module_form"/> diff --git a/addons/purchase_requisition/__openerp__.py b/addons/purchase_requisition/__openerp__.py index 27be1f3ce64..0cfc48feccd 100644 --- a/addons/purchase_requisition/__openerp__.py +++ b/addons/purchase_requisition/__openerp__.py @@ -30,7 +30,7 @@ """, "depends" : ["purchase","mrp"], "init_xml" : [], - "demo_xml" : [], + "demo_xml" : ['purchase_requisition_demo.xml'], "update_xml" : ["wizard/purchase_requisition_partner_view.xml", "purchase_requisition_data.xml", "purchase_requisition_view.xml", @@ -38,7 +38,7 @@ "security/ir.model.access.csv","purchase_requisition_sequence.xml" ], "active": False, - "test":[], + "test":['test/purchase_requisition_report.yml'], "installable": True } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/purchase_requisition/purchase_requisition_demo.xml b/addons/purchase_requisition/purchase_requisition_demo.xml new file mode 100644 index 00000000000..ff9bba7c700 --- /dev/null +++ b/addons/purchase_requisition/purchase_requisition_demo.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<openerp> + <data noupdate="1"> + + <!--Resource: purchase.requisition--> + + <record id="order_purchase_requisition1" model="purchase.requisition"> + <field name="name">TE0001</field> + <field name="user_id" model="res.users"/> + <field name="exclusive">multiple</field> + <field name="date_start">2010/09/16 15:56:14</field> + <field name="warehouse_id" model="stock.warehouse"/> + </record> + + <!--Resource: purchase.requisition.line--> + + <record id="line_purchase_requisition1" model="purchase.requisition.line"> + <field name="requisition_id" ref="order_purchase_requisition1"/> + <field name="product_id" ref="product.product_product_pc3"/> + <field name="product_uom_id" model="product.uom" search="[]"/> + <field name="product_qty">5</field> + </record> + + + </data> +</openerp> +
\ No newline at end of file diff --git a/addons/purchase_requisition/test/purchase_requisition_report.yml b/addons/purchase_requisition/test/purchase_requisition_report.yml new file mode 100644 index 00000000000..29edea96a8a --- /dev/null +++ b/addons/purchase_requisition/test/purchase_requisition_report.yml @@ -0,0 +1,8 @@ +- + In order to test the PDF reports defined on Purchase Requisition, we will print a Requisition report +- + !python {model: purchase.requisition}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.purchase.requisition').create(cr, uid, [ref('purchase_requisition.order_purchase_requisition1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'purchase_requisition-purchase_requisition_report.'+format), 'wb+').write(data) diff --git a/addons/report_designer/report_designer_installer.xml b/addons/report_designer/report_designer_installer.xml index 79381691d32..907cdaad06d 100644 --- a/addons/report_designer/report_designer_installer.xml +++ b/addons/report_designer/report_designer_installer.xml @@ -8,14 +8,14 @@ <field name="arch" type="xml"> <data> <form position="attributes"> - <attribute name="string">Report Modules Configuration</attribute> + <attribute name="string">Reporting Tools Configuration</attribute> </form> <xpath expr='//separator[@string="vsep"]' position='attributes'> <attribute name='string'></attribute> </xpath> <separator string="title" position="attributes"> <attribute name="string" - >Reporting Tools</attribute> + >Configure Reporting Tools</attribute> </separator> <xpath expr="//label[@string='description']" position="attributes"> @@ -35,7 +35,7 @@ </record> <record id="action_report_designer_installer" model="ir.actions.act_window"> - <field name="name">Report Modules Installation</field> + <field name="name">Reporting Tools Configuration</field> <field name="type">ir.actions.act_window</field> <field name="res_model">report_designer.installer</field> <field name="view_id" ref="view_report_designer_installer"/> diff --git a/addons/report_intrastat/__openerp__.py b/addons/report_intrastat/__openerp__.py index 16860ef9b70..b4dc9b52c89 100644 --- a/addons/report_intrastat/__openerp__.py +++ b/addons/report_intrastat/__openerp__.py @@ -37,6 +37,7 @@ 'intrastat_report.xml' ], 'demo_xml': [], + 'test': ['test/report_instratat_report.yml'], 'installable': True, 'active': False, 'certificate': '0056982189085', diff --git a/addons/report_intrastat/test/report_instratat_report.yml b/addons/report_intrastat/test/report_instratat_report.yml new file mode 100644 index 00000000000..c6162f51c25 --- /dev/null +++ b/addons/report_intrastat/test/report_instratat_report.yml @@ -0,0 +1,8 @@ +- + In order to test the PDF reports defined using report_instratat module, we print a Instratat Report +- + !python {model: account.invoice}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.account.invoice.intrastat').create(cr, uid, [ref('account.test_invoice_1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'report_instratat-instrastat_report.'+format), 'wb+').write(data) diff --git a/addons/sale/__openerp__.py b/addons/sale/__openerp__.py index 2bcb2f2d88f..6978a0bb072 100644 --- a/addons/sale/__openerp__.py +++ b/addons/sale/__openerp__.py @@ -79,7 +79,7 @@ 'test/sale_procurement.yml', 'test/invoice_on_ordered_qty.yml', 'test/invoice_on_shipped_qty.yml', - 'test/sale_order_print.yml', + 'test/sale_report.yml', ], 'installable': True, 'active': False, diff --git a/addons/sale/sale_installer.xml b/addons/sale/sale_installer.xml index a68af46bd73..9aab465573d 100644 --- a/addons/sale/sale_installer.xml +++ b/addons/sale/sale_installer.xml @@ -8,15 +8,15 @@ <field name="arch" type="xml"> <data> <form position="attributes"> - <attribute name="string">Sale Modules Configuration</attribute> + <attribute name="string">Sales Application Configuration</attribute> </form> <separator string="title" position="attributes"> - <attribute name="string">Sales Management</attribute> + <attribute name="string">Configure Your Sales Management Application</attribute> </separator> <xpath expr="//label[@string='description']" position="attributes"> - <attribute name="string">After having installed the core sales application, you can extend it depending on the needs of your sale's organization.</attribute> + <attribute name="string">Add more functionalities to the core Sales Application with the following addons.</attribute> </xpath> <xpath expr='//separator[@string="vsep"]' position='attributes'> <attribute name='string'></attribute> @@ -36,7 +36,7 @@ </record> <record id="action_sale_installer" model="ir.actions.act_window"> - <field name="name">Sale Management Modules Installation</field> + <field name="name">Sales Application Configuration</field> <field name="type">ir.actions.act_window</field> <field name="res_model">sale.installer</field> <field name="view_id" ref="view_sale_installer"/> diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml index 56fcfc64d7f..327a10aa6d8 100644 --- a/addons/sale/sale_view.xml +++ b/addons/sale/sale_view.xml @@ -524,7 +524,7 @@ to your configuration: from the sales order, from the pickings, etc. <field name="arch" type="xml"> <data> <form position="attributes"> - <attribute name="string">Sales Configuration</attribute> + <attribute name="string">Sales Application Configuration</attribute> </form> <separator string="title" position="attributes"> <attribute name="string" @@ -545,6 +545,7 @@ to your configuration: from the sales order, from the pickings, etc. <field name="step"/> </group> <xpath expr='//button[@name="action_skip"]' position='replace'/> + </data> </field> </record> diff --git a/addons/sale/test/sale_order_print.yml b/addons/sale/test/sale_order_print.yml deleted file mode 100644 index def94d8c27e..00000000000 --- a/addons/sale/test/sale_order_print.yml +++ /dev/null @@ -1,8 +0,0 @@ -- - In order to test the PDF reports defined on a sale order, we will print a sale order -- - !python {model: sale.order}: | - import netsvc, tools, os - (data, format) = netsvc.LocalService('report.sale.order').create(cr, uid, [ref('sale.order'),ref('sale.order2')], {}, {}) - if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'sale-sale_order.'+format), 'wb+').write(data) diff --git a/addons/sale/test/sale_report.yml b/addons/sale/test/sale_report.yml new file mode 100644 index 00000000000..d60420294fe --- /dev/null +++ b/addons/sale/test/sale_report.yml @@ -0,0 +1,16 @@ +- + In order to test the PDF reports defined on a sale order, we will print a sale order +- + !python {model: sale.order}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.sale.order').create(cr, uid, [ref('sale.order'),ref('sale.order2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'sale-sale_order.'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on a sale order, we will print a report for sale prepare allot +- + !python {model: sale.order}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.sale.order.prepare.allot').create(cr, uid, [ref('sale.order'),ref('sale.order2'),ref('sale.order3')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'sale-sale_prepare_allot.'+format), 'wb+').write(data)
\ No newline at end of file diff --git a/addons/sale_layout/__openerp__.py b/addons/sale_layout/__openerp__.py index ee9fdadf8c3..b8490c02fc9 100755 --- a/addons/sale_layout/__openerp__.py +++ b/addons/sale_layout/__openerp__.py @@ -40,6 +40,7 @@ "sale_layout_view.xml", "sale_layout_report.xml", ], + "test" : ['test/sale_layout_report.yml'], "active": False, "installable": True } diff --git a/addons/sale_layout/test/sale_layout_report.yml b/addons/sale_layout/test/sale_layout_report.yml new file mode 100644 index 00000000000..ed43ac639f6 --- /dev/null +++ b/addons/sale_layout/test/sale_layout_report.yml @@ -0,0 +1,8 @@ +- + In order to test the PDF reports defined on Sale, we will print a Sale Layout report. +- + !python {model: sale.order}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.sale.order.layout').create(cr, uid, [ref('sale.order')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'sale_layout-sale layout report'+format), 'wb+').write(data) diff --git a/addons/stock/__openerp__.py b/addons/stock/__openerp__.py index e33e347d612..432f95242bd 100644 --- a/addons/stock/__openerp__.py +++ b/addons/stock/__openerp__.py @@ -74,7 +74,9 @@ Thanks to the double entry management, the inventory controlling is powerful and "security/ir.model.access.csv", "board_warehouse_view.xml" ], - 'test': ['test/stock_test.yml'], + 'test': ['test/stock_test.yml', + 'test/stock_report.yml', + ], 'installable': True, 'active': False, 'certificate': '0055421559965', diff --git a/addons/stock/stock_demo.xml b/addons/stock/stock_demo.xml index 6607d97b2b3..03a29838981 100644 --- a/addons/stock/stock_demo.xml +++ b/addons/stock/stock_demo.xml @@ -270,6 +270,12 @@ <field eval="'account.account,'+str(ref('account.a_recv'))" model="account.account" name="value"/> <field name="company_id" ref="base.main_company"/> </record> - + <record id="stock_picking_1" model="stock.picking"> + <field name="name">PACKO1</field> + <field name="type">out</field> + <field name="move_type">direct</field> + <field name="invoice_state">2binvoiced</field> + <field name="company_id" ref="base.main_company"/> + </record> </data> </openerp> diff --git a/addons/stock/test/stock_report.yml b/addons/stock/test/stock_report.yml new file mode 100644 index 00000000000..491fd7fa9d7 --- /dev/null +++ b/addons/stock/test/stock_report.yml @@ -0,0 +1,48 @@ +- + In order to test the PDF reports defined on a stock, we will print a Stock Overviewall(childs) report +- + !python {model: stock.location}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.lot.stock.overview_all').create(cr, uid, [ref('stock.stock_location_13')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'stock-overviewall'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on stock location, we will print a lot location report +- + !python {model: stock.location}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.lot.location').create(cr, uid, [ref('stock.stock_location_components')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'stock-stock_lot_location.'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on stock inventory, we will print a Stock Inventory Move report +- + !python {model: stock.inventory}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.stock.inventory.move').create(cr, uid, [ref('stock.stock_inventory_0')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'stock-stock_inventory_move.'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on a stock, we will print a Stock Overview report +- + !python {model: stock.location}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.lot.stock.overview').create(cr, uid, [ref('stock.stock_location_14')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'stock-overview'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on a stock, we will print a Stock Picking List report +- + !python {model: stock.picking}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.stock.picking.list').create(cr, uid, [ref('stock.stock_picking_1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'stock-picking_list'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on a Stock, we will print Product Stock Report +- + !python {model: product.product}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.stock.product.history').create(cr, uid, [ref('product.product_product_pc1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'stock-product_stock_report.'+format), 'wb+').write(data)
\ No newline at end of file diff --git a/addons/survey/__openerp__.py b/addons/survey/__openerp__.py index 853370132de..fa48e176b26 100644 --- a/addons/survey/__openerp__.py +++ b/addons/survey/__openerp__.py @@ -47,6 +47,7 @@ 'demo_xml': ['survey_demo.xml'], 'test': [ 'test/survey00.yml', + 'test/survey_report.yml', ], 'installable': True, 'active': False, diff --git a/addons/survey/security/ir.model.access.csv b/addons/survey/security/ir.model.access.csv index 9d7c9c44ee4..2a64acdb0d4 100644 --- a/addons/survey/security/ir.model.access.csv +++ b/addons/survey/security/ir.model.access.csv @@ -25,19 +25,6 @@ "access_survey_tbl_column_heading_user","survey.tbl.column.heading user","model_survey_tbl_column_heading","base.group_tool_user",1,1,1,1 "access_survey_response_line_manager","survey.response.line manager","model_survey_response_line","base.group_tool_manager",1,1,1,1 "access_survey_response_line_user","survey.response.line user","model_survey_response_line","base.group_tool_user",1,1,1,1 -"access_survey_type","survey.type","model_survey_type","base.group_hr_manager",1,1,1,1 -"access_survey","survey","model_survey","base.group_hr_manager",1,1,1,1 -"access_survey_history_manager","survey.history","model_survey_history","base.group_hr_manager",1,1,1,1 -"access_survey_page","survey.page","model_survey_page","base.group_hr_manager",1,1,1,1 -"access_survey_question","survey.question","model_survey_question","base.group_hr_manager",1,1,1,1 -"access_survey_question_column_heading","survey.question.column.heading","model_survey_question_column_heading","base.group_hr_manager",1,1,1,1 -"access_survey_answer","survey.answer","model_survey_answer","base.group_hr_manager",1,1,1,1 -"access_survey_response","survey.response","model_survey_response","base.group_hr_manager",1,1,1,1 -"access_survey_response_line","survey.response.line","model_survey_response_line","base.group_hr_manager",1,1,1,1 -"access_survey_tbl_column_heading","survey.tbl.column.heading","model_survey_tbl_column_heading","base.group_hr_manager",1,1,1,1 -"access_survey_response_answer","survey.response.answer","model_survey_response_answer","base.group_hr_manager",1,1,1,1 -"access_survey_res_users","res.users","base.model_res_users","base.group_hr_manager",1,1,1,1 -"access_survey_request","survey.request","model_survey_request","base.group_hr_manager",1,1,1,1 "access_survey_history_survey_manager","survey.history manager","model_survey_history","base.group_tool_manager",1,1,1,1 "access_survey_type_system","survey.type system","model_survey_type","base.group_system",1,0,0,0 "access_survey_question_system","survey.question system","model_survey_question","base.group_system",1,0,0,0 diff --git a/addons/survey/security/survey_security.xml b/addons/survey/security/survey_security.xml index 7172fdf615e..6c3559fa138 100644 --- a/addons/survey/security/survey_security.xml +++ b/addons/survey/security/survey_security.xml @@ -5,12 +5,6 @@ <record id="base.group_sale_salesman" model="res.groups"> <field name="name">Sales / User</field> </record> - <record id="base.group_hr_manager" model="res.groups"> - <field name="name">Human Resources / Manager</field> - </record> - <record id="base.group_hr_user" model="res.groups"> - <field name="name">Human Resources / User</field> - </record> <record model="res.groups" id="base.group_tool_manager"> <field name="name">Tools / Manager</field> </record> diff --git a/addons/survey/test/survey_report.yml b/addons/survey/test/survey_report.yml new file mode 100644 index 00000000000..adb3ddb28ed --- /dev/null +++ b/addons/survey/test/survey_report.yml @@ -0,0 +1,24 @@ +- + In order to test the PDF reports defined on a Survey, we will print Survey Analysis Report +- + !python {model: survey}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.survey.analysis').create(cr, uid, [ref('survey.survey_partner_feedback')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'survey-survey_analysis_report.'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on a Survey, we will print Survey Browse Response Report +- + !python {model: survey}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.survey.browse.response').create(cr, uid, [ref('survey.survey_partner_feedback')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'survey-survey_browse_response_report.'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on a Survey, we will print Survey Form Report +- + !python {model: survey}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.survey.form').create(cr, uid, [ref('survey.survey_partner_feedback')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'survey-survey_form_report.'+format), 'wb+').write(data)
\ No newline at end of file diff --git a/addons/thunderbird/installer.py b/addons/thunderbird/installer.py index 0fb9a9dd08a..cb963831218 100644 --- a/addons/thunderbird/installer.py +++ b/addons/thunderbird/installer.py @@ -41,7 +41,7 @@ class thunderbird_installer(osv.osv_memory): _columns = { 'name':fields.char('File name', size=34), 'pdf_name':fields.char('File name', size=64), - 'thunderbird':fields.boolean('Thunderbird Module ', help="Allows you to select an object that you’d like to add to your email and its attachments."), + 'thunderbird':fields.boolean('Thunderbird Plug-in', help="Allows you to select an object that you’d like to add to your email and its attachments."), 'plugin_file':fields.binary('Thunderbird Plug-in', readonly=True, help="Thunderbird plug-in file. Save as this file and install this plug-in in thunderbird."), 'pdf_file':fields.binary('Installation Manual', help="The documentation file :- how to install Thunderbird Plug-in.", readonly=True), 'description':fields.text('Description', readonly=True) diff --git a/addons/thunderbird/thunderbird_installer.xml b/addons/thunderbird/thunderbird_installer.xml index b7a66d4e122..622ca3ed127 100644 --- a/addons/thunderbird/thunderbird_installer.xml +++ b/addons/thunderbird/thunderbird_installer.xml @@ -12,14 +12,20 @@ <attribute name="string">Thunderbird Plug-In Configuration</attribute> </form> <separator string="title" position="attributes"> - <attribute name="string">Thunderbird</attribute> + <attribute name="string">Thunderbird Plug-In</attribute> </separator> <xpath expr="//label[@string='description']" position="attributes"> <attribute name="string">This plug-in allows you to link your e-mail to OpenERP's documents. You can attach it to any existing one in OpenERP or create a new one.</attribute> </xpath> - <xpath expr="//button[@string='Install Modules']" position="attributes"> - <attribute name="string">Configure</attribute> - </xpath> + <xpath expr="//button[@string='Install Modules']" position="replace"> + <button colspan="1" icon="gtk-close" special="cancel" string="_Close" invisible="not context.get('menu',False)"/> + <button name="action_next" icon="gtk-go-forward" + type="object" string="Configure" colspan="1" invisible="context.get('menu',False)"/> + </xpath> + <xpath expr="//button[@string='Skip']" position="replace"> + <button name="action_skip" icon="gtk-jump-to" special="cancel" + type="object" string="Skip" colspan="1" invisible="context.get('menu',False)"/> + </xpath> <xpath expr='//separator[@string="vsep"]' position='attributes'> <attribute name='string'></attribute> <attribute name='rowspan'>15</attribute> @@ -44,7 +50,7 @@ </record> <record id="action_thunderbird_installer" model="ir.actions.act_window"> - <field name="name">Thunderbird Module Installation</field> + <field name="name">Thunderbird Plug-In Configuration</field> <field name="type">ir.actions.act_window</field> <field name="res_model">thunderbird.installer</field> <field name="view_id" ref="view_thunderbird_installer"/> @@ -58,59 +64,21 @@ <field name="sequence">3</field> </record> - <!-- Configuration wizard. --> - - <record id="view_thunderbird_wizard" model="ir.ui.view"> - <field name="name">thunderbird.wizard</field> - <field name="model">thunderbird.installer</field> - <field name="type">form</field> - <field name="arch" type="xml"> - <form string= "Thunderbird Installation"> - <group colspan="4"> - <separator string="Configure Thunderbird Module" colspan="4"/> - <group colspan="4" col="10"> - <group colspan="2"> - <image name="gtk-dialog-info"/> - <newline/> - <label align="0.0" string="This module allows you to archive an e-mail on one or more objects of OpenERP. You can attach an email to a partner, a task, an analytic account or any other object. You can also create a new object like a lead, a phone call, claim and many more." width="200"/> - </group> - <group colspan="8"> - <field name="thunderbird" invisible="1"/> - <field name="name" invisible="1"/> - <field name="pdf_name" invisible="1"/> - <newline/> - - <field name="plugin_file" filename="name"/> - <newline/> - <field name="pdf_file" filename="pdf_name"/> - <newline/> - <separator string="Installation and Configuration Steps" colspan="4"/> - <field name="description" nolabel="1" colspan="8"/> - </group> - </group> - </group> - <separator string="" colspan="4"/> - <group colspan="4"> - <label align="0.0" string="" colspan="3"/> - <button colspan="1" icon="gtk-close" special="cancel" string="_Close"/> - </group> - </form> - </field> - </record> <record id="action_thunderbird_wizard" model="ir.actions.act_window"> - <field name="name">Thunderbird Module Installation</field> + <field name="name">Thunderbird Plug-In Configuration</field> <field name="type">ir.actions.act_window</field> <field name="res_model">thunderbird.installer</field> - <field name="view_id" ref="view_thunderbird_wizard"/> + <field name="view_id" ref="view_thunderbird_installer"/> <field name="view_type">form</field> <field name="view_mode">form</field> <field name="target">new</field> + <field name="context">{'menu':True}</field> </record> <menuitem id="base.menu_base_config_mail" name="Mail" parent="base.menu_base_config" sequence="10"/> <menuitem id="base.menu_base_config_plugins" name="Plugins" parent="base.menu_base_config_mail" sequence="10" /> - <menuitem id="menu_base_config_plugins_thunderbird" action="action_thunderbird_wizard" name="Thunderbird" parent="base.menu_base_config_plugins" sequence="10" /> + <menuitem id="menu_base_config_plugins_thunderbird" action="action_thunderbird_wizard" name="Thunderbird Plug-In" parent="base.menu_base_config_plugins" sequence="10" /> </data> </openerp> |
