Merge lp:~openerp-commiter/openobject-addons/trunk-addons-aag into lp:~openerp-dev/openobject-addons/trunk-dev-addons2

Proposed by Atik Agewan(OpenERP)
Status: Merged
Merge reported by: Rucha (Open ERP)
Merged at revision: not available
Proposed branch: lp:~openerp-commiter/openobject-addons/trunk-addons-aag
Merge into: lp:~openerp-dev/openobject-addons/trunk-dev-addons2
Diff against target: 775 lines (+91/-131)
37 files modified
account/i18n/pt_BR.po (+2/-3)
account/report/account_balance.py (+2/-0)
account/wizard/account_move_journal.py (+1/-1)
account/wizard/account_open_closed_fiscalyear.py (+2/-0)
account/wizard/account_report_balance_sheet.py (+2/-1)
account/wizard/account_report_common.py (+4/-1)
account/wizard/account_report_general_ledger.py (+1/-1)
account/wizard/account_report_partner_balance.py (+1/-1)
account/wizard/account_report_partner_ledger.py (+1/-1)
account/wizard/account_report_profit_loss.py (+1/-1)
account/wizard/account_validate_account_move.py (+3/-0)
account/wizard/account_vat.py (+3/-0)
account_invoice_layout/i18n/hu.po (+3/-3)
auction/wizard/auction_pay_sel.py (+5/-5)
board/wizard/board_menu_create.py (+3/-3)
email_template/wizard/email_template_send_wizard.py (+10/-10)
hr_timesheet/i18n/pt_BR.po (+1/-1)
hr_timesheet/wizard/hr_timesheet_print_employee.py (+3/-1)
hr_timesheet_invoice/wizard/hr_timesheet_final_invoice_create.py (+3/-0)
mrp/i18n/es_AR.po (+2/-3)
mrp/wizard/mrp_product_produce.py (+2/-2)
pad/__openerp__.py (+1/-1)
point_of_sale/i18n/pt_BR.po (+1/-1)
project_scrum/wizard/project_scrum_backlog_create_task.py (+4/-2)
project_scrum/wizard/project_scrum_backlog_sprint.py (+3/-0)
purchase/purchase.py (+7/-4)
purchase_requisition/wizard/purchase_requisition_partner.py (+4/-5)
stock/i18n/stock.pot (+0/-5)
stock/wizard/stock_move.py (+0/-29)
stock/wizard/stock_move_view.xml (+0/-28)
stock/wizard/stock_split_move.py (+1/-1)
survey/wizard/survey_browse_answer.py (+7/-8)
survey/wizard/survey_print.py (+2/-3)
survey/wizard/survey_print_answer.py (+1/-1)
survey/wizard/survey_print_statistics.py (+1/-1)
survey/wizard/survey_selection.py (+3/-3)
survey/wizard/survey_send_invitation.py (+1/-1)
To merge this branch: bzr merge lp:~openerp-commiter/openobject-addons/trunk-addons-aag
Reviewer Review Type Date Requested Status
Atik Agewan(OpenERP) (community) Needs Resubmitting
OpenERP Core Team Pending
Review via email: mp+49797@code.launchpad.net

Description of the change

Purchase:[PS] Purchase order line_ Unit of measure

To post a comment you must log in.
Revision history for this message
Atik Agewan(OpenERP) (aag-openerp) :
review: Needs Resubmitting
Revision history for this message
Atik Agewan(OpenERP) (aag-openerp) wrote :

 Again..Purchase:[PS] Purchase order line_ Unit of measure

review: Needs Resubmitting

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'account/i18n/pt_BR.po'
--- account/i18n/pt_BR.po 2011-02-14 11:45:07 +0000
+++ account/i18n/pt_BR.po 2011-02-15 12:38:08 +0000
@@ -7,14 +7,13 @@
7"Project-Id-Version: OpenERP Server 6.0dev\n"7"Project-Id-Version: OpenERP Server 6.0dev\n"
8"Report-Msgid-Bugs-To: support@openerp.com\n"8"Report-Msgid-Bugs-To: support@openerp.com\n"
9"POT-Creation-Date: 2011-01-11 11:14+0000\n"9"POT-Creation-Date: 2011-01-11 11:14+0000\n"
10"PO-Revision-Date: 2011-02-11 22:50+0000\n"10"PO-Revision-Date: 2011-02-10 00:58+0000\n"
11"Last-Translator: Emerson <Unknown>\n"11"Last-Translator: Emerson <Unknown>\n"
12"Language-Team: \n"12"Language-Team: \n"
13"MIME-Version: 1.0\n"13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: 8bit\n"15"Content-Transfer-Encoding: 8bit\n"
16"X-Launchpad-Export-Date: 2011-02-12 05:00+0000\n"16"X-Launchpad-Export-Date: 2011-02-10 04:35+0000\n"
17"X-Generator: Launchpad (build 12351)\n"
1817
19#. module: account18#. module: account
20#: model:process.transition,name:account.process_transition_supplierreconcilepaid019#: model:process.transition,name:account.process_transition_supplierreconcilepaid0
2120
=== modified file 'account/report/account_balance.py'
--- account/report/account_balance.py 2011-02-15 12:13:39 +0000
+++ account/report/account_balance.py 2011-02-15 12:38:08 +0000
@@ -71,6 +71,8 @@
71 def lines(self, form, ids=[], done=None):#, level=1):71 def lines(self, form, ids=[], done=None):#, level=1):
72 def _process_child(accounts, disp_acc, parent):72 def _process_child(accounts, disp_acc, parent):
73 account_rec = [acct for acct in accounts if acct['id']==parent][0]73 account_rec = [acct for acct in accounts if acct['id']==parent][0]
74 if isinstance(account_rec['parent_id'], tuple):
75 account_rec['parent_id'] = account_rec['parent_id'][0]
74 currency_obj = self.pool.get('res.currency')76 currency_obj = self.pool.get('res.currency')
75 acc_id = self.pool.get('account.account').browse(self.cr, self.uid, account_rec['id'])77 acc_id = self.pool.get('account.account').browse(self.cr, self.uid, account_rec['id'])
76 currency = acc_id.currency_id and acc_id.currency_id or acc_id.company_id.currency_id78 currency = acc_id.currency_id and acc_id.currency_id or acc_id.company_id.currency_id
7779
=== modified file 'account/wizard/account_move_journal.py'
--- account/wizard/account_move_journal.py 2011-02-15 12:13:39 +0000
+++ account/wizard/account_move_journal.py 2011-02-15 12:38:08 +0000
@@ -148,7 +148,7 @@
148148
149 journal_id = self._get_journal(cr, uid, context)149 journal_id = self._get_journal(cr, uid, context)
150 period_id = self._get_period(cr, uid, context)150 period_id = self._get_period(cr, uid, context)
151 target_move = self.read(cr, uid, ids, [])[0]['target_move']151 target_move = self.read(cr, uid, ids, [], context=context)[0]['target_move']
152152
153 name = _("Journal Items")153 name = _("Journal Items")
154 if journal_id:154 if journal_id:
155155
=== modified file 'account/wizard/account_open_closed_fiscalyear.py'
--- account/wizard/account_open_closed_fiscalyear.py 2011-02-15 12:13:39 +0000
+++ account/wizard/account_open_closed_fiscalyear.py 2011-02-15 12:38:08 +0000
@@ -35,6 +35,8 @@
35 move_obj = self.pool.get('account.move')35 move_obj = self.pool.get('account.move')
3636
37 data = self.read(cr, uid, ids, [], context=context)[0]37 data = self.read(cr, uid, ids, [], context=context)[0]
38 if isinstance(data['fyear_id'], tuple):
39 data['fyear_id'] = data['fyear_id'][0]
38 data_fyear = fy_obj.browse(cr, uid, data['fyear_id'], context=context)40 data_fyear = fy_obj.browse(cr, uid, data['fyear_id'], context=context)
39 if not data_fyear.end_journal_period_id:41 if not data_fyear.end_journal_period_id:
40 raise osv.except_osv(_('Error !'), _('No End of year journal defined for the fiscal year'))42 raise osv.except_osv(_('Error !'), _('No End of year journal defined for the fiscal year'))
4143
=== modified file 'account/wizard/account_report_balance_sheet.py'
--- account/wizard/account_report_balance_sheet.py 2011-02-15 12:13:39 +0000
+++ account/wizard/account_report_balance_sheet.py 2011-02-15 12:38:08 +0000
@@ -65,7 +65,8 @@
65 def _print_report(self, cr, uid, ids, data, context=None):65 def _print_report(self, cr, uid, ids, data, context=None):
66 if context is None:66 if context is None:
67 context = {}67 context = {}
68 data['form'].update(self.read(cr, uid, ids, ['display_type','reserve_account_id'])[0])68 record = self.browse(cr, uid, ids, context=context)[0]
69 data['form'].update({'display_type':record.display_type, 'reserve_account_id':record.reserve_account_id.id})
69 if not data['form']['reserve_account_id']:70 if not data['form']['reserve_account_id']:
70 raise osv.except_osv(_('Warning'),_('Please define the Reserve and Profit/Loss account for current user company !'))71 raise osv.except_osv(_('Warning'),_('Please define the Reserve and Profit/Loss account for current user company !'))
71 data = self.pre_print_report(cr, uid, ids, data, context=context)72 data = self.pre_print_report(cr, uid, ids, data, context=context)
7273
=== modified file 'account/wizard/account_report_common.py'
--- account/wizard/account_report_common.py 2011-02-15 12:13:39 +0000
+++ account/wizard/account_report_common.py 2011-02-15 12:38:08 +0000
@@ -131,7 +131,10 @@
131 data = {}131 data = {}
132 data['ids'] = context.get('active_ids', [])132 data['ids'] = context.get('active_ids', [])
133 data['model'] = context.get('active_model', 'ir.ui.menu')133 data['model'] = context.get('active_model', 'ir.ui.menu')
134 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]134 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]
135 for field in data['form'].keys():
136 if isinstance(data['form'][field], tuple):
137 data['form'][field] = data['form'][field][0]
135 used_context = self._build_contexts(cr, uid, ids, data, context=context)138 used_context = self._build_contexts(cr, uid, ids, data, context=context)
136 data['form']['periods'] = used_context.get('periods', False) and used_context['periods'] or []139 data['form']['periods'] = used_context.get('periods', False) and used_context['periods'] or []
137 data['form']['used_context'] = used_context140 data['form']['used_context'] = used_context
138141
=== modified file 'account/wizard/account_report_general_ledger.py'
--- account/wizard/account_report_general_ledger.py 2011-02-15 12:13:39 +0000
+++ account/wizard/account_report_general_ledger.py 2011-02-15 12:38:08 +0000
@@ -50,7 +50,7 @@
50 if context is None:50 if context is None:
51 context = {}51 context = {}
52 data = self.pre_print_report(cr, uid, ids, data, context=context)52 data = self.pre_print_report(cr, uid, ids, data, context=context)
53 data['form'].update(self.read(cr, uid, ids, ['landscape', 'initial_balance', 'amount_currency', 'sortby'])[0])53 data['form'].update(self.read(cr, uid, ids, ['landscape', 'initial_balance', 'amount_currency', 'sortby'], context=context)[0])
54 if not data['form']['fiscalyear_id']:# GTK client problem onchange does not consider in save record54 if not data['form']['fiscalyear_id']:# GTK client problem onchange does not consider in save record
55 data['form'].update({'initial_balance': False})55 data['form'].update({'initial_balance': False})
56 if data['form']['landscape']:56 if data['form']['landscape']:
5757
=== modified file 'account/wizard/account_report_partner_balance.py'
--- account/wizard/account_report_partner_balance.py 2011-02-15 12:13:39 +0000
+++ account/wizard/account_report_partner_balance.py 2011-02-15 12:38:08 +0000
@@ -42,7 +42,7 @@
42 if context is None:42 if context is None:
43 context = {}43 context = {}
44 data = self.pre_print_report(cr, uid, ids, data, context=context)44 data = self.pre_print_report(cr, uid, ids, data, context=context)
45 data['form'].update(self.read(cr, uid, ids, ['display_partner'])[0])45 data['form'].update(self.read(cr, uid, ids, ['display_partner'], context=context)[0])
46 return {46 return {
47 'type': 'ir.actions.report.xml',47 'type': 'ir.actions.report.xml',
48 'report_name': 'account.partner.balance',48 'report_name': 'account.partner.balance',
4949
=== modified file 'account/wizard/account_report_partner_ledger.py'
--- account/wizard/account_report_partner_ledger.py 2011-02-15 12:13:39 +0000
+++ account/wizard/account_report_partner_ledger.py 2011-02-15 12:38:08 +0000
@@ -47,7 +47,7 @@
47 if context is None:47 if context is None:
48 context = {}48 context = {}
49 data = self.pre_print_report(cr, uid, ids, data, context=context)49 data = self.pre_print_report(cr, uid, ids, data, context=context)
50 data['form'].update(self.read(cr, uid, ids, ['initial_balance', 'reconcil', 'page_split', 'amount_currency'])[0])50 data['form'].update(self.read(cr, uid, ids, ['initial_balance', 'reconcil', 'page_split', 'amount_currency'], context=context)[0])
51 if data['form']['page_split']:51 if data['form']['page_split']:
52 return {52 return {
53 'type': 'ir.actions.report.xml',53 'type': 'ir.actions.report.xml',
5454
=== modified file 'account/wizard/account_report_profit_loss.py'
--- account/wizard/account_report_profit_loss.py 2011-02-15 12:13:39 +0000
+++ account/wizard/account_report_profit_loss.py 2011-02-15 12:38:08 +0000
@@ -42,7 +42,7 @@
42 if context is None:42 if context is None:
43 context = {}43 context = {}
44 data = self.pre_print_report(cr, uid, ids, data, context=context)44 data = self.pre_print_report(cr, uid, ids, data, context=context)
45 data['form'].update(self.read(cr, uid, ids, ['display_type'])[0])45 data['form'].update(self.read(cr, uid, ids, ['display_type'], context=context)[0])
46 if data['form']['display_type']:46 if data['form']['display_type']:
47 return {47 return {
48 'type': 'ir.actions.report.xml',48 'type': 'ir.actions.report.xml',
4949
=== modified file 'account/wizard/account_validate_account_move.py'
--- account/wizard/account_validate_account_move.py 2011-02-15 12:13:39 +0000
+++ account/wizard/account_validate_account_move.py 2011-02-15 12:38:08 +0000
@@ -34,6 +34,9 @@
34 if context is None:34 if context is None:
35 context = {}35 context = {}
36 data = self.read(cr, uid, ids, context=context)[0]36 data = self.read(cr, uid, ids, context=context)[0]
37 for field in data.keys():
38 if isinstance(data[field], tuple):
39 data[field] = data[field][0]
37 ids_move = obj_move.search(cr, uid, [('state','=','draft'),('journal_id','=',data['journal_id']),('period_id','=',data['period_id'])])40 ids_move = obj_move.search(cr, uid, [('state','=','draft'),('journal_id','=',data['journal_id']),('period_id','=',data['period_id'])])
38 if not ids_move:41 if not ids_move:
39 raise osv.except_osv(_('Warning'), _('Specified Journal does not have any account move entries in draft state for this period'))42 raise osv.except_osv(_('Warning'), _('Specified Journal does not have any account move entries in draft state for this period'))
4043
=== modified file 'account/wizard/account_vat.py'
--- account/wizard/account_vat.py 2011-02-15 12:13:39 +0000
+++ account/wizard/account_vat.py 2011-02-15 12:38:08 +0000
@@ -47,6 +47,9 @@
47 datas = {'ids': context.get('active_ids', [])}47 datas = {'ids': context.get('active_ids', [])}
48 datas['model'] = 'account.tax.code'48 datas['model'] = 'account.tax.code'
49 datas['form'] = self.read(cr, uid, ids)[0]49 datas['form'] = self.read(cr, uid, ids)[0]
50 for field in datas['form'].keys():
51 if isinstance(datas['form'][field], tuple):
52 datas['form'][field] = datas['form'][field][0]
50 datas['form']['company_id'] = self.pool.get('account.tax.code').browse(cr, uid, [datas['form']['chart_tax_id']], context=context)[0].company_id.id53 datas['form']['company_id'] = self.pool.get('account.tax.code').browse(cr, uid, [datas['form']['chart_tax_id']], context=context)[0].company_id.id
51 return {54 return {
52 'type': 'ir.actions.report.xml',55 'type': 'ir.actions.report.xml',
5356
=== modified file 'account_invoice_layout/i18n/hu.po'
--- account_invoice_layout/i18n/hu.po 2011-02-11 04:59:58 +0000
+++ account_invoice_layout/i18n/hu.po 2011-02-15 12:38:08 +0000
@@ -7,13 +7,13 @@
7"Project-Id-Version: OpenERP Server 6.0dev\n"7"Project-Id-Version: OpenERP Server 6.0dev\n"
8"Report-Msgid-Bugs-To: support@openerp.com\n"8"Report-Msgid-Bugs-To: support@openerp.com\n"
9"POT-Creation-Date: 2011-01-11 11:14+0000\n"9"POT-Creation-Date: 2011-01-11 11:14+0000\n"
10"PO-Revision-Date: 2011-02-10 13:27+0000\n"10"PO-Revision-Date: 2011-02-09 12:16+0000\n"
11"Last-Translator: NOVOTRADE RENDSZERHÁZ <openerp@novotrade.hu>\n"11"Last-Translator: NOVOTRADE RENDSZERHÁZ <openerp@novotrade.hu>\n"
12"Language-Team: \n"12"Language-Team: \n"
13"MIME-Version: 1.0\n"13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=utf-8\n"14"Content-Type: text/plain; charset=utf-8\n"
15"Content-Transfer-Encoding: 8bit\n"15"Content-Transfer-Encoding: 8bit\n"
16"X-Launchpad-Export-Date: 2011-02-11 04:59+0000\n"16"X-Launchpad-Export-Date: 2011-02-10 04:35+0000\n"
17"X-Generator: Launchpad (build 12177)\n"17"X-Generator: Launchpad (build 12177)\n"
1818
19#. module: account_invoice_layout19#. module: account_invoice_layout
@@ -160,7 +160,7 @@
160#: report:account.invoice.layout:0160#: report:account.invoice.layout:0
161#: report:notify_account.invoice:0161#: report:notify_account.invoice:0
162msgid "Price"162msgid "Price"
163msgstr "Nettó érték"163msgstr "Érték"
164164
165#. module: account_invoice_layout165#. module: account_invoice_layout
166#: report:account.invoice.layout:0166#: report:account.invoice.layout:0
167167
=== modified file 'auction/wizard/auction_pay_sel.py'
--- auction/wizard/auction_pay_sel.py 2011-01-14 00:11:01 +0000
+++ auction/wizard/auction_pay_sel.py 2011-02-15 12:38:08 +0000
@@ -42,14 +42,14 @@
42 @param context: A standard dictionary42 @param context: A standard dictionary
43 @return:43 @return:
44 """44 """
45 if context is None: 45 if context is None:
46 context = {}46 context = {}
47 lot = self.pool.get('auction.lots').browse(cr, uid, context['active_id'], context=context)47 lot = self.pool.get('auction.lots').browse(cr, uid, context['active_id'], context=context)
48 invoice_obj = self.pool.get('account.invoice')48 invoice_obj = self.pool.get('account.invoice')
49 for datas in self.read(cr, uid, ids, context=context):49 for datas in self.browse(cr, uid, ids, context=context):
50 account_id = datas.get('writeoff_acc_id', False)50 account_id = datas.dest_account_id and datas.dest_account_id.id or False
51 period_id = datas.get('period_id', False)51 period_id = datas.period_id and datas.period_id.id or False
52 journal_id = datas.get('journal_id', False)52 journal_id = datas.journal_id and datas.journal_id.id or False
53 if lot.sel_inv_id:53 if lot.sel_inv_id:
54 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)54 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)
55 return {'type': 'ir.actions.act_window_close'}55 return {'type': 'ir.actions.act_window_close'}
5656
=== modified file 'board/wizard/board_menu_create.py'
--- board/wizard/board_menu_create.py 2011-02-09 07:18:57 +0000
+++ board/wizard/board_menu_create.py 2011-02-15 12:38:08 +0000
@@ -70,10 +70,10 @@
70 })70 })
71 obj_menu = self.pool.get('ir.ui.menu')71 obj_menu = self.pool.get('ir.ui.menu')
72 #start Loop72 #start Loop
73 for data in self.read(cr, uid, ids):73 for data in self.browse(cr, uid, ids, context=context):
74 obj_menu.create(cr, uid, {74 obj_menu.create(cr, uid, {
75 'name': data.get('menu_name'),75 'name': data.menu_name,
76 'parent_id': data.get('menu_parent_id'),76 'parent_id': data.menu_parent_id.id,
77 'icon': 'STOCK_SELECT_COLOR',77 'icon': 'STOCK_SELECT_COLOR',
78 'action': 'ir.actions.act_window,' + str(action_id)78 'action': 'ir.actions.act_window,' + str(action_id)
79 }, context=context)79 }, context=context)
8080
=== modified file 'email_template/wizard/email_template_send_wizard.py'
--- email_template/wizard/email_template_send_wizard.py 2011-01-14 00:11:01 +0000
+++ email_template/wizard/email_template_send_wizard.py 2011-02-15 12:38:08 +0000
@@ -66,7 +66,7 @@
66 if not id:66 if not id:
67 id = context['src_rec_ids'][0]67 id = context['src_rec_ids'][0]
68 return get_value(cursor, user, id, message, template, context)68 return get_value(cursor, user, id, message, template, context)
69 69
70 def _get_template(self, cr, uid, context=None):70 def _get_template(self, cr, uid, context=None):
71 if context is None:71 if context is None:
72 context = {}72 context = {}
@@ -116,13 +116,13 @@
116 'to':fields.char('To',size=250,required=True),116 'to':fields.char('To',size=250,required=True),
117 'cc':fields.char('CC',size=250,),117 'cc':fields.char('CC',size=250,),
118 'bcc':fields.char('BCC',size=250,),118 'bcc':fields.char('BCC',size=250,),
119 'reply_to':fields.char('Reply-To', 119 'reply_to':fields.char('Reply-To',
120 size=250, 120 size=250,
121 help="The address recipients should reply to,"121 help="The address recipients should reply to,"
122 " if different from the From address."122 " if different from the From address."
123 " Placeholders can be used here."),123 " Placeholders can be used here."),
124 'message_id':fields.char('Message-ID', 124 'message_id':fields.char('Message-ID',
125 size=250, 125 size=250,
126 help="The Message-ID header value, if you need to"126 help="The Message-ID header value, if you need to"
127 "specify it, for example to automatically recognize the replies later."127 "specify it, for example to automatically recognize the replies later."
128 " Placeholders can be used here."),128 " Placeholders can be used here."),
@@ -133,12 +133,12 @@
133 'signature':fields.boolean('Attach my signature to mail'),133 'signature':fields.boolean('Attach my signature to mail'),
134 #'filename':fields.text('File Name'),134 #'filename':fields.text('File Name'),
135 'requested':fields.integer('No of requested Mails',readonly=True),135 'requested':fields.integer('No of requested Mails',readonly=True),
136 'generated':fields.integer('No of generated Mails',readonly=True), 136 'generated':fields.integer('No of generated Mails',readonly=True),
137 'full_success':fields.boolean('Complete Success',readonly=True),137 'full_success':fields.boolean('Complete Success',readonly=True),
138 'attachment_ids': fields.many2many('ir.attachment','send_wizard_attachment_rel', 'wizard_id', 'attachment_id', 'Attachments'),138 'attachment_ids': fields.many2many('ir.attachment','send_wizard_attachment_rel', 'wizard_id', 'attachment_id', 'Attachments'),
139 }139 }
140140
141 #FIXME: probably better by overriding default_get directly 141 #FIXME: probably better by overriding default_get directly
142 _defaults = {142 _defaults = {
143 'state': lambda self,cr,uid,ctx: len(ctx['src_rec_ids']) > 1 and 'multi' or 'single',143 'state': lambda self,cr,uid,ctx: len(ctx['src_rec_ids']) > 1 and 'multi' or 'single',
144 'rel_model': lambda self,cr,uid,ctx: self.pool.get('ir.model').search(cr,uid,[('model','=',ctx['src_model'])],context=ctx)[0],144 '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 @@
156 'reply_to': lambda self,cr,uid,ctx: self._get_template_value(cr, uid, 'reply_to', ctx),156 'reply_to': lambda self,cr,uid,ctx: self._get_template_value(cr, uid, 'reply_to', ctx),
157 'requested':lambda self,cr,uid,ctx: len(ctx['src_rec_ids']),157 'requested':lambda self,cr,uid,ctx: len(ctx['src_rec_ids']),
158 'full_success': False,158 'full_success': False,
159 'attachment_ids': [], 159 'attachment_ids': [],
160 }160 }
161161
162 def fields_get(self, cr, uid, fields=None, context=None, write_access=True):162 def fields_get(self, cr, uid, fields=None, context=None, write_access=True):
@@ -200,7 +200,7 @@
200 else:200 else:
201 raise osv.except_osv(_("Email Template"),_("Email sending failed for one or more objects."))201 raise osv.except_osv(_("Email Template"),_("Email sending failed for one or more objects."))
202 return True202 return True
203 203
204 def save_to_mailbox(self, cr, uid, ids, context=None):204 def save_to_mailbox(self, cr, uid, ids, context=None):
205 def get_end_value(id, value):205 def get_end_value(id, value):
206 if len(context['src_rec_ids']) > 1: # Multiple Mail: Gets value from the template206 if len(context['src_rec_ids']) > 1: # Multiple Mail: Gets value from the template
@@ -213,7 +213,7 @@
213 mail_ids = []213 mail_ids = []
214 template = self._get_template(cr, uid, context)214 template = self._get_template(cr, uid, context)
215 for id in context['src_rec_ids']:215 for id in context['src_rec_ids']:
216 screen_vals = self.read(cr, uid, ids[0], [],context)216 screen_vals = self.read(cr, uid, ids[0], [],context=context)
217 account = self.pool.get('email_template.account').read(cr, uid, screen_vals['from'], context=context)217 account = self.pool.get('email_template.account').read(cr, uid, screen_vals['from'], context=context)
218 vals = {218 vals = {
219 'email_from': tools.ustr(account['name']) + "<" + tools.ustr(account['email_id']) + ">",219 'email_from': tools.ustr(account['name']) + "<" + tools.ustr(account['email_id']) + ">",
220220
=== modified file 'hr_timesheet/i18n/pt_BR.po'
--- hr_timesheet/i18n/pt_BR.po 2011-02-11 04:59:58 +0000
+++ hr_timesheet/i18n/pt_BR.po 2011-02-15 12:38:08 +0000
@@ -14,7 +14,7 @@
14"MIME-Version: 1.0\n"14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"16"Content-Transfer-Encoding: 8bit\n"
17"X-Launchpad-Export-Date: 2011-02-11 04:59+0000\n"17"X-Launchpad-Export-Date: 2011-02-10 04:35+0000\n"
18"X-Generator: Launchpad (build 12177)\n"18"X-Generator: Launchpad (build 12177)\n"
1919
20#. module: hr_timesheet20#. module: hr_timesheet
2121
=== modified file 'hr_timesheet/wizard/hr_timesheet_print_employee.py'
--- hr_timesheet/wizard/hr_timesheet_print_employee.py 2011-01-14 00:11:01 +0000
+++ hr_timesheet/wizard/hr_timesheet_print_employee.py 2011-02-15 12:38:08 +0000
@@ -31,7 +31,7 @@
31 'Month', required=True),31 'Month', required=True),
32 'year': fields.integer('Year', required=True),32 'year': fields.integer('Year', required=True),
33 'employee_id': fields.many2one('hr.employee', 'Employee', required=True)33 'employee_id': fields.many2one('hr.employee', 'Employee', required=True)
34 34
35 }35 }
3636
37 def _get_user(self, cr, uid, context=None):37 def _get_user(self, cr, uid, context=None):
@@ -50,6 +50,8 @@
5050
51 def print_report(self, cr, uid, ids, context=None):51 def print_report(self, cr, uid, ids, context=None):
52 data = self.read(cr, uid, ids, context=context)[0]52 data = self.read(cr, uid, ids, context=context)[0]
53 if isinstance(data['employee_id'], tuple):
54 data['employee_id'] = data['employee_id'][0]
53 datas = {55 datas = {
54 'ids': [],56 'ids': [],
55 'model': 'hr.employee',57 'model': 'hr.employee',
5658
=== modified file 'hr_timesheet_invoice/wizard/hr_timesheet_final_invoice_create.py'
--- hr_timesheet_invoice/wizard/hr_timesheet_final_invoice_create.py 2011-01-14 00:11:01 +0000
+++ hr_timesheet_invoice/wizard/hr_timesheet_final_invoice_create.py 2011-02-15 12:38:08 +0000
@@ -59,6 +59,9 @@
59 res = mod_obj.read(cr, uid, result, ['res_id'], context=context)59 res = mod_obj.read(cr, uid, result, ['res_id'], context=context)
6060
61 data = self.read(cr, uid, ids, [], context=context)[0]61 data = self.read(cr, uid, ids, [], context=context)[0]
62 if isinstance(data['balance_product'], tuple):
63 data['balance_product'] = data['balance_product'][0]
64
62 account_ids = 'active_ids' in context and context['active_ids'] or []65 account_ids = 'active_ids' in context and context['active_ids'] or []
6366
64 for account in analytic_account_obj.browse(cr, uid, account_ids, context=context):67 for account in analytic_account_obj.browse(cr, uid, account_ids, context=context):
6568
=== modified file 'mrp/i18n/es_AR.po'
--- mrp/i18n/es_AR.po 2011-02-12 05:00:59 +0000
+++ mrp/i18n/es_AR.po 2011-02-15 12:38:08 +0000
@@ -7,14 +7,13 @@
7"Project-Id-Version: OpenERP Server 5.0.0\n"7"Project-Id-Version: OpenERP Server 5.0.0\n"
8"Report-Msgid-Bugs-To: support@openerp.com\n"8"Report-Msgid-Bugs-To: support@openerp.com\n"
9"POT-Creation-Date: 2011-01-11 11:15+0000\n"9"POT-Creation-Date: 2011-01-11 11:15+0000\n"
10"PO-Revision-Date: 2011-02-11 22:02+0000\n"10"PO-Revision-Date: 2011-02-06 16:11+0000\n"
11"Last-Translator: jpdborgna <Unknown>\n"11"Last-Translator: jpdborgna <Unknown>\n"
12"Language-Team: \n"12"Language-Team: \n"
13"MIME-Version: 1.0\n"13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: 8bit\n"15"Content-Transfer-Encoding: 8bit\n"
16"X-Launchpad-Export-Date: 2011-02-12 05:00+0000\n"16"X-Launchpad-Export-Date: 2011-02-07 05:19+0000\n"
17"X-Generator: Launchpad (build 12351)\n"
1817
19#. module: mrp18#. module: mrp
20#: field:mrp.production,move_created_ids:019#: field:mrp.production,move_created_ids:0
2120
=== modified file 'mrp/wizard/mrp_product_produce.py'
--- mrp/wizard/mrp_product_produce.py 2011-01-14 00:11:01 +0000
+++ mrp/wizard/mrp_product_produce.py 2011-02-15 12:38:08 +0000
@@ -70,10 +70,10 @@
70 context = {}70 context = {}
71 prod_obj = self.pool.get('mrp.production')71 prod_obj = self.pool.get('mrp.production')
72 move_ids = context.get('active_ids', [])72 move_ids = context.get('active_ids', [])
73 for data in self.read(cr, uid, ids, context=context):73 for data in self.browse(cr, uid, ids, context=context):
74 for move_id in move_ids:74 for move_id in move_ids:
75 prod_obj.action_produce(cr, uid, move_id,75 prod_obj.action_produce(cr, uid, move_id,
76 data['product_qty'], data['mode'], context=context)76 data.product_qty, data.mode, context=context)
77 return {}77 return {}
7878
79mrp_product_produce()79mrp_product_produce()
8080
=== modified file 'pad/__openerp__.py'
--- pad/__openerp__.py 2011-02-10 16:10:42 +0000
+++ pad/__openerp__.py 2011-02-15 12:38:08 +0000
@@ -1,7 +1,7 @@
1# -*- coding: utf-8 -*-1# -*- coding: utf-8 -*-
2{2{
3 'name': 'Enhanced support for (Ether)Pad attachments',3 'name': 'Enhanced support for (Ether)Pad attachments',
4 'version': '1.0.3',4 'version': '1.0.2',
5 'category': 'Generic Modules/Others',5 'category': 'Generic Modules/Others',
6 'description': """6 'description': """
7Adds enhanced support for (Ether)Pad attachments in the web client, lets the7Adds enhanced support for (Ether)Pad attachments in the web client, lets the
88
=== modified file 'point_of_sale/i18n/pt_BR.po'
--- point_of_sale/i18n/pt_BR.po 2011-02-11 04:59:58 +0000
+++ point_of_sale/i18n/pt_BR.po 2011-02-15 12:38:08 +0000
@@ -13,7 +13,7 @@
13"MIME-Version: 1.0\n"13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: 8bit\n"15"Content-Transfer-Encoding: 8bit\n"
16"X-Launchpad-Export-Date: 2011-02-11 04:59+0000\n"16"X-Launchpad-Export-Date: 2011-02-10 04:35+0000\n"
17"X-Generator: Launchpad (build 12177)\n"17"X-Generator: Launchpad (build 12177)\n"
1818
19#. module: point_of_sale19#. module: point_of_sale
2020
=== modified file 'project_scrum/wizard/project_scrum_backlog_create_task.py'
--- project_scrum/wizard/project_scrum_backlog_create_task.py 2011-01-14 00:11:01 +0000
+++ project_scrum/wizard/project_scrum_backlog_create_task.py 2011-02-15 12:38:08 +0000
@@ -34,7 +34,9 @@
34 document_pool = self.pool.get('ir.attachment')34 document_pool = self.pool.get('ir.attachment')
35 ids_task = []35 ids_task = []
3636
37 data = self.read(cr, uid, ids, [], context=context)[0]37 record = self.browse(cr, uid, ids, context=context)[0]
38 user = record.user_id and record.user_id.id or False
39
38 backlogs = backlog_id.browse(cr, uid, context['active_ids'], context=context)40 backlogs = backlog_id.browse(cr, uid, context['active_ids'], context=context)
39 result = mod_obj._get_id(cr, uid, 'project', 'view_task_search_form')41 result = mod_obj._get_id(cr, uid, 'project', 'view_task_search_form')
40 id = mod_obj.read(cr, uid, result, ['res_id'])42 id = mod_obj.read(cr, uid, result, ['res_id'])
@@ -45,7 +47,7 @@
45 'name': backlog.name,47 'name': backlog.name,
46 'description': backlog.note,48 'description': backlog.note,
47 'project_id': backlog.project_id.id,49 'project_id': backlog.project_id.id,
48 'user_id': data['user_id'] or False,50 'user_id': user,
49 'planned_hours': backlog.expected_hours,51 'planned_hours': backlog.expected_hours,
50 'remaining_hours':backlog.expected_hours,52 'remaining_hours':backlog.expected_hours,
51 'sequence':backlog.sequence,53 'sequence':backlog.sequence,
5254
=== modified file 'project_scrum/wizard/project_scrum_backlog_sprint.py'
--- project_scrum/wizard/project_scrum_backlog_sprint.py 2011-01-14 00:11:01 +0000
+++ project_scrum/wizard/project_scrum_backlog_sprint.py 2011-02-15 12:38:08 +0000
@@ -42,6 +42,9 @@
42 if context is None:42 if context is None:
43 context = {}43 context = {}
44 data = self.read(cr, uid, ids, [], context=context)[0]44 data = self.read(cr, uid, ids, [], context=context)[0]
45 if isinstance(data['sprint_id'], tuple):
46 data['sprint_id'] = data['sprint_id'][0]
47
45 for backlog in backlog_obj.browse(cr, uid, context['active_ids'], context=context):48 for backlog in backlog_obj.browse(cr, uid, context['active_ids'], context=context):
46 backlog_ids.append(backlog.id)49 backlog_ids.append(backlog.id)
47 if data['convert_to_task']:50 if data['convert_to_task']:
4851
=== modified file 'purchase/purchase.py'
--- purchase/purchase.py 2011-02-15 05:48:34 +0000
+++ purchase/purchase.py 2011-02-15 12:38:08 +0000
@@ -665,7 +665,6 @@
665 'notes': notes or'', 'product_uom' : uom or False}, 'domain':{'product_uom':[]}}665 'notes': notes or'', 'product_uom' : uom or False}, 'domain':{'product_uom':[]}}
666 res = {}666 res = {}
667 prod= self.pool.get('product.product').browse(cr, uid, product)667 prod= self.pool.get('product.product').browse(cr, uid, product)
668
669 product_uom_pool = self.pool.get('product.uom')668 product_uom_pool = self.pool.get('product.uom')
670 lang=False669 lang=False
671 if partner_id:670 if partner_id:
@@ -681,6 +680,11 @@
681 date_order = time.strftime('%Y-%m-%d')680 date_order = time.strftime('%Y-%m-%d')
682 qty = qty or 1.0681 qty = qty or 1.0
683 seller_delay = 0682 seller_delay = 0
683 if uom:
684 uom1_cat = prod.uom_id.category_id.id
685 uom2_cat = product_uom_pool.browse(cr, uid, uom).category_id.id
686 if uom1_cat != uom2_cat:
687 uom = False
684688
685 prod_name = self.pool.get('product.product').name_get(cr, uid, [prod.id], context=context)[0][1]689 prod_name = self.pool.get('product.product').name_get(cr, uid, [prod.id], context=context)[0][1]
686 res = {}690 res = {}
@@ -707,14 +711,13 @@
707 'taxes_id':map(lambda x: x.id, prod.supplier_taxes_id),711 'taxes_id':map(lambda x: x.id, prod.supplier_taxes_id),
708 'date_planned': date_planned or dt,'notes': notes or prod.description_purchase,712 'date_planned': date_planned or dt,'notes': notes or prod.description_purchase,
709 'product_qty': qty,713 'product_qty': qty,
710 'product_uom': uom}})714 'product_uom': prod.uom_id.id}})
711 domain = {}715 domain = {}
712716
713 taxes = self.pool.get('account.tax').browse(cr, uid,map(lambda x: x.id, prod.supplier_taxes_id))717 taxes = self.pool.get('account.tax').browse(cr, uid,map(lambda x: x.id, prod.supplier_taxes_id))
714 fpos = fiscal_position and self.pool.get('account.fiscal.position').browse(cr, uid, fiscal_position) or False718 fpos = fiscal_position and self.pool.get('account.fiscal.position').browse(cr, uid, fiscal_position) or False
715 res['value']['taxes_id'] = self.pool.get('account.fiscal.position').map_tax(cr, uid, fpos, taxes)719 res['value']['taxes_id'] = self.pool.get('account.fiscal.position').map_tax(cr, uid, fpos, taxes)
716720 res2 = self.pool.get('product.uom').read(cr, uid, [prod.uom_id.id], ['category_id'])
717 res2 = self.pool.get('product.uom').read(cr, uid, [uom], ['category_id'])
718 res3 = prod.uom_id.category_id.id721 res3 = prod.uom_id.category_id.id
719 domain = {'product_uom':[('category_id','=',res2[0]['category_id'][0])]}722 domain = {'product_uom':[('category_id','=',res2[0]['category_id'][0])]}
720 if res2[0]['category_id'][0] != res3:723 if res2[0]['category_id'][0] != res3:
721724
=== modified file 'purchase_requisition/wizard/purchase_requisition_partner.py'
--- purchase_requisition/wizard/purchase_requisition_partner.py 2011-01-14 00:11:01 +0000
+++ purchase_requisition/wizard/purchase_requisition_partner.py 2011-02-15 12:38:08 +0000
@@ -67,19 +67,18 @@
67 context = {}67 context = {}
68 record_ids = context and context.get('active_ids', False)68 record_ids = context and context.get('active_ids', False)
69 if record_ids:69 if record_ids:
70 data = self.read(cr, uid, ids)70 data = self.browse(cr, uid, ids, context=context)[0]
71
71 company = self.pool.get('res.users').browse(cr, uid, uid, context).company_id72 company = self.pool.get('res.users').browse(cr, uid, uid, context).company_id
72 order_obj = self.pool.get('purchase.order')73 order_obj = self.pool.get('purchase.order')
73 order_line_obj = self.pool.get('purchase.order.line')74 order_line_obj = self.pool.get('purchase.order.line')
74 partner_obj = self.pool.get('res.partner')75 partner_obj = self.pool.get('res.partner')
75 tender_line_obj = self.pool.get('purchase.requisition.line')
76 pricelist_obj = self.pool.get('product.pricelist')76 pricelist_obj = self.pool.get('product.pricelist')
77 prod_obj = self.pool.get('product.product')77 prod_obj = self.pool.get('product.product')
78 tender_obj = self.pool.get('purchase.requisition')78 tender_obj = self.pool.get('purchase.requisition')
79 acc_pos_obj = self.pool.get('account.fiscal.position')79 acc_pos_obj = self.pool.get('account.fiscal.position')
80 partner_id = data[0]['partner_id']80 partner_id = data.partner_id and data.partner_id.id or False
8181 supplier_data = data.partner_id
82 supplier_data = partner_obj.browse(cr, uid, partner_id, context=context)
8382
84 address_id = partner_obj.address_get(cr, uid, [partner_id], ['delivery'])['delivery']83 address_id = partner_obj.address_get(cr, uid, [partner_id], ['delivery'])['delivery']
85 list_line=[]84 list_line=[]
8685
=== modified file 'stock/i18n/stock.pot'
--- stock/i18n/stock.pot 2011-01-14 00:11:01 +0000
+++ stock/i18n/stock.pot 2011-02-15 12:38:08 +0000
@@ -1114,7 +1114,6 @@
1114#: view:stock.invoice.onshipping:01114#: view:stock.invoice.onshipping:0
1115#: view:stock.location.product:01115#: view:stock.location.product:0
1116#: view:stock.move:01116#: view:stock.move:0
1117#: view:stock.move.track:0
1118#: view:stock.picking:01117#: view:stock.picking:0
1119#: view:stock.split.into:01118#: view:stock.split.into:0
1120msgid "_Cancel"1119msgid "_Cancel"
@@ -1693,7 +1692,6 @@
1693msgstr ""1692msgstr ""
16941693
1695#. module: stock1694#. module: stock
1696#: field:stock.move.track,quantity:0
1697msgid "Quantity per lot"1695msgid "Quantity per lot"
1698msgstr ""1696msgstr ""
16991697
@@ -1920,7 +1918,6 @@
19201918
1921#. module: stock1919#. module: stock
1922#: model:ir.actions.act_window,name:stock.track_line_old1920#: model:ir.actions.act_window,name:stock.track_line_old
1923#: view:stock.move.track:0
1924msgid "Tracking a move"1921msgid "Tracking a move"
1925msgstr ""1922msgstr ""
19261923
@@ -2461,7 +2458,6 @@
2461msgstr ""2458msgstr ""
24622459
2463#. module: stock2460#. module: stock
2464#: field:stock.move.track,tracking_prefix:0
2465msgid "Tracking prefix"2461msgid "Tracking prefix"
2466msgstr ""2462msgstr ""
24672463
@@ -2901,7 +2897,6 @@
2901#: view:stock.move.consume:02897#: view:stock.move.consume:0
2902#: view:stock.move.scrap:02898#: view:stock.move.scrap:0
2903#: view:stock.move.split:02899#: view:stock.move.split:0
2904#: view:stock.move.track:0
2905#: view:stock.split.into:02900#: view:stock.split.into:0
2906msgid "Ok"2901msgid "Ok"
2907msgstr ""2902msgstr ""
29082903
=== modified file 'stock/wizard/stock_move.py'
--- stock/wizard/stock_move.py 2011-02-15 12:13:39 +0000
+++ stock/wizard/stock_move.py 2011-02-15 12:38:08 +0000
@@ -21,35 +21,6 @@
2121
22from osv import fields, osv22from osv import fields, osv
2323
24class stock_move_track(osv.osv_memory):
25 _name = "stock.move.track"
26 _description = "Track moves"
27
28 _columns = {
29 'tracking_prefix': fields.char('Tracking prefix', size=64),
30 'quantity': fields.float("Quantity per lot")
31 }
32
33 _defaults = {
34 'quantity': lambda *x: 1
35 }
36
37 def track_lines(self, cr, uid, ids, context=None):
38 """ To track stock moves lines
39 @param self: The object pointer.
40 @param cr: A database cursor
41 @param uid: ID of the user currently logged in
42 @param ids: An ID or list of IDs if we want more than one
43 @param context: A standard dictionary
44 @return:
45 """
46 datas = self.read(cr, uid, ids)[0]
47 move_obj = self.pool.get('stock.move')
48 move_obj._track_lines(cr, uid, context['active_id'], datas, context=context)
49 return {'type': 'ir.actions.act_window_close'}
50
51stock_move_track()
52
53class stock_move_consume(osv.osv_memory):24class stock_move_consume(osv.osv_memory):
54 _name = "stock.move.consume"25 _name = "stock.move.consume"
55 _description = "Consume Products"26 _description = "Consume Products"
5627
=== modified file 'stock/wizard/stock_move_view.xml'
--- stock/wizard/stock_move_view.xml 2011-01-14 00:11:01 +0000
+++ stock/wizard/stock_move_view.xml 2011-02-15 12:38:08 +0000
@@ -2,34 +2,6 @@
2<openerp>2<openerp>
3 <data>3 <data>
44
5 <record id="view_stock_move_track_wizard" model="ir.ui.view">
6 <field name="name">Tracking a move</field>
7 <field name="model">stock.move.track</field>
8 <field name="type">form</field>
9 <field name="arch" type="xml">
10 <form string="Tracking a move">
11 <field name="tracking_prefix" colspan="4"/>
12 <field name="quantity" colspan="4"/>
13 <newline/>
14 <separator string="" colspan="4" />
15 <button icon='gtk-cancel' special="cancel"
16 string="_Cancel" />
17 <button name="track_lines" string="Ok"
18 type="object" icon="gtk-ok" />
19 </form>
20 </field>
21 </record>
22
23 <record id="track_line_old" model="ir.actions.act_window">
24 <field name="name">Tracking a move</field>
25 <field name="type">ir.actions.act_window</field>
26 <field name="res_model">stock.move.track</field>
27 <field name="view_type">form</field>
28 <field name="view_mode">form</field>
29 <field name="target">new</field>
30 </record>
31
32
33 <!-- Consume, scrap move -->5 <!-- Consume, scrap move -->
346
35 <record id="view_stock_move_consume_wizard" model="ir.ui.view">7 <record id="view_stock_move_consume_wizard" model="ir.ui.view">
368
=== modified file 'stock/wizard/stock_split_move.py'
--- stock/wizard/stock_split_move.py 2011-02-09 07:18:57 +0000
+++ stock/wizard/stock_split_move.py 2011-02-15 12:38:08 +0000
@@ -107,7 +107,7 @@
107 record_id = context and context.get('active_id', False) or False107 record_id = context and context.get('active_id', False) or False
108 pick_obj = self.pool.get('stock.picking')108 pick_obj = self.pool.get('stock.picking')
109 pick = pick_obj.browse(cr, uid, record_id, context=context)109 pick = pick_obj.browse(cr, uid, record_id, context=context)
110 data = self.read(cr, uid, ids[0])110 data = self.read(cr, uid, ids[0], context=context)
111 for move in pick.move_lines:111 for move in pick.move_lines:
112 quantity = data['move%s' % move.id]112 quantity = data['move%s' % move.id]
113 if 0 < quantity < move.product_qty:113 if 0 < quantity < move.product_qty:
114114
=== modified file 'survey/wizard/survey_browse_answer.py'
--- survey/wizard/survey_browse_answer.py 2011-02-09 07:18:57 +0000
+++ survey/wizard/survey_browse_answer.py 2011-02-15 12:38:08 +0000
@@ -61,14 +61,13 @@
61 @return : Dictionary value for Open the browse answer wizard.61 @return : Dictionary value for Open the browse answer wizard.
62 """62 """
63 if context is None: context = {}63 if context is None: context = {}
64 record = self.read(cr, uid, ids, [])64 sur_response_obj = self.pool.get('survey.response')
65 record = record and record[0] or {} 65 for record in self.browse(cr, uid, ids,context=context):
66 if record['response_id']:66 if record.response_id.id:
67 res_id = [(record['response_id'])]67 res_id = record.response_id.id
68 else:68 else:
69 sur_response_obj = self.pool.get('survey.response')69 res_id = sur_response_obj.search(cr, uid, [('survey_id', '=',record.survey_id)])[0]
70 res_id = sur_response_obj.search(cr, uid, [('survey_id', '=',int(record['survey_id']))])70 context.update({'active' : True,'survey_id' : record.survey_id, 'response_id' : [res_id], 'response_no' : 0})
71 context.update({'active' : True,'survey_id' : record['survey_id'], 'response_id' : res_id, 'response_no' : 0})
72 search_obj = self.pool.get('ir.ui.view')71 search_obj = self.pool.get('ir.ui.view')
73 search_id = search_obj.search(cr,uid,[('model','=','survey.question.wiz'),('name','=','Survey Search')])72 search_id = search_obj.search(cr,uid,[('model','=','survey.question.wiz'),('name','=','Survey Search')])
74 return {73 return {
7574
=== modified file 'survey/wizard/survey_print.py'
--- survey/wizard/survey_print.py 2011-02-09 07:18:57 +0000
+++ survey/wizard/survey_print.py 2011-02-15 12:38:08 +0000
@@ -55,10 +55,9 @@
55 @param context: A standard dictionary for contextual values55 @param context: A standard dictionary for contextual values
56 @return : Dictionary value for print survey form.56 @return : Dictionary value for print survey form.
57 """57 """
5858 datas = {'ids' : self.read(cr, uid, ids, ['survey_ids'], context=context)[0]['survey_ids']}
59 datas = {'ids' : self.read(cr, uid, ids, [], context)[0]['survey_ids']}
60 res = self.read(cr, uid, ids, ['survey_title', 'orientation', 'paper_size',\59 res = self.read(cr, uid, ids, ['survey_title', 'orientation', 'paper_size',\
61 'page_number', 'without_pagebreak'], context)60 'page_number', 'without_pagebreak'], context=context)
62 res = res and res[0] or {}61 res = res and res[0] or {}
63 datas['form'] = res62 datas['form'] = res
64 datas['model'] = 'survey.print'63 datas['model'] = 'survey.print'
6564
=== modified file 'survey/wizard/survey_print_answer.py'
--- survey/wizard/survey_print_answer.py 2011-02-09 07:18:57 +0000
+++ survey/wizard/survey_print_answer.py 2011-02-15 12:38:08 +0000
@@ -59,7 +59,7 @@
59 context = {}59 context = {}
60 datas = {'ids': context.get('active_ids', [])}60 datas = {'ids': context.get('active_ids', [])}
61 res = self.read(cr, uid, ids, ['response_ids', 'orientation', 'paper_size',\61 res = self.read(cr, uid, ids, ['response_ids', 'orientation', 'paper_size',\
62 'page_number', 'without_pagebreak'], context)62 'page_number', 'without_pagebreak'], context=context)
63 res = res and res[0] or {}63 res = res and res[0] or {}
64 datas['form'] = res64 datas['form'] = res
65 datas['model'] = 'survey.print.answer'65 datas['model'] = 'survey.print.answer'
6666
=== modified file 'survey/wizard/survey_print_statistics.py'
--- survey/wizard/survey_print_statistics.py 2011-02-09 07:18:57 +0000
+++ survey/wizard/survey_print_statistics.py 2011-02-15 12:38:08 +0000
@@ -44,7 +44,7 @@
44 if context is None:44 if context is None:
45 context = {}45 context = {}
46 datas = {'ids': context.get('active_ids', [])}46 datas = {'ids': context.get('active_ids', [])}
47 res = self.read(cr, uid, ids, ['survey_ids'], context)47 res = self.read(cr, uid, ids, ['survey_ids'], context=context)
48 res = res and res[0] or {}48 res = res and res[0] or {}
49 datas['form'] = res49 datas['form'] = res
50 datas['model'] = 'survey.print.statistics'50 datas['model'] = 'survey.print.statistics'
5151
=== modified file 'survey/wizard/survey_selection.py'
--- survey/wizard/survey_selection.py 2011-02-09 07:18:57 +0000
+++ survey/wizard/survey_selection.py 2011-02-15 12:38:08 +0000
@@ -122,7 +122,7 @@
122 search_obj = self.pool.get('ir.ui.view')122 search_obj = self.pool.get('ir.ui.view')
123 if context is None: context = {}123 if context is None: context = {}
124124
125 sur_id = self.read(cr, uid, ids, [])[0]125 sur_id = self.read(cr, uid, ids, ['survey_id'], context=context)[0]
126 survey_id = sur_id['survey_id']126 survey_id = sur_id['survey_id']
127 context.update({'survey_id': survey_id, 'sur_name_id': sur_id['id']})127 context.update({'survey_id': survey_id, 'sur_name_id': sur_id['id']})
128 cr.execute('select count(id) from survey_history where user_id=%s\128 cr.execute('select count(id) from survey_history where user_id=%s\
@@ -133,8 +133,8 @@
133 if user_limit and res >= user_limit:133 if user_limit and res >= user_limit:
134 raise osv.except_osv(_('Warning !'),_("You can not give response for this survey more than %s times") % (user_limit))134 raise osv.except_osv(_('Warning !'),_("You can not give response for this survey more than %s times") % (user_limit))
135135
136 sur_rec = survey_obj.read(cr,uid,self.read(cr,uid,ids)[0]['survey_id'])136 sur_rec = survey_obj.browse(cr,uid,ids,context=context)[0]
137 if sur_rec['max_response_limit'] and sur_rec['max_response_limit'] <= sur_rec['tot_start_survey']:137 if sur_rec.max_response_limit and sur_rec.max_response_limit <= sur_rec.tot_start_survey:
138 raise osv.except_osv(_('Warning !'),_("You can not give more response. Please contact the author of this survey for further assistance."))138 raise osv.except_osv(_('Warning !'),_("You can not give more response. Please contact the author of this survey for further assistance."))
139139
140 search_id = search_obj.search(cr,uid,[('model','=','survey.question.wiz'),('name','=','Survey Search')])140 search_id = search_obj.search(cr,uid,[('model','=','survey.question.wiz'),('name','=','Survey Search')])
141141
=== modified file 'survey/wizard/survey_send_invitation.py'
--- survey/wizard/survey_send_invitation.py 2011-02-09 07:18:57 +0000
+++ survey/wizard/survey_send_invitation.py 2011-02-15 12:38:08 +0000
@@ -96,7 +96,7 @@
96 def action_send(self, cr, uid, ids, context=None):96 def action_send(self, cr, uid, ids, context=None):
97 if context is None:97 if context is None:
98 context = {}98 context = {}
99 record = self.read(cr, uid, ids, [])99 record = self.read(cr, uid, ids, [],context=context)
100 survey_ids = context.get('active_ids', [])100 survey_ids = context.get('active_ids', [])
101 record = record and record[0]101 record = record and record[0]
102 partner_ids = record['partner_ids']102 partner_ids = record['partner_ids']

Subscribers

People subscribed via source and target branches