From 0e219e879fd6f015969ce2b015f8d8eee6200bba Mon Sep 17 00:00:00 2001 From: "aag (OpenERP)" Date: Mon, 14 Feb 2011 15:38:09 +0530 Subject: [PATCH] [MERGE]: Merge with lp:trunk-fix-osvmem-read bzr revid: aag@tinyerp.co.in-20110214100809-plgvq13mbh3s5hm2 --- addons/account/i18n/pt_BR.po | 5 ++--- addons/account/report/account_balance.py | 2 ++ addons/account/wizard/account_move_journal.py | 2 +- .../wizard/account_open_closed_fiscalyear.py | 2 ++ .../wizard/account_report_balance_sheet.py | 3 ++- .../account/wizard/account_report_common.py | 5 ++++- .../wizard/account_report_general_ledger.py | 2 +- .../wizard/account_report_partner_balance.py | 2 +- .../wizard/account_report_partner_ledger.py | 2 +- .../wizard/account_report_profit_loss.py | 2 +- .../wizard/account_validate_account_move.py | 3 +++ addons/account/wizard/account_vat.py | 3 +++ addons/account_invoice_layout/i18n/hu.po | 6 +++--- addons/auction/wizard/auction_pay_sel.py | 10 +++++----- addons/board/wizard/board_menu_create.py | 4 +++- .../wizard/email_template_send_wizard.py | 20 +++++++++---------- addons/hr_timesheet/i18n/pt_BR.po | 2 +- .../wizard/hr_timesheet_print_employee.py | 4 +++- .../hr_timesheet_final_invoice_create.py | 3 +++ addons/mrp/i18n/es_AR.po | 5 ++--- addons/mrp/wizard/mrp_product_produce.py | 4 ++-- addons/pad/__openerp__.py | 2 +- addons/point_of_sale/i18n/pt_BR.po | 2 +- .../project_scrum_backlog_create_task.py | 6 ++++-- .../wizard/project_scrum_backlog_sprint.py | 3 +++ .../wizard/purchase_requisition_partner.py | 9 ++++----- addons/stock/wizard/stock_split_move.py | 2 +- addons/survey/wizard/survey_browse_answer.py | 4 +++- addons/survey/wizard/survey_print.py | 4 ++-- addons/survey/wizard/survey_print_answer.py | 2 +- .../survey/wizard/survey_print_statistics.py | 2 +- addons/survey/wizard/survey_selection.py | 4 ++-- .../survey/wizard/survey_send_invitation.py | 2 +- 33 files changed, 79 insertions(+), 54 deletions(-) diff --git a/addons/account/i18n/pt_BR.po b/addons/account/i18n/pt_BR.po index 635c1071f25..165fda38df8 100644 --- a/addons/account/i18n/pt_BR.po +++ b/addons/account/i18n/pt_BR.po @@ -7,14 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2011-01-11 11:14+0000\n" -"PO-Revision-Date: 2011-02-11 22:50+0000\n" +"PO-Revision-Date: 2011-02-10 00:58+0000\n" "Last-Translator: Emerson \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-02-12 05:00+0000\n" -"X-Generator: Launchpad (build 12351)\n" +"X-Launchpad-Export-Date: 2011-02-10 04:35+0000\n" #. module: account #: model:process.transition,name:account.process_transition_supplierreconcilepaid0 diff --git a/addons/account/report/account_balance.py b/addons/account/report/account_balance.py index 5d9cfac5699..45e642cd59e 100644 --- a/addons/account/report/account_balance.py +++ b/addons/account/report/account_balance.py @@ -71,6 +71,8 @@ class account_balance(report_sxw.rml_parse, common_report_header): def lines(self, form, ids=[], done=None):#, level=1): def _process_child(accounts, disp_acc, parent): account_rec = [acct for acct in accounts if acct['id']==parent][0] + if isinstance(account_rec['parent_id'], tuple): + account_rec['parent_id'] = account_rec['parent_id'][0] currency_obj = self.pool.get('res.currency') acc_id = self.pool.get('account.account').browse(self.cr, self.uid, account_rec['id']) currency = acc_id.currency_id and acc_id.currency_id or acc_id.company_id.currency_id diff --git a/addons/account/wizard/account_move_journal.py b/addons/account/wizard/account_move_journal.py index 47b83bb23f1..db179ff00ff 100644 --- a/addons/account/wizard/account_move_journal.py +++ b/addons/account/wizard/account_move_journal.py @@ -148,7 +148,7 @@ class account_move_journal(osv.osv_memory): journal_id = self._get_journal(cr, uid, context) period_id = self._get_period(cr, uid, context) - target_move = self.read(cr, uid, ids, [])[0]['target_move'] + target_move = self.read(cr, uid, ids, [], context=context)[0]['target_move'] name = _("Journal Items") if journal_id: diff --git a/addons/account/wizard/account_open_closed_fiscalyear.py b/addons/account/wizard/account_open_closed_fiscalyear.py index 39c5be00f15..e4562d02ca9 100644 --- a/addons/account/wizard/account_open_closed_fiscalyear.py +++ b/addons/account/wizard/account_open_closed_fiscalyear.py @@ -35,6 +35,8 @@ class account_open_closed_fiscalyear(osv.osv_memory): move_obj = self.pool.get('account.move') data = self.read(cr, uid, ids, [], context=context)[0] + if isinstance(data['fyear_id'], tuple): + data['fyear_id'] = data['fyear_id'][0] data_fyear = fy_obj.browse(cr, uid, data['fyear_id'], context=context) if not data_fyear.end_journal_period_id: raise osv.except_osv(_('Error !'), _('No End of year journal defined for the fiscal year')) diff --git a/addons/account/wizard/account_report_balance_sheet.py b/addons/account/wizard/account_report_balance_sheet.py index b69c6d65d71..0e234c5cc39 100644 --- a/addons/account/wizard/account_report_balance_sheet.py +++ b/addons/account/wizard/account_report_balance_sheet.py @@ -65,7 +65,8 @@ class account_bs_report(osv.osv_memory): def _print_report(self, cr, uid, ids, data, context=None): if context is None: context = {} - data['form'].update(self.read(cr, uid, ids, ['display_type','reserve_account_id'])[0]) + record = self.browse(cr, uid, ids, context=context)[0] + data['form'].update({'display_type':record.display_type, 'reserve_account_id':record.reserve_account_id.id}) if not data['form']['reserve_account_id']: raise osv.except_osv(_('Warning'),_('Please define the Reserve and Profit/Loss account for current user company !')) data = self.pre_print_report(cr, uid, ids, data, context=context) diff --git a/addons/account/wizard/account_report_common.py b/addons/account/wizard/account_report_common.py index a4f87f55da8..f7d7cac1c77 100644 --- a/addons/account/wizard/account_report_common.py +++ b/addons/account/wizard/account_report_common.py @@ -131,7 +131,10 @@ class account_common_report(osv.osv_memory): data = {} data['ids'] = context.get('active_ids', []) data['model'] = context.get('active_model', 'ir.ui.menu') - data['form'] = self.read(cr, uid, ids, ['date_from', 'date_to', 'fiscalyear_id', 'journal_ids', 'period_from', 'period_to', 'filter', 'chart_account_id', 'target_move'])[0] + data['form'] = self.read(cr, uid, ids, ['date_from', 'date_to', 'fiscalyear_id', 'journal_ids', 'period_from', 'period_to', 'filter', 'chart_account_id', 'target_move'], context=context)[0] + for field in data['form'].keys(): + if isinstance(data['form'][field], tuple): + data['form'][field] = data['form'][field][0] used_context = self._build_contexts(cr, uid, ids, data, context=context) data['form']['periods'] = used_context.get('periods', False) and used_context['periods'] or [] data['form']['used_context'] = used_context diff --git a/addons/account/wizard/account_report_general_ledger.py b/addons/account/wizard/account_report_general_ledger.py index c08894bfadd..e3ad832e6fb 100644 --- a/addons/account/wizard/account_report_general_ledger.py +++ b/addons/account/wizard/account_report_general_ledger.py @@ -50,7 +50,7 @@ class account_report_general_ledger(osv.osv_memory): if context is None: context = {} data = self.pre_print_report(cr, uid, ids, data, context=context) - data['form'].update(self.read(cr, uid, ids, ['landscape', 'initial_balance', 'amount_currency', 'sortby'])[0]) + data['form'].update(self.read(cr, uid, ids, ['landscape', 'initial_balance', 'amount_currency', 'sortby'], context=context)[0]) if not data['form']['fiscalyear_id']:# GTK client problem onchange does not consider in save record data['form'].update({'initial_balance': False}) if data['form']['landscape']: diff --git a/addons/account/wizard/account_report_partner_balance.py b/addons/account/wizard/account_report_partner_balance.py index eff9e71cb72..5853824e0ed 100644 --- a/addons/account/wizard/account_report_partner_balance.py +++ b/addons/account/wizard/account_report_partner_balance.py @@ -42,7 +42,7 @@ class account_partner_balance(osv.osv_memory): if context is None: context = {} data = self.pre_print_report(cr, uid, ids, data, context=context) - data['form'].update(self.read(cr, uid, ids, ['display_partner'])[0]) + data['form'].update(self.read(cr, uid, ids, ['display_partner'], context=context)[0]) return { 'type': 'ir.actions.report.xml', 'report_name': 'account.partner.balance', diff --git a/addons/account/wizard/account_report_partner_ledger.py b/addons/account/wizard/account_report_partner_ledger.py index 1a09a6344f4..4211b1db866 100644 --- a/addons/account/wizard/account_report_partner_ledger.py +++ b/addons/account/wizard/account_report_partner_ledger.py @@ -47,7 +47,7 @@ class account_partner_ledger(osv.osv_memory): if context is None: context = {} data = self.pre_print_report(cr, uid, ids, data, context=context) - data['form'].update(self.read(cr, uid, ids, ['initial_balance', 'reconcil', 'page_split', 'amount_currency'])[0]) + data['form'].update(self.read(cr, uid, ids, ['initial_balance', 'reconcil', 'page_split', 'amount_currency'], context=context)[0]) if data['form']['page_split']: return { 'type': 'ir.actions.report.xml', diff --git a/addons/account/wizard/account_report_profit_loss.py b/addons/account/wizard/account_report_profit_loss.py index c526550e789..f84b5db8f1d 100644 --- a/addons/account/wizard/account_report_profit_loss.py +++ b/addons/account/wizard/account_report_profit_loss.py @@ -42,7 +42,7 @@ class account_pl_report(osv.osv_memory): if context is None: context = {} data = self.pre_print_report(cr, uid, ids, data, context=context) - data['form'].update(self.read(cr, uid, ids, ['display_type'])[0]) + data['form'].update(self.read(cr, uid, ids, ['display_type'], context=context)[0]) if data['form']['display_type']: return { 'type': 'ir.actions.report.xml', diff --git a/addons/account/wizard/account_validate_account_move.py b/addons/account/wizard/account_validate_account_move.py index ddcfa2c5353..c2fcfbfd5ab 100644 --- a/addons/account/wizard/account_validate_account_move.py +++ b/addons/account/wizard/account_validate_account_move.py @@ -34,6 +34,9 @@ class validate_account_move(osv.osv_memory): if context is None: context = {} data = self.read(cr, uid, ids, context=context)[0] + for field in data.keys(): + if isinstance(data[field], tuple): + data[field] = data[field][0] ids_move = obj_move.search(cr, uid, [('state','=','draft'),('journal_id','=',data['journal_id']),('period_id','=',data['period_id'])]) if not ids_move: raise osv.except_osv(_('Warning'), _('Specified Journal does not have any account move entries in draft state for this period')) diff --git a/addons/account/wizard/account_vat.py b/addons/account/wizard/account_vat.py index 863ae055428..3e77979cd3b 100644 --- a/addons/account/wizard/account_vat.py +++ b/addons/account/wizard/account_vat.py @@ -47,6 +47,9 @@ class account_vat_declaration(osv.osv_memory): datas = {'ids': context.get('active_ids', [])} datas['model'] = 'account.tax.code' datas['form'] = self.read(cr, uid, ids)[0] + for field in datas['form'].keys(): + if isinstance(datas['form'][field], tuple): + datas['form'][field] = datas['form'][field][0] datas['form']['company_id'] = self.pool.get('account.tax.code').browse(cr, uid, [datas['form']['chart_tax_id']], context=context)[0].company_id.id return { 'type': 'ir.actions.report.xml', diff --git a/addons/account_invoice_layout/i18n/hu.po b/addons/account_invoice_layout/i18n/hu.po index a94ea6f48ff..34093670df8 100644 --- a/addons/account_invoice_layout/i18n/hu.po +++ b/addons/account_invoice_layout/i18n/hu.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2011-01-11 11:14+0000\n" -"PO-Revision-Date: 2011-02-10 13:27+0000\n" +"PO-Revision-Date: 2011-02-09 12:16+0000\n" "Last-Translator: NOVOTRADE RENDSZERHÁZ \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-02-11 04:59+0000\n" +"X-Launchpad-Export-Date: 2011-02-10 04:35+0000\n" "X-Generator: Launchpad (build 12177)\n" #. module: account_invoice_layout @@ -160,7 +160,7 @@ msgstr "Megadja a számlasorok listázási sorrendjét." #: report:account.invoice.layout:0 #: report:notify_account.invoice:0 msgid "Price" -msgstr "Nettó érték" +msgstr "Érték" #. module: account_invoice_layout #: report:account.invoice.layout:0 diff --git a/addons/auction/wizard/auction_pay_sel.py b/addons/auction/wizard/auction_pay_sel.py index 77484bbe988..7a3194b1967 100644 --- a/addons/auction/wizard/auction_pay_sel.py +++ b/addons/auction/wizard/auction_pay_sel.py @@ -42,14 +42,14 @@ class auction_pay_sel(osv.osv_memory): @param context: A standard dictionary @return: """ - if context is None: + if context is None: context = {} lot = self.pool.get('auction.lots').browse(cr, uid, context['active_id'], context=context) invoice_obj = self.pool.get('account.invoice') - for datas in self.read(cr, uid, ids, context=context): - account_id = datas.get('writeoff_acc_id', False) - period_id = datas.get('period_id', False) - journal_id = datas.get('journal_id', False) + for datas in self.browse(cr, uid, ids, context=context): + account_id = datas.dest_account_id and datas.dest_account_id.id or False + period_id = datas.period_id and datas.period_id.id or False + journal_id = datas.journal_id and datas.journal_id.id or False if lot.sel_inv_id: p = invoice_obj.pay_and_reconcile(['lot.sel_inv_id.id'], datas['amount'], datas['dest_account_id'], journal_id, account_id, period_id, journal_id, context) return {'type': 'ir.actions.act_window_close'} diff --git a/addons/board/wizard/board_menu_create.py b/addons/board/wizard/board_menu_create.py index 10d4d80a7f3..73a8337bdb7 100644 --- a/addons/board/wizard/board_menu_create.py +++ b/addons/board/wizard/board_menu_create.py @@ -70,7 +70,9 @@ class board_menu_create(osv.osv_memory): }) obj_menu = self.pool.get('ir.ui.menu') #start Loop - for data in self.read(cr, uid, ids): + for data in self.read(cr, uid, ids, context=context): + if isinstance(data['menu_parent_id'], tuple): + data['menu_parent_id'] = data['menu_parent_id'][0] obj_menu.create(cr, uid, { 'name': data.get('menu_name'), 'parent_id': data.get('menu_parent_id'), diff --git a/addons/email_template/wizard/email_template_send_wizard.py b/addons/email_template/wizard/email_template_send_wizard.py index 4f6ab7af381..d66de039941 100644 --- a/addons/email_template/wizard/email_template_send_wizard.py +++ b/addons/email_template/wizard/email_template_send_wizard.py @@ -66,7 +66,7 @@ class email_template_send_wizard(osv.osv_memory): if not id: id = context['src_rec_ids'][0] return get_value(cursor, user, id, message, template, context) - + def _get_template(self, cr, uid, context=None): if context is None: context = {} @@ -116,13 +116,13 @@ class email_template_send_wizard(osv.osv_memory): 'to':fields.char('To',size=250,required=True), 'cc':fields.char('CC',size=250,), 'bcc':fields.char('BCC',size=250,), - 'reply_to':fields.char('Reply-To', - size=250, + 'reply_to':fields.char('Reply-To', + size=250, help="The address recipients should reply to," " if different from the From address." " Placeholders can be used here."), - 'message_id':fields.char('Message-ID', - size=250, + 'message_id':fields.char('Message-ID', + size=250, help="The Message-ID header value, if you need to" "specify it, for example to automatically recognize the replies later." " Placeholders can be used here."), @@ -133,12 +133,12 @@ class email_template_send_wizard(osv.osv_memory): 'signature':fields.boolean('Attach my signature to mail'), #'filename':fields.text('File Name'), 'requested':fields.integer('No of requested Mails',readonly=True), - 'generated':fields.integer('No of generated Mails',readonly=True), + 'generated':fields.integer('No of generated Mails',readonly=True), 'full_success':fields.boolean('Complete Success',readonly=True), 'attachment_ids': fields.many2many('ir.attachment','send_wizard_attachment_rel', 'wizard_id', 'attachment_id', 'Attachments'), } - #FIXME: probably better by overriding default_get directly + #FIXME: probably better by overriding default_get directly _defaults = { 'state': lambda self,cr,uid,ctx: len(ctx['src_rec_ids']) > 1 and 'multi' or 'single', 'rel_model': lambda self,cr,uid,ctx: self.pool.get('ir.model').search(cr,uid,[('model','=',ctx['src_model'])],context=ctx)[0], @@ -156,7 +156,7 @@ class email_template_send_wizard(osv.osv_memory): 'reply_to': lambda self,cr,uid,ctx: self._get_template_value(cr, uid, 'reply_to', ctx), 'requested':lambda self,cr,uid,ctx: len(ctx['src_rec_ids']), 'full_success': False, - 'attachment_ids': [], + 'attachment_ids': [], } def fields_get(self, cr, uid, fields=None, context=None, write_access=True): @@ -200,7 +200,7 @@ class email_template_send_wizard(osv.osv_memory): else: raise osv.except_osv(_("Email Template"),_("Email sending failed for one or more objects.")) return True - + def save_to_mailbox(self, cr, uid, ids, context=None): def get_end_value(id, value): if len(context['src_rec_ids']) > 1: # Multiple Mail: Gets value from the template @@ -213,7 +213,7 @@ class email_template_send_wizard(osv.osv_memory): mail_ids = [] template = self._get_template(cr, uid, context) for id in context['src_rec_ids']: - screen_vals = self.read(cr, uid, ids[0], [],context) + screen_vals = self.read(cr, uid, ids[0], [],context=context) account = self.pool.get('email_template.account').read(cr, uid, screen_vals['from'], context=context) vals = { 'email_from': tools.ustr(account['name']) + "<" + tools.ustr(account['email_id']) + ">", diff --git a/addons/hr_timesheet/i18n/pt_BR.po b/addons/hr_timesheet/i18n/pt_BR.po index 5beebcce854..7903fad3b8c 100644 --- a/addons/hr_timesheet/i18n/pt_BR.po +++ b/addons/hr_timesheet/i18n/pt_BR.po @@ -14,7 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-02-11 04:59+0000\n" +"X-Launchpad-Export-Date: 2011-02-10 04:35+0000\n" "X-Generator: Launchpad (build 12177)\n" #. module: hr_timesheet diff --git a/addons/hr_timesheet/wizard/hr_timesheet_print_employee.py b/addons/hr_timesheet/wizard/hr_timesheet_print_employee.py index 9775a8518ff..51af2444661 100644 --- a/addons/hr_timesheet/wizard/hr_timesheet_print_employee.py +++ b/addons/hr_timesheet/wizard/hr_timesheet_print_employee.py @@ -31,7 +31,7 @@ class analytical_timesheet_employee(osv.osv_memory): 'Month', required=True), 'year': fields.integer('Year', required=True), 'employee_id': fields.many2one('hr.employee', 'Employee', required=True) - + } def _get_user(self, cr, uid, context=None): @@ -50,6 +50,8 @@ class analytical_timesheet_employee(osv.osv_memory): def print_report(self, cr, uid, ids, context=None): data = self.read(cr, uid, ids, context=context)[0] + if isinstance(data['employee_id'], tuple): + data['employee_id'] = data['employee_id'][0] datas = { 'ids': [], 'model': 'hr.employee', diff --git a/addons/hr_timesheet_invoice/wizard/hr_timesheet_final_invoice_create.py b/addons/hr_timesheet_invoice/wizard/hr_timesheet_final_invoice_create.py index 8f1ef4ef261..cebcf072794 100644 --- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_final_invoice_create.py +++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_final_invoice_create.py @@ -59,6 +59,9 @@ class final_invoice_create(osv.osv_memory): res = mod_obj.read(cr, uid, result, ['res_id'], context=context) data = self.read(cr, uid, ids, [], context=context)[0] + if isinstance(data['balance_product'], tuple): + data['balance_product'] = data['balance_product'][0] + account_ids = 'active_ids' in context and context['active_ids'] or [] for account in analytic_account_obj.browse(cr, uid, account_ids, context=context): diff --git a/addons/mrp/i18n/es_AR.po b/addons/mrp/i18n/es_AR.po index b86befdef02..a8e1c47aa9f 100644 --- a/addons/mrp/i18n/es_AR.po +++ b/addons/mrp/i18n/es_AR.po @@ -7,14 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 5.0.0\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2011-01-11 11:15+0000\n" -"PO-Revision-Date: 2011-02-11 22:02+0000\n" +"PO-Revision-Date: 2011-02-06 16:11+0000\n" "Last-Translator: jpdborgna \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-02-12 05:00+0000\n" -"X-Generator: Launchpad (build 12351)\n" +"X-Launchpad-Export-Date: 2011-02-07 05:19+0000\n" #. module: mrp #: field:mrp.production,move_created_ids:0 diff --git a/addons/mrp/wizard/mrp_product_produce.py b/addons/mrp/wizard/mrp_product_produce.py index 6052cdb56f7..811c707eb2a 100644 --- a/addons/mrp/wizard/mrp_product_produce.py +++ b/addons/mrp/wizard/mrp_product_produce.py @@ -70,10 +70,10 @@ class mrp_product_produce(osv.osv_memory): context = {} prod_obj = self.pool.get('mrp.production') move_ids = context.get('active_ids', []) - for data in self.read(cr, uid, ids, context=context): + for data in self.browse(cr, uid, ids, context=context): for move_id in move_ids: prod_obj.action_produce(cr, uid, move_id, - data['product_qty'], data['mode'], context=context) + data.product_qty, data.mode, context=context) return {} mrp_product_produce() diff --git a/addons/pad/__openerp__.py b/addons/pad/__openerp__.py index 9ed790ceedc..c7f379050bf 100644 --- a/addons/pad/__openerp__.py +++ b/addons/pad/__openerp__.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- { 'name': 'Enhanced support for (Ether)Pad attachments', - 'version': '1.0.3', + 'version': '1.0.2', 'category': 'Generic Modules/Others', 'description': """ Adds enhanced support for (Ether)Pad attachments in the web client, lets the diff --git a/addons/point_of_sale/i18n/pt_BR.po b/addons/point_of_sale/i18n/pt_BR.po index 609fe7d0b96..89041bfd4c5 100644 --- a/addons/point_of_sale/i18n/pt_BR.po +++ b/addons/point_of_sale/i18n/pt_BR.po @@ -13,7 +13,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-02-11 04:59+0000\n" +"X-Launchpad-Export-Date: 2011-02-10 04:35+0000\n" "X-Generator: Launchpad (build 12177)\n" #. module: point_of_sale diff --git a/addons/project_scrum/wizard/project_scrum_backlog_create_task.py b/addons/project_scrum/wizard/project_scrum_backlog_create_task.py index afa4f40a5f8..a4a4722ca1d 100644 --- a/addons/project_scrum/wizard/project_scrum_backlog_create_task.py +++ b/addons/project_scrum/wizard/project_scrum_backlog_create_task.py @@ -34,7 +34,9 @@ class backlog_create_task(osv.osv_memory): document_pool = self.pool.get('ir.attachment') ids_task = [] - data = self.read(cr, uid, ids, [], context=context)[0] + record = self.browse(cr, uid, ids, context=context)[0] + user = record.user_id and record.user_id.id or False + backlogs = backlog_id.browse(cr, uid, context['active_ids'], context=context) result = mod_obj._get_id(cr, uid, 'project', 'view_task_search_form') id = mod_obj.read(cr, uid, result, ['res_id']) @@ -45,7 +47,7 @@ class backlog_create_task(osv.osv_memory): 'name': backlog.name, 'description': backlog.note, 'project_id': backlog.project_id.id, - 'user_id': data['user_id'] or False, + 'user_id': user, 'planned_hours': backlog.expected_hours, 'remaining_hours':backlog.expected_hours, 'sequence':backlog.sequence, diff --git a/addons/project_scrum/wizard/project_scrum_backlog_sprint.py b/addons/project_scrum/wizard/project_scrum_backlog_sprint.py index 591e1d5da62..f953f886e5c 100644 --- a/addons/project_scrum/wizard/project_scrum_backlog_sprint.py +++ b/addons/project_scrum/wizard/project_scrum_backlog_sprint.py @@ -42,6 +42,9 @@ class backlog_sprint_assign(osv.osv_memory): if context is None: context = {} data = self.read(cr, uid, ids, [], context=context)[0] + if isinstance(data['sprint_id'], tuple): + data['sprint_id'] = data['sprint_id'][0] + for backlog in backlog_obj.browse(cr, uid, context['active_ids'], context=context): backlog_ids.append(backlog.id) if data['convert_to_task']: diff --git a/addons/purchase_requisition/wizard/purchase_requisition_partner.py b/addons/purchase_requisition/wizard/purchase_requisition_partner.py index 8dba2ab2eae..2626000b468 100644 --- a/addons/purchase_requisition/wizard/purchase_requisition_partner.py +++ b/addons/purchase_requisition/wizard/purchase_requisition_partner.py @@ -67,19 +67,18 @@ class purchase_requisition_partner(osv.osv_memory): context = {} record_ids = context and context.get('active_ids', False) if record_ids: - data = self.read(cr, uid, ids) + data = self.browse(cr, uid, ids, context=context)[0] + company = self.pool.get('res.users').browse(cr, uid, uid, context).company_id order_obj = self.pool.get('purchase.order') order_line_obj = self.pool.get('purchase.order.line') partner_obj = self.pool.get('res.partner') - tender_line_obj = self.pool.get('purchase.requisition.line') pricelist_obj = self.pool.get('product.pricelist') prod_obj = self.pool.get('product.product') tender_obj = self.pool.get('purchase.requisition') acc_pos_obj = self.pool.get('account.fiscal.position') - partner_id = data[0]['partner_id'] - - supplier_data = partner_obj.browse(cr, uid, partner_id, context=context) + partner_id = data.partner_id and data.partner_id.id or False + supplier_data = data.partner_id address_id = partner_obj.address_get(cr, uid, [partner_id], ['delivery'])['delivery'] list_line=[] diff --git a/addons/stock/wizard/stock_split_move.py b/addons/stock/wizard/stock_split_move.py index aa7e4c17e15..ce02a212179 100644 --- a/addons/stock/wizard/stock_split_move.py +++ b/addons/stock/wizard/stock_split_move.py @@ -107,7 +107,7 @@ class stock_split_move_line(osv.osv_memory): record_id = context and context.get('active_id', False) or False pick_obj = self.pool.get('stock.picking') pick = pick_obj.browse(cr, uid, record_id, context=context) - data = self.read(cr, uid, ids[0]) + data = self.read(cr, uid, ids[0], context=context) for move in pick.move_lines: quantity = data['move%s' % move.id] if 0 < quantity < move.product_qty: diff --git a/addons/survey/wizard/survey_browse_answer.py b/addons/survey/wizard/survey_browse_answer.py index 52664eb48cc..13ff39cc6be 100644 --- a/addons/survey/wizard/survey_browse_answer.py +++ b/addons/survey/wizard/survey_browse_answer.py @@ -61,9 +61,11 @@ class survey_browse_answer(osv.osv_memory): @return : Dictionary value for Open the browse answer wizard. """ if context is None: context = {} - record = self.read(cr, uid, ids, []) + record = self.read(cr, uid, ids, [],context=context) record = record and record[0] or {} if record['response_id']: + if isinstance(record['response_id'], tuple): + record['response_id'] = record['response_id'][0] res_id = [(record['response_id'])] else: sur_response_obj = self.pool.get('survey.response') diff --git a/addons/survey/wizard/survey_print.py b/addons/survey/wizard/survey_print.py index ed6479885dc..ddaec0a4600 100644 --- a/addons/survey/wizard/survey_print.py +++ b/addons/survey/wizard/survey_print.py @@ -56,9 +56,9 @@ class survey_print(osv.osv_memory): @return : Dictionary value for print survey form. """ - datas = {'ids' : self.read(cr, uid, ids, [], context)[0]['survey_ids']} + datas = {'ids' : self.read(cr, uid, ids, [], context=context)[0]['survey_ids']} res = self.read(cr, uid, ids, ['survey_title', 'orientation', 'paper_size',\ - 'page_number', 'without_pagebreak'], context) + 'page_number', 'without_pagebreak'], context=context) res = res and res[0] or {} datas['form'] = res datas['model'] = 'survey.print' diff --git a/addons/survey/wizard/survey_print_answer.py b/addons/survey/wizard/survey_print_answer.py index 8375868e9db..02db236d233 100644 --- a/addons/survey/wizard/survey_print_answer.py +++ b/addons/survey/wizard/survey_print_answer.py @@ -59,7 +59,7 @@ class survey_print_answer(osv.osv_memory): context = {} datas = {'ids': context.get('active_ids', [])} res = self.read(cr, uid, ids, ['response_ids', 'orientation', 'paper_size',\ - 'page_number', 'without_pagebreak'], context) + 'page_number', 'without_pagebreak'], context=context) res = res and res[0] or {} datas['form'] = res datas['model'] = 'survey.print.answer' diff --git a/addons/survey/wizard/survey_print_statistics.py b/addons/survey/wizard/survey_print_statistics.py index 9c10d138e0e..10b321fcf45 100644 --- a/addons/survey/wizard/survey_print_statistics.py +++ b/addons/survey/wizard/survey_print_statistics.py @@ -44,7 +44,7 @@ class survey_print_statistics(osv.osv_memory): if context is None: context = {} datas = {'ids': context.get('active_ids', [])} - res = self.read(cr, uid, ids, ['survey_ids'], context) + res = self.read(cr, uid, ids, ['survey_ids'], context=context) res = res and res[0] or {} datas['form'] = res datas['model'] = 'survey.print.statistics' diff --git a/addons/survey/wizard/survey_selection.py b/addons/survey/wizard/survey_selection.py index 04b829077f3..4d246c2b0c3 100644 --- a/addons/survey/wizard/survey_selection.py +++ b/addons/survey/wizard/survey_selection.py @@ -122,7 +122,7 @@ class survey_name_wiz(osv.osv_memory): search_obj = self.pool.get('ir.ui.view') if context is None: context = {} - sur_id = self.read(cr, uid, ids, [])[0] + sur_id = self.read(cr, uid, ids, [], context=context)[0] survey_id = sur_id['survey_id'] context.update({'survey_id': survey_id, 'sur_name_id': sur_id['id']}) cr.execute('select count(id) from survey_history where user_id=%s\ @@ -133,7 +133,7 @@ class survey_name_wiz(osv.osv_memory): if user_limit and res >= user_limit: raise osv.except_osv(_('Warning !'),_("You can not give response for this survey more than %s times") % (user_limit)) - sur_rec = survey_obj.read(cr,uid,self.read(cr,uid,ids)[0]['survey_id']) + sur_rec = survey_obj.read(cr,uid,self.read(cr,uid,ids, context=context)[0]['survey_id']) if sur_rec['max_response_limit'] and sur_rec['max_response_limit'] <= sur_rec['tot_start_survey']: raise osv.except_osv(_('Warning !'),_("You can not give more response. Please contact the author of this survey for further assistance.")) diff --git a/addons/survey/wizard/survey_send_invitation.py b/addons/survey/wizard/survey_send_invitation.py index 361f7388f6f..f091653c499 100644 --- a/addons/survey/wizard/survey_send_invitation.py +++ b/addons/survey/wizard/survey_send_invitation.py @@ -97,7 +97,7 @@ class survey_send_invitation(osv.osv_memory): if context is None: context = {} record = self.read(cr, uid, ids, []) - survey_ids = context.get('active_ids', []) + survey_ids = context.get('active_ids', [], context=context) record = record and record[0] partner_ids = record['partner_ids'] user_ref= self.pool.get('res.users')